VR-Forces 4.10 Class Documentation
 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 
15 #include <vlutil/vlList.h>
16 #include <vlpi/disEnums.h>
17 #include <vl/hostStructs.h>
20 
21 #include <map>
22 
23 class Coordinate_System;
25 
30 {
31 
32 private:
35 
36 public:
37 
38  typedef std::map<DtArtPartType, DtArticulatedPartStateRepository*> ArtPartMap;
39 
41  DtArticulatedPartManager(DtVrfObject* owner, const DtString& name,
42  DtReaderWriterRegistry* parentRegistry = NULL);
43 
46  DtReaderWriterRegistry* parentRegistry = NULL);
47 
49  virtual ~DtArticulatedPartManager();
50 
52  //virtual DtArticulatedPartManager* clone() const;
53 
56  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType);
57 
60  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
61  DtArtPartType parentPartType);
62 
64  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
65  DtArtPartType parentPartType, const DtArticulatedPartStateRepository& partState);
66 
70  virtual bool detachPart(DtArtPartType partType,
71  DtArticulatedPartStateRepository* partState = 0);
72 
75  virtual DtArticulatedPartStateRepository* findPartByType(DtArtPartType partType);
76 
77  virtual const DtArticulatedPartStateRepository* findPartByType(DtArtPartType partType) const;
78 
80  virtual int numParts() const;
81 
82  const DtArtPartMap& articulatedParts() const { return myParts; };
83 
85  virtual void mergeInPartAttachments(const DtArticulatedPartManager& other);
86 
89  virtual void setAllPartValuesUnspecified();
90 
93  virtual void preGetSelf();
94 
96  virtual void postGetSelf();
97 
100  virtual void prePutSelf();
101 
103  virtual void printAllParts(std::ostream& strm) const;
104 
105 protected:
106 
107  const DtArticulatedPartStateRepository* findPartOnOtherPart(DtArtPartType partType,
108  const DtArticulatedPartStateRepository& parentPart) const;
109 
110  bool detatchPartFromOtherPart(DtArtPartType partType,
112  DtArticulatedPartStateRepository* partState = 0);
113 
114  int countPartsOnOtherPart(const DtArticulatedPartStateRepository& parentPart) const;
115 
116  void mergeIntoPartsMap(const DtArtPartMap& otherMap);
117 
118 protected:
119 
121 
123 
125 };
virtual void prePutSelf()
Called before either version of put self (file or environment). Default is no-op. ...
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
virtual void postGetSelf()
Called after either version of getSelf (mtl or environment). Default is no-op.
Definition: readerWriter.h:85
The DtSimObjectStateRepository is an abstract base class (ABC) for all state repositories.
Definition: simObjectStateRepository.h:46
Definition: readerWriterRegistry.h:39
Definition: articulatedPartStateRepository.h:33
Definition: coordSystem.h:54
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
const DtArtPartMap & articulatedParts() const
Definition: articulatedPartManager.h:82
std::map< DtArtPartType, DtArticulatedPartStateRepository * > ArtPartMap
Definition: articulatedPartManager.h:38
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
virtual void preGetSelf()
Called before either version of get self (file or environment). Default is no-op. ...
The articulated part manager maintains a tree of articulated and attached parts for the state reposit...
Definition: articulatedPartManager.h:29
DtVrfObject * myOwner
Definition: articulatedPartManager.h:124
DtArtPartMap myParts
Definition: articulatedPartManager.h:120
DtArtPartMap myTempParts
Definition: articulatedPartManager.h:122

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)