VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSpiderWebModelInstance.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2020 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrvOsg/vrvOsg.h>
15 
17 
18 #include <matrix/vlDcm.h>
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtSegmentedLine;
24 
54  {
55  public:
56 
59 
61  virtual ~DtSpiderWebModelInstance();
62 
64  // @{
65  virtual void setPosition(const DtVector& position);
66  virtual DtVector position() const;
67  // @}
68 
70  // @{
71  virtual void setOrientation(const DtTaitBryan& orientation);
72  virtual DtTaitBryan orientation() const;
73  // @}
74 
77  // @{
78  virtual void setMaxAngleSegment(double angleSegmentMax);
79  virtual double maxAngleSegment() const;
80  // @}
81 
84  // @{
85  virtual void setRadius(double x);
86  virtual double radius() const;
87  // @}
88 
91  // @{
92  virtual void setScale(float scale);
93  virtual float scale() const;
94  // @}
95 
98  // @{
99  virtual void setVisible(bool isVisible);
100  virtual bool isVisible() const;
101  // @}
102 
105  // @{
106  virtual void setNumberOfSpokes(unsigned int numSpokes);
107  virtual unsigned int numberOfSpokes() const;
108  // @}
109 
112  // @{
113  virtual void setNumberOfRings(unsigned int numRings);
114  virtual unsigned int numberOfRings() const;
115  // @}
116 
119  // @{
120  virtual void setLineStipplePattern(unsigned int stipplePattern);
121  virtual unsigned int lineStipplePattern() const;
122  // @}
123 
126  // @{
127  virtual void setLineWidth(float width);
128  virtual float lineWidth() const;
129  // @}
130 
134  // @{
135  virtual void setColor(float r, float g, float b, float a);
136  virtual bool getColor(float& r, float& g, float& b, float& a) const;
137  // @}
138 
141  // @{
142  virtual void setEventsEnabled(bool enabled, unsigned long long userData);
143  virtual bool eventsEnabled() const;
144  // @}
145 
151  // @{
152  virtual void setGroup(int groupNum);
153  virtual int group() const;
154  // @}
155 
157  virtual void setOverlay(unsigned int overlayId);
158 
160  virtual bool realize(DtModelDefinition& definition);
161 
162  // Update the spider web vertices based on attributes
163  virtual void update();
164 
167  virtual void recreateSpiderWeb();
168 
169  protected:
170 
172  virtual void createSpiderWebIfNecessary();
173 
175  virtual void deleteSpiderWeb();
176 
178  virtual void updateColors();
179 
181  virtual void setSpokeVertexPosition(unsigned int spokeIndex, unsigned int vertexIndex, double x, double y, double z) = 0;
182 
184  virtual void setRingVertexPosition(unsigned int ringIndex, unsigned int vertexIndex, double x, double y, double z) = 0;
185 
186  protected:
187  unsigned int myOverlay;
188 
190  unsigned long long myUserData;
191 
194  DtTaitBryan myOrientationTaitBryan; // needed for orientation accessor
195  double myRadius;
196 
197  unsigned int myNumberOfSpokes;
198  unsigned int myNumberOfRings;
199 
200  bool myVisible;
201  float myScale;
202  float myColor[4];
203  float myLineWidth;
204  unsigned int myLineStipplePattern;
205 
207 
208  int myGroup;
209 
210  std::vector<DtSegmentedLine*> mySpokes;
211  std::vector<DtSegmentedLine*> myRings;
212  };
213 }
The base class for all model instances.
Definition: DtModelInstance.h:39
unsigned int myNumberOfRings
Definition: DtSpiderWebModelInstance.h:198
double myMaxAngleSegment
Definition: DtSpiderWebModelInstance.h:206
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtDcm myOrientationDcm
Definition: DtSpiderWebModelInstance.h:193
float myLineWidth
Definition: DtSpiderWebModelInstance.h:203
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:33
unsigned int myOverlay
Definition: DtSpiderWebModelInstance.h:187
bool myVisible
Definition: DtSpiderWebModelInstance.h:200
double myRadius
Definition: DtSpiderWebModelInstance.h:195
unsigned long long myUserData
Definition: DtSpiderWebModelInstance.h:190
std::vector< DtSegmentedLine * > myRings
Definition: DtSpiderWebModelInstance.h:211
vrvGraphics implementation of the Spider Web Model
Definition: DtSpiderWebModelInstance.h:53
std::vector< DtSegmentedLine * > mySpokes
Definition: DtSpiderWebModelInstance.h:210
Contains makVrv::DtModelInstance class.
unsigned int myLineStipplePattern
Definition: DtSpiderWebModelInstance.h:204
float myScale
Definition: DtSpiderWebModelInstance.h:201
unsigned int myNumberOfSpokes
Definition: DtSpiderWebModelInstance.h:197
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Contains the makVrv::DtSegmentedLine class declaration.
DtTaitBryan myOrientationTaitBryan
Definition: DtSpiderWebModelInstance.h:194
int myGroup
Definition: DtSpiderWebModelInstance.h:208
bool myEventsEnabled
Definition: DtSpiderWebModelInstance.h:189
DtVector myPosition
Definition: DtSpiderWebModelInstance.h:192

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)