VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
articulatedPartManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <vrfStateData/stateData.h>
16 #include <vlutil/vlList.h>
17 #include <vlpi/disEnums.h>
18 #include <vl/hostStructs.h>
20 
21 #include <map>
22 
23 class Coordinate_System;
25 
26 namespace makVrf
27 {
28  class DtStateData;
29 
34  {
35 
36  private:
38 
39  public:
40 
41  typedef std::map<DtArtPartType, DtArticulatedPartStateRepository*> ArtPartMap;
42 
44  DtArticulatedPartManager(DtStateData* owner = nullptr, const DtString& name = "art-parts",
45  DtReaderWriterRegistry* parentRegistry = nullptr);
46 
48  virtual ~DtArticulatedPartManager() override;
49 
52  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType);
53 
56  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
57  DtArtPartType parentPartType);
58 
60  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
61  DtArtPartType parentPartType, const DtArticulatedPartStateRepository& partState);
62 
66  virtual bool detachPart(DtArtPartType partType,
67  DtArticulatedPartStateRepository* partState = nullptr);
68 
71  virtual DtArticulatedPartStateRepository* findPartByType(DtArtPartType partType);
72 
73  virtual void setStateData(DtStateData*);
74 
75  virtual const DtArticulatedPartStateRepository* findPartByType(DtArtPartType partType) const;
76 
78  virtual int numParts() const;
79 
80  const DtArtPartMap& articulatedParts() const { return myParts; };
81 
83  virtual void mergeInPartAttachments(const DtArticulatedPartManager& other);
84 
87  virtual void setAllPartValuesUnspecified();
88 
91  virtual void preGetSelf() override;
92 
94  virtual void postGetSelf() override;
95 
98  virtual void prePutSelf() override;
99 
100  virtual void setCoordinateSystem(const Coordinate_System* cs);
101 
103  virtual void printAllParts(std::ostream& strm) const;
104 
106 
107  virtual void setPublishOnLegionNetwork(bool, bool isWritable);
109  {
110  return myPublishOnLegionNetwork;
111  }
112 
113  virtual void updateDataStorage(const DtArticulatedPartCollection&);
114 
115  protected:
116 
117  const DtArticulatedPartStateRepository* findPartOnOtherPart(DtArtPartType partType,
118  const DtArticulatedPartStateRepository& parentPart) const;
119 
120  bool detatchPartFromOtherPart(DtArtPartType partType,
122  DtArticulatedPartStateRepository* partState = nullptr);
123 
124  int countPartsOnOtherPart(const DtArticulatedPartStateRepository& parentPart) const;
125 
126  void mergeIntoPartsMap(const DtArtPartMap& otherMap);
127 
128  protected:
132 
136  };
137 }
DtStateData * myOwner
Definition: articulatedPartManager.h:130
The articulated part manager maintains a tree of articulated and attached parts for the state reposit...
Definition: articulatedPartManager.h:33
DtArtPartMap myTempParts
Definition: articulatedPartManager.h:133
const Coordinate_System * myCoordinateSystem
Definition: articulatedPartManager.h:131
Definition: readerWriter.h:85
bool publishOnLegionNetwork() const
Definition: articulatedPartManager.h:108
Definition: readerWriterRegistry.h:39
const DtArtPartMap & articulatedParts() const
Definition: articulatedPartManager.h:80
Definition: coordSystem.h:54
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
bool myPublishOnLegionNetwork
Definition: articulatedPartManager.h:134
std::map< DtArtPartType, DtArticulatedPartStateRepository * > ArtPartMap
Definition: articulatedPartManager.h:41
Definition: articulatedPartStateRepository.h:44
DtArtPartMap myParts
Definition: articulatedPartManager.h:129
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
bool myIsWritable
Definition: articulatedPartManager.h:135

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)