VR-Forces 5.0.3 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>
21 
22 #include <map>
23 
24 class Coordinate_System;
26 
27 namespace makVrf
28 {
29  class DtStateData;
30 
35  {
36 
37  private:
39 
40  public:
41 
42  typedef std::map<DtArtPartType, DtArticulatedPartStateRepository*> ArtPartMap;
43 
45  DtArticulatedPartManager(DtStateData* owner = 0, const DtString& name = "art-parts",
46  DtReaderWriterRegistry* parentRegistry = NULL);
47 
49  virtual ~DtArticulatedPartManager();
50 
53  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType);
54 
57  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
58  DtArtPartType parentPartType);
59 
61  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
62  DtArtPartType parentPartType, const DtArticulatedPartStateRepository& partState);
63 
67  virtual bool detachPart(DtArtPartType partType,
68  DtArticulatedPartStateRepository* partState = 0);
69 
72  virtual DtArticulatedPartStateRepository* findPartByType(DtArtPartType partType);
73 
74  virtual void setStateData(DtStateData*);
75 
76  virtual const DtArticulatedPartStateRepository* findPartByType(DtArtPartType partType) const;
77 
79  virtual int numParts() const;
80 
81  const DtArtPartMap& articulatedParts() const { return myParts; };
82 
84  virtual void mergeInPartAttachments(const DtArticulatedPartManager& other);
85 
88  virtual void setAllPartValuesUnspecified();
89 
92  virtual void preGetSelf();
93 
95  virtual void postGetSelf();
96 
99  virtual void prePutSelf();
100 
101  virtual void setCoordinateSystem(const Coordinate_System* cs);
102 
104  virtual void printAllParts(std::ostream& strm) const;
105 
107 
108  virtual void setPublishOnLegionNetwork(bool, bool isWritable);
110  {
111  return myPublishOnLegionNetwork;
112  }
113 
114  virtual void updateDataStorage(const DtArticulatedPartCollection&);
115 
116  protected:
117 
118  const DtArticulatedPartStateRepository* findPartOnOtherPart(DtArtPartType partType,
119  const DtArticulatedPartStateRepository& parentPart) const;
120 
121  bool detatchPartFromOtherPart(DtArtPartType partType,
123  DtArticulatedPartStateRepository* partState = 0);
124 
125  int countPartsOnOtherPart(const DtArticulatedPartStateRepository& parentPart) const;
126 
127  void mergeIntoPartsMap(const DtArtPartMap& otherMap);
128 
129  protected:
133 
137  };
138 }
DtStateData * myOwner
Definition: articulatedPartManager.h:131
The articulated part manager maintains a tree of articulated and attached parts for the state reposit...
Definition: articulatedPartManager.h:34
DtArtPartMap myTempParts
Definition: articulatedPartManager.h:134
const Coordinate_System * myCoordinateSystem
Definition: articulatedPartManager.h:132
Definition: readerWriter.h:85
bool publishOnLegionNetwork() const
Definition: articulatedPartManager.h:109
Definition: readerWriterRegistry.h:39
const DtArtPartMap & articulatedParts() const
Definition: articulatedPartManager.h:81
Definition: coordSystem.h:54
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
bool myPublishOnLegionNetwork
Definition: articulatedPartManager.h:135
std::map< DtArtPartType, DtArticulatedPartStateRepository * > ArtPartMap
Definition: articulatedPartManager.h:42
Definition: articulatedPartStateRepository.h:44
DtArtPartMap myParts
Definition: articulatedPartManager.h:130
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:136

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)