VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simArtPartDescriptor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 #include <vrfutil/rwArtPartState.h>
15 #include <readerWriter/rwInt.h>
16 #include <readerWriter/rwReal.h>
17 #include "readerWriter/rwVector.h"
19 #include <vlpi/disEnums.h>
20 
22 
29 {
30 protected:
33 
34 public:
37  parentRegistry = NULL);
38 
39  DtSimArtPartDescriptor(const DtSymbolString& partName,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  DtSimArtPartDescriptor(const DtString& partName,
44  const DtSimArtPartDescriptor& orig,
45  DtReaderWriterRegistry* parentRegistry = NULL);
46 
47  DtSimArtPartDescriptor(const DtSymbolString& partName,
48  const DtSimArtPartDescriptor& orig,
49  DtReaderWriterRegistry * parentRegistry = NULL);
50 
52  DtReaderWriterRegistry* parentRegistry = NULL);
53 
56 
57  virtual ~DtSimArtPartDescriptor();
58 
59  virtual DtSimArtPartDescriptor* clone(const DtString& partName,
60  DtReaderWriterRegistry* parentRegistry = NULL) const;
61 
62  virtual DtSimArtPartDescriptor* clone(const DtSymbolString& partName,
63  DtReaderWriterRegistry* parentRegistry = NULL) const;
64 
67  virtual void setParamList(const DtSimArtPartParamList& paramList);
68  virtual const DtSimArtPartParamList& paramList() const;
69  virtual bool paramListSpecified() const;
71 
74  virtual void setPartType(DtArtPartType partType);
75  virtual DtArtPartType partType() const;
76  virtual bool partTypeSpecified() const;
78 
81  virtual void setParentPartType(DtArtPartType partType);
82  virtual DtArtPartType parentPartType() const;
83  virtual bool parentPartTypeSpecified() const;
85 
88  virtual DtReal azimuthNeutralOffset() const;
89  virtual void setAzimuthNeutralOffset(DtReal offset);
90  virtual bool azimuthNeutralOffsetSpecified() const;
92 
95  virtual bool mergeSpecifiedParameters(const DtSimArtPartDescriptor& other,
96  MergeRule rule = AllSpecifiedValues);
97 
100  virtual void setAllValuesUnspecified();
101 
103  virtual void markMatchingFieldsUnspecified(const DtSimArtPartDescriptor& other);
104 
106  virtual void writeOnlySpecifiedParameters();
107 
110  virtual void writeOnlyApplicableParameters();
111 
114  virtual void prePutSelf();
115 
117  bool operator==(const DtSimArtPartDescriptor& rhs) const;
118  bool operator!=(const DtSimArtPartDescriptor& rhs) const { return !(*this == rhs); };
119 
120  virtual bool approxEq(const DtSimArtPartDescriptor& rhs, double diff) const;
121 
123  static const char* theXmlType();
124 
125  virtual const char* xmlType() const
126  {
127  return theXmlType();
128  }
129 
132  virtual DtString partTypeSystemParamName() const;
133 
135  virtual void setPartTypeSystemParamName(const DtString& paramName);
136 
137 protected:
138 
142  virtual const char* readerWriterType() const;
143 
144 protected:
145 
149 
155 
163 
173 
190 
193 };
194 
195 
196 
197 
DtRwInt myParentPartType
Parameter Name: parent-part-type Parameter Description: The type of the object to which an articulate...
Definition: simArtPartDescriptor.h:162
const DtRwArtPartState & operator=(const DtRwArtPartState &orig)
assignment
virtual void prePutSelf()
Called before either version of put self (file or environment). Default is no-op. ...
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
bool operator!=(const DtSimArtPartDescriptor &rhs) const
Definition: simArtPartDescriptor.h:118
virtual DtRwArtPartState * clone(const DtString &partName, DtReaderWriterRegistry *parentRegistry=NULL) const
Definition: symbolString.h:20
DtString myPartTypeSystemParamNameOverride
Not for general use. Stores an overridden part type system parameter name.
Definition: simArtPartDescriptor.h:192
#define DT_DLL_vrfobjparam
This file is used to determine how to build.
Definition: vrfobjparamDefines.h:28
A readable, writable type that holds an articulated part type, attached-to part type, attachment point, and a list of art-part params (DtSimArtPartParamList). The read/write name is not used for anything in particular, and therefore may be used for file readability.
Definition: simArtPartDescriptor.h:28
DtRwInt myPartType
Parameter Name: art-part-type Parameter Description: The type of an articulated part. For the list of available values see the DIS Enumeration Document (Enumeration and Bit Encoded Values for Use with Protocols for DIS Applications).
Definition: simArtPartDescriptor.h:154
Definition: readerWriterRegistry.h:39
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...
virtual void markMatchingFieldsUnspecified(const DtRwArtPartState &other)
Sets all values that match the other part state to unspecified.
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtSimArtPartParamList myParamList
Parameter Name: art-part-param-list Parameter Description: List of the VR-Link articulated part param...
Definition: simArtPartDescriptor.h:172
DtRwReal myAzimuthNeutralOffset
Parameter Name: azimuth-neutral-offset Parameter Description: Sets and gets the neutral azimuth offse...
Definition: simArtPartDescriptor.h:188
virtual const char * xmlType() const
Definition: simArtPartDescriptor.h:125
A readable, writable type that holds an articulated part state.
Definition: rwArtPartState.h:26
MergeRule
Definition: rwArtPartState.h:30
static const char * theXmlType()
The type that is used when archiving to an XML stream.
bool operator==(const DtRwArtPartState &rhs) const
voidpf uLong offset
Definition: ioapi.h:42
Instances of DtSimArtPartParamList are readable/writeable lists of DtRwInt objects (readable/writeabl...
Definition: simArtPartParamList.h:27
File: rwVector.h.

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)