VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
articulatedPartStateRepository.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
15 #include <vrfutil/rwTemplatedMap.h>
16 #include <readerWriter/rwVector.h>
17 #include <readerWriter/rwReal.h>
19 
20 class DtVrfObject;
21 
30 {
31 public:
32 
33  class DtArtPartMap : public DtRwTemplatedMapPtr<DtRwInt, DtArticulatedPartStateRepository>
34  {
35  public:
36 
38  DtArtPartMap(const DtString& name,
39  DtReaderWriterRegistry* parentRegistry = NULL,
40  const DtString& keyName = "key", const DtString& valueName = "value", const DtString& elementName = "item")
41  : DtRwTemplatedMapPtr(name, parentRegistry, keyName, valueName, elementName) {};
43  DtReaderWriterRegistry* parentRegistry = NULL,
44  const DtString& keyName = "key", const DtString& valueName = "value", const DtString& elementName = "item")
45  : DtRwTemplatedMapPtr(name, parentRegistry, keyName, valueName, elementName) {};
46  DtArtPartMap(const DtString& name, const DtRwTemplatedMapPtr& orig,
47  DtReaderWriterRegistry* parentRegistry = NULL)
48  : DtRwTemplatedMapPtr(name, orig, parentRegistry) {};
50  DtReaderWriterRegistry* parentRegistry = NULL)
51  : DtRwTemplatedMapPtr(name, orig, parentRegistry) {};
53  DtReaderWriterRegistry* parentRegistry = NULL)
54  : DtRwTemplatedMapPtr(orig, parentRegistry) {};
55 
56  virtual ~DtArtPartMap() {};
57 
58  virtual void postGetSelf();
59  };
60 
62  DtArticulatedPartStateRepository(const DtString& rwName = DtString::nullString(),
63  DtReaderWriterRegistry* parentRegistry = 0);
64 
67  DtReaderWriterRegistry* parentRegistry = 0);
68 
71  const DtString& rwName = DtString::nullString(),
72  DtReaderWriterRegistry* parentRegistry = 0);
73 
75  virtual void attachTo(DtVrfObject* parentObj);
76 
78  virtual void attachTo(DtVrfObject* parentObj, DtArticulatedPartStateRepository* parentPart);
79 
81  virtual DtArtPartType parentPartType() const;
82 
85 
86  virtual DtArticulatedPartStateRepository* parentPart();
87  virtual const DtArticulatedPartStateRepository* parentPart() const;
89 
91 
92  virtual DtVrfObject* parentObject();
93  virtual const DtVrfObject* parentObject() const;
95 
99 
102 
105  const DtString& rwName = DtString::nullString(),
106  DtReaderWriterRegistry* parentRegistry = 0) const;
107 
111  MergeRule rule = AllSpecifiedValues);
112 
114  virtual DtString type() const;
115 
117 
118  virtual DtArtPartType partType() const;
119  virtual void setPartType(DtArtPartType type);
121 
124  virtual DtVector attachPointWithRespectToObject() const;
125 
128  virtual DtVector bodyPosition() const;
129 
132  virtual DtVector localPosition() const;
133 
136  virtual DtVector endPointlocalPosition() const;
137 
140  virtual DtVector worldPosition() const;
141 
143  virtual DtTaitBryan bodyOrientation() const;
144 
146  virtual DtDcm localOrientationMatrix() const;
147 
149 
150  virtual const DtArtPartMap& parts() const;
151  virtual DtArtPartMap& parts();
153 
156  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType);
157 
160  virtual DtArticulatedPartStateRepository* attachPart(DtArtPartType partType,
161  const DtArticulatedPartStateRepository& partState);
162 
164 
165  DtReal azimuthNeutralOffset() const;
166  void setAzimuthNeutralOffset(DtReal offset, bool isSpecified = true);
168 
170 
171  DtReal elevationNeutralOffset() const;
172  void setElevationNeutralOffset(DtReal offset, bool isSpecified = true);
174 
176  virtual void addParameterType(DtArtParamType paramType);
177 
179  virtual void clearParameterTypes();
180 
182  virtual bool hasParameterType(DtArtParamType paramType) const;
183 
185  const DtRwTemplatedIntList& parameterTypes() const;
186 
188  virtual void mergeInPartAttachments(const DtArticulatedPartStateRepository& other);
189 
191  virtual void setAllValuesUnspecified();
192 
194  virtual void prePutSelf();
195 
196 protected:
197 
200  void preventConfigValueReadAndWrite();
201 
202  virtual void copyParts(const DtArticulatedPartStateRepository& orig);
203 
205  virtual void setParentsForAllParts();
206 
207 protected:
208 
210 
212 
215 
218 
220 };
221 
const DtRwArtPartState & operator=(const DtRwArtPartState &orig)
assignment
virtual void prePutSelf()
Called before either version of put self (file or environment). Default is no-op. ...
DtArticulatedPartStateRepository::DtArtPartMap DtArtPartMap
Definition: articulatedPartStateRepository.h:222
DtArticulatedPartStateRepository * myParentPart
Definition: articulatedPartStateRepository.h:214
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtRwTemplatedIntList myParameterTypes
Definition: articulatedPartStateRepository.h:219
Definition: rwTemplatedList.h:183
virtual DtRwArtPartState * clone(const DtString &partName, DtReaderWriterRegistry *parentRegistry=NULL) const
Definition: symbolString.h:20
DtArtPartMap()
Definition: articulatedPartStateRepository.h:37
DtArtPartMap(const DtRwTemplatedMapPtr &orig, DtReaderWriterRegistry *parentRegistry=NULL)
Definition: articulatedPartStateRepository.h:52
DtArtPartMap(const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, const DtString &keyName="key", const DtString &valueName="value", const DtString &elementName="item")
Definition: articulatedPartStateRepository.h:42
DtArtPartMap(const DtSymbolString &name, const DtRwTemplatedMapPtr &orig, DtReaderWriterRegistry *parentRegistry=NULL)
Definition: articulatedPartStateRepository.h:49
DtVrfObject * myParentObject
Definition: articulatedPartStateRepository.h:213
DtRwInt myPartType
Definition: articulatedPartStateRepository.h:209
DtArtPartMap(const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, const DtString &keyName="key", const DtString &valueName="value", const DtString &elementName="item")
Definition: articulatedPartStateRepository.h:38
Definition: readerWriterRegistry.h:39
DtRwReal myAzimuthNeutralOffset
Definition: articulatedPartStateRepository.h:216
DtRwReal myElevationNeutralOffset
Definition: articulatedPartStateRepository.h:217
Definition: articulatedPartStateRepository.h:33
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Definition: rwTemplatedMap.h:97
DtArtPartMap myParts
Definition: articulatedPartStateRepository.h:211
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual bool mergeSpecifiedParameters(const DtRwArtPartState &other, MergeRule rule=AllSpecifiedValues)
Sets local parameter values to that of the other part, as long as the other part has that parameter s...
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
A readable, writable type that holds an articulated part state.
Definition: rwArtPartState.h:25
voidpf uLong offset
Definition: ioapi.h:42
DtArtPartMap(const DtString &name, const DtRwTemplatedMapPtr &orig, DtReaderWriterRegistry *parentRegistry=NULL)
Definition: articulatedPartStateRepository.h:46
virtual ~DtArtPartMap()
Definition: articulatedPartStateRepository.h:56
File: rwVector.h.

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)