VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtExtrudedModelInstance.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 
12 #include <vrvOsg/vrvOsg.h>
14 
15 #include <matrix/vlVector.h>
16 
17 #include <osg/PrimitiveSet>
18 #include <osg/Geometry>
19 
20 namespace osg
21 {
22  class Geode;
23  class Array;
24  class Texture;
25  class LineWidth;
26  class Group;
27 }
28 
29 namespace makVrv
30 {
31  class DtOsgSegmentPickable;
32 
36  {
37  public:
38  typedef std::vector<DtVector> PointVector;
39 
41  {
45  FullExtrusion
46  };
47 
48  public:
49 
52 
54  virtual ~DtExtrudedModelInstance();
55 
56  private:
57 
60 
63 
66 
67  public:
68 
70  virtual const PointVector& points() const;
71 
73  virtual void addPoint(const DtVector&, int index = -1);
74 
76  virtual void removePoint(int index);
77 
79  virtual void setPoints(const std::vector<DtVector>&);
80 
82  virtual void setPosition(int index, const DtVector&);
83 
85  virtual void setPositions(const std::vector<DtVector>&);
86 
88  virtual void clearPoints();
89 
91  virtual void addToConnector( DtOsgSceneConnector* connector );
92 
94  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
95 
97  virtual void setStipplePattern(unsigned int);
98 
100  virtual void setColor(float r,float g,float b,float a);
101 
103  virtual void getColor(float& r,float& g,float& b,float& a) const;
104 
106  virtual void setTextureHeight(double height);
107 
109  virtual void setTextureWidth(double width);
110 
112  virtual void setTexture(osg::Texture* texture);
113 
120 
122  virtual void setUpExtent(float height);
123 
125  virtual void setDownExtent(float height);
126 
128  virtual void setLeftExtent(float height);
129 
131  virtual void setRightExtent(float heigh);
133 
135  virtual void setWidth(float);
136 
139  virtual void setHeight(float);
140 
142  virtual void setDimensions(float width, float height);
143 
146  virtual void setLineWidth(float width);
147 
151  virtual void setScribeWidth(float width);
152 
156  virtual void setScribeAllPolygons(bool);
157 
159  virtual void setScribed(bool b);
160 
163  virtual void setScribeColor(float r, float g, float b, float a);
164 
166  virtual void setVisible(bool isVisible) {}
167 
169  int pointCount() const;
170 
172  const DtVector& origin() const;
173 
175  const DtVector& point(int) const;
176 
178  virtual void setPickable(bool);
179 
181  bool pickable() const;
182 
183  void setOrigin(const DtVector& origin);
184 
186  virtual void updatePoints();
187 
189  virtual void setSolid(bool);
190 
192  osg::Node* rootNode();
193 
194  protected:
196  virtual osg::Vec3 rotatePoint(const osg::Vec3& org, double range, const DtTaitBryan& angle) const;
197 
199  virtual void updateMode();
200 
202  virtual void updateGeometry();
203 
205  virtual void updateTextureCoordinates();
206 
208  virtual void addPointsForExtentExtrusion(const DtVector& point);
209 
211  virtual void addFaceForRotation(const osg::Quat& rotation, const DtVector& point);
212 
214  virtual void addPointsForFullExtrusion(const DtVector& from,
215  const DtVector& to);
216 
219  virtual void setupScribeTransparency(bool b);
220 
222  virtual void setupGeodeTransparency(bool b);
223 
225  virtual void updateStippling();
226 
228  virtual void updateScribeLine();
229 
231  virtual void updateColors();
232 
234  virtual bool frontAndBackFaceRendered() const;
235 
237  virtual void updatePointsForLineStrip();
238 
240  virtual void updatePointsForTriangleStrip();
241 
243  virtual void updatePointsForExtrusion();
244 
246  virtual void createFaces();
247 
249  virtual void updateScribeForTriangleStrip();
250 
252  virtual void updateScribeForExtrusion(osg::Vec3Array*);
253 
255  virtual void updateScribeForOutline();
256 
258  virtual void updateScribeForFull();
259 
261  virtual void updateGeometryWithStrip(osg::ref_ptr<osg::Geometry>&, const osg::ref_ptr<osg::Vec3Array>&);
262 
263  protected:
267 
275 
278 
281 
286 
291 
292  osg::Vec4 myColor;
293 
296 
297  float myUpExtent;
301 
303 
305 
307 
308  bool myScribed;
310  bool mySolid;
312 
315 
320 
321  osg::Vec4 myScribeColor;
323  };
324 }
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
osg::ref_ptr< osg::Texture > myTexture
Definition: DtExtrudedModelInstance.h:276
float myLeftExtent
Definition: DtExtrudedModelInstance.h:299
float myDownExtent
Definition: DtExtrudedModelInstance.h:298
Create a series of cylinders that can be used as pickable on lines that only have osg width...
Definition: DtOsgSegmentPickable.h:23
float myUpExtent
Definition: DtExtrudedModelInstance.h:297
Definition: DtExtrudedModelInstance.h:44
DtOsgSegmentPickable * myPickable
If drawing as line use this pointer to create the pickable segments of that line, else geometry will ...
Definition: DtExtrudedModelInstance.h:318
virtual void setVisible(bool isVisible)
no-op
Definition: DtExtrudedModelInstance.h:166
osg::ref_ptr< osg::Group > myFrontTransparentGroup
Definition: DtExtrudedModelInstance.h:282
A prism controlled by control points.
Definition: DtExtrudedModelInstance.h:35
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
voidpf uLong int origin
Definition: ioapi.h:42
float myRightExtent
Definition: DtExtrudedModelInstance.h:300
osg::ref_ptr< osg::Group > myMainTransform
Definition: DtExtrudedModelInstance.h:285
bool myScribed
Definition: DtExtrudedModelInstance.h:308
osg::ref_ptr< osg::Vec3Array > myScribePointsFull
Definition: DtExtrudedModelInstance.h:274
osg::ref_ptr< osg::Vec3Array > myShapePoints
Definition: DtExtrudedModelInstance.h:266
std::vector< DtVector > PointVector
Definition: DtExtrudedModelInstance.h:38
bool myScribeAllPolygons
Definition: DtExtrudedModelInstance.h:309
osg::ref_ptr< osg::LineWidth > myLineWidth
Definition: DtExtrudedModelInstance.h:279
osg::ref_ptr< osg::Vec3Array > myFaces
If the line has width and height, the list of faces that make up the junction points of the boxes...
Definition: DtExtrudedModelInstance.h:290
double myTextureWidth
Definition: DtExtrudedModelInstance.h:294
bool mySolid
Definition: DtExtrudedModelInstance.h:310
osg::Vec4 myScribeColor
Definition: DtExtrudedModelInstance.h:321
Contains makVrv::DtOsgModelInstance class.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:76
bool myShapePointsDirty
Definition: DtExtrudedModelInstance.h:306
bool myIsPickable
Definition: DtExtrudedModelInstance.h:319
osg::ref_ptr< osg::Geometry > myScribeGeometryTop
Definition: DtExtrudedModelInstance.h:270
LineExtrusionMode myMode
Definition: DtExtrudedModelInstance.h:314
osg::ref_ptr< osg::Geode > myShapeGeode
Definition: DtExtrudedModelInstance.h:264
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:76
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
bool myScribeWidthSet
Definition: DtExtrudedModelInstance.h:311
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
Definition: DtExtrudedModelInstance.h:277
int myStipplePattern
Definition: DtExtrudedModelInstance.h:313
double myTextureHeight
Definition: DtExtrudedModelInstance.h:295
osg::ref_ptr< osg::Geode > myScribeGeode
Definition: DtExtrudedModelInstance.h:268
Definition: DtExtrudedModelInstance.h:42
PointVector myLinePoints
Definition: DtExtrudedModelInstance.h:302
osg::ref_ptr< osg::Geometry > myScribeGeometryBottom
Definition: DtExtrudedModelInstance.h:271
Definition: DtExtrudedModelInstance.h:43
osg::ref_ptr< osg::Geometry > myScribeGeometryFull
Definition: DtExtrudedModelInstance.h:269
bool myScribeColorSet
Definition: DtExtrudedModelInstance.h:322
osg::ref_ptr< osg::Group > myOpaqueGroup
Definition: DtExtrudedModelInstance.h:284
osg::ref_ptr< osg::Vec3Array > myScribePointsTop
Definition: DtExtrudedModelInstance.h:272
DtVector myOrigin
Definition: DtExtrudedModelInstance.h:304
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
osg::ref_ptr< osg::Group > myBackTransparentGroup
Definition: DtExtrudedModelInstance.h:283
osg::ref_ptr< osg::Geometry > myShapeGeometry
Definition: DtExtrudedModelInstance.h:265
osg::ref_ptr< osg::LineWidth > myScribeWidth
Definition: DtExtrudedModelInstance.h:280
osg::ref_ptr< osg::Vec3Array > myScribePointsBottom
Definition: DtExtrudedModelInstance.h:273
LineExtrusionMode
Definition: DtExtrudedModelInstance.h:40
osg::Vec4 myColor
Definition: DtExtrudedModelInstance.h:292

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)