VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCigiEntity.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2017 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCigi/vrvCigi.h>
13 
15 
16 #include <matrix/geodeticCoord.h>
17 
18 #include <boost/unordered_map.hpp>
19 
20 #include <string>
21 
22 namespace makVrv
23 {
24  class DtCigiConnection;
25  class DtAgentManagerInterface;
26  class DtOsgArticulatedModel;
27 
28  class DtArticulatedModelAgent;
29 
33  {
34  public:
36  DtCigiEntity(DtCigiConnection& connection,
37  DtAgentManagerInterface& mySceneInterface,
38  int entityId, int entityType);
39 
41  virtual ~DtCigiEntity();
42 
46  virtual void init();
47 
50  virtual void uninit();
51 
55  virtual void restartRequest();
56 
59  virtual void restart();
60 
62  virtual void setState(int stateId, int stateValue);
63 
65  virtual void setArtPartTranslation(int partId, float xOffset, float yOffset,
66  float zOffset, bool xEnable, bool yEnable, bool zEnable);
67 
69  virtual void setArtPartOrientation(int partId, float yaw, float pitch, float roll,
70  bool yawEnable, bool pitchEnable, bool rollEnable);
71 
73  virtual void setArtPartLinearRate(int partId, float xRate, float yRate,
74  float zRate);
75 
77  virtual void setArtPartAngularRate(int partId, float yawRate, float pitchRate,
78  float rollRate);
79 
81  virtual void setArtPartEnable(int partId, bool trueFalse);
82 
84  virtual void setAnimationSpeed(const std::string& animationName, double speed);
85 
87  virtual void setAnimationFrame(const std::string& animationName, int frame);
88 
90  virtual void setActiveRegionState( const std::string& regionName, bool state );
91 
93  virtual void setAnimationRange(const std::string& animationName,
94  int firstFrameIndex, int lastFrameIndex);
95 
100  virtual bool hasAnimations() const;
101 
102  protected:
103  virtual void getExtrapolatedValuesAndRestart();
104 
108  virtual void queryCurrentAnimationFrame( DtUniqueID modelId, std::string animationName );
109 
114  virtual void returnCurrentAnimationFrame( const std::string& animationName, int frameNum );
115 
119  virtual void queryExtrapolatedArtPartTranslation( DtUniqueID modelId, int cigiPartId,
120  int disRprPartId );
121 
125  virtual void returnExtrapolatedArtPartTranslation( int cigiPartId, int disRprPartId,
126  const DtVector& translation );
127 
131  virtual void queryExtrapolatedArtPartOrientation( DtUniqueID modelId, int cigiPartId,
132  int disRprPartId );
133 
137  virtual void returnExtrapolatedArtPartOrientation( int cigiPartId, int disRprPartId,
138  const DtTaitBryan& translation );
139 
142  virtual DtOsgArticulatedModel* findArticulatedModelInRenderThread( DtUniqueID modelId ) const;
143 
144  protected:
145  DtArticulatedModelAgent* myArticulatedModel;
146 
147  typedef boost::unordered_map<int, int> StateMap;
149 
150  typedef boost::unordered_map<std::string, int> AnimationFrameMap;
152 
153  typedef boost::unordered_map<std::string, double> AnimationSpeedMap;
155 
157  {
159  int endFrame;
160  };
161  typedef boost::unordered_map<std::string, AnimationRange> AnimationRangeMap;
163 
164  typedef boost::unordered_map<std::string, bool> DynamicRegionMap;
166 
167  };
168 
173 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)