VR-Forces 5.0.1 Developer's Guide
 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) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
16 
17 #include <matrix/vlVector.h>
18 
19 #include <osg/PrimitiveSet>
20 #include <osg/Geometry>
21 
22 namespace osg
23 {
24  class Geode;
25  class Array;
26  class Texture;
27  class LineWidth;
28  class Group;
29 }
30 
31 namespace makVrv
32 {
33  class DtOsgSegmentPickable;
34  class DtCoordinateSystem;
35 
39  {
40  public:
41  typedef std::vector<DtVector> PointVector;
42 
44  {
48  FullExtrusion
49  };
50 
51  public:
52 
55 
57  virtual ~DtExtrudedModelInstance();
58 
59  private:
60 
63 
66 
69 
70  public:
71 
73  virtual const PointVector& points() const;
74 
76  virtual void addPoint(const DtVector&, int index = -1);
77 
79  virtual void removePoint(int index);
80 
82  virtual void setPoints(const std::vector<DtVector>&);
83 
85  virtual void setPosition(int index, const DtVector&);
86 
88  virtual void setPositions(const std::vector<DtVector>&);
89 
91  virtual void clearPoints();
92 
94  virtual void addToConnector( DtOsgSceneConnector* connector );
95 
97  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
98 
100  virtual void setStipplePattern(unsigned int);
101 
103  virtual void setColor(float r,float g,float b,float a);
104 
106  virtual void getColor(float& r,float& g,float& b,float& a) const;
107 
109  virtual void setTextureHeight(double height);
110 
112  virtual void setTextureWidth(double width);
113 
115  virtual void setTexture(osg::Texture* texture);
116 
123 
125  virtual void setUpExtent(float height);
126 
128  virtual void setDownExtent(float height);
129 
131  virtual void setLeftExtent(float height);
132 
134  virtual void setRightExtent(float heigh);
136 
138  virtual void setWidth(float);
139 
142  virtual void setHeight(float);
143 
145  virtual void setDimensions(float width, float height);
146 
149  virtual void setLineWidth(float width);
150 
154  virtual void setScribeWidth(float width);
155 
159  virtual void setScribeAllPolygons(bool);
160 
162  virtual void setScribed(bool b);
163 
166  virtual void setScribeColor(float r, float g, float b, float a);
167 
169  virtual void setVisible(bool isVisible) {}
170 
172  int pointCount() const;
173 
175  const DtVector& origin() const;
176 
178  const DtVector& point(int) const;
179 
181  virtual void setPickable(bool);
182 
184  bool pickable() const;
185 
186  void setOrigin(const DtVector& origin);
187 
189  virtual void updatePoints();
190 
192  virtual void setSolid(bool);
193 
195  osg::Node* rootNode();
196 
197  protected:
199  virtual osg::Vec3 rotatePoint(const osg::Vec3& org, double range, const DtTaitBryan& angle) const;
200 
202  virtual void updateMode();
203 
205  virtual void updateGeometry();
206 
208  virtual void updateTextureCoordinates();
209 
211  virtual void addPointsForExtentExtrusion(const DtVector& point);
212 
214  virtual void addFaceForRotation(const osg::Quat& rotation, const DtVector& point);
215 
217  virtual void addPointsForFullExtrusion(const DtVector& from,
218  const DtVector& to);
219 
222  virtual void setupScribeTransparency(bool b);
223 
225  virtual void setupGeodeTransparency(bool b);
226 
228  virtual void updateStippling();
229 
231  virtual void updateScribeLine();
232 
234  virtual void updateColors();
235 
237  virtual bool frontAndBackFaceRendered() const;
238 
240  virtual void updatePointsForLineStrip();
241 
243  virtual void updatePointsForTriangleStrip();
244 
246  virtual void updatePointsForExtrusion();
247 
249  virtual void createFaces();
250 
252  virtual void updateScribeForTriangleStrip();
253 
255  virtual void updateScribeForExtrusion(osg::Vec3Array*);
256 
258  virtual void updateScribeForOutline();
259 
261  virtual void updateScribeForFull();
262 
264  virtual void updateGeometryWithStrip(osg::ref_ptr<osg::Geometry>&, const osg::ref_ptr<osg::Vec3Array>&);
265 
267  virtual void slot_coordinateSystemChanged();
268 
269 
270  protected:
274 
282 
285 
288 
293 
298 
299  osg::Vec4 myColor;
300 
303 
304  float myUpExtent;
308 
310 
312 
314 
315  bool myScribed;
317  bool mySolid;
319 
322 
327 
328  osg::Vec4 myScribeColor;
330 
332 
335  DtCoordinateSystem* myCoordinateSystem = nullptr;
336 
337  };
338 }
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
osg::ref_ptr< osg::Texture > myTexture
Definition: DtExtrudedModelInstance.h:283
float myLeftExtent
Definition: DtExtrudedModelInstance.h:306
float myDownExtent
Definition: DtExtrudedModelInstance.h:305
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:304
Definition: DtExtrudedModelInstance.h:47
DtOsgSegmentPickable * myPickable
If drawing as line use this pointer to create the pickable segments of that line, else geometry will ...
Definition: DtExtrudedModelInstance.h:325
virtual void setVisible(bool isVisible)
no-op
Definition: DtExtrudedModelInstance.h:169
osg::ref_ptr< osg::Group > myFrontTransparentGroup
Definition: DtExtrudedModelInstance.h:289
A prism controlled by control points.
Definition: DtExtrudedModelInstance.h:38
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
voidpf uLong int origin
Definition: ioapi.h:42
float myRightExtent
Definition: DtExtrudedModelInstance.h:307
osg::ref_ptr< osg::Group > myMainTransform
Definition: DtExtrudedModelInstance.h:292
bool myScribed
Definition: DtExtrudedModelInstance.h:315
osg::ref_ptr< osg::Vec3Array > myScribePointsFull
Definition: DtExtrudedModelInstance.h:281
osg::ref_ptr< osg::Vec3Array > myShapePoints
Definition: DtExtrudedModelInstance.h:273
std::vector< DtVector > PointVector
Definition: DtExtrudedModelInstance.h:41
bool myScribeAllPolygons
Definition: DtExtrudedModelInstance.h:316
osg::ref_ptr< osg::LineWidth > myLineWidth
Definition: DtExtrudedModelInstance.h:286
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:297
double myTextureWidth
Definition: DtExtrudedModelInstance.h:301
bool mySolid
Definition: DtExtrudedModelInstance.h:317
osg::Vec4 myScribeColor
Definition: DtExtrudedModelInstance.h:328
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:313
bool myIsPickable
Definition: DtExtrudedModelInstance.h:326
osg::ref_ptr< osg::Geometry > myScribeGeometryTop
Definition: DtExtrudedModelInstance.h:277
LineExtrusionMode myMode
Definition: DtExtrudedModelInstance.h:321
osg::ref_ptr< osg::Geode > myShapeGeode
Definition: DtExtrudedModelInstance.h:271
The base class for simple OSG based model instances. This call can&#39;t be instantiated itself...
Definition: DtOsgModelInstance.h:77
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
bool myScribeWidthSet
Definition: DtExtrudedModelInstance.h:318
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
Definition: DtExtrudedModelInstance.h:284
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
int myStipplePattern
Definition: DtExtrudedModelInstance.h:320
double myTextureHeight
Definition: DtExtrudedModelInstance.h:302
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:41
osg::ref_ptr< osg::Geode > myScribeGeode
Definition: DtExtrudedModelInstance.h:275
Definition: DtExtrudedModelInstance.h:45
PointVector myLinePoints
Definition: DtExtrudedModelInstance.h:309
osg::ref_ptr< osg::Geometry > myScribeGeometryBottom
Definition: DtExtrudedModelInstance.h:278
Base class to provide boost signal/slot management.
Definition: DtExtrudedModelInstance.h:46
osg::ref_ptr< osg::Geometry > myScribeGeometryFull
Definition: DtExtrudedModelInstance.h:276
bool myScribeColorSet
Definition: DtExtrudedModelInstance.h:329
osg::ref_ptr< osg::Group > myOpaqueGroup
Definition: DtExtrudedModelInstance.h:291
osg::ref_ptr< osg::Vec3Array > myScribePointsTop
Definition: DtExtrudedModelInstance.h:279
DtVector myOrigin
Definition: DtExtrudedModelInstance.h:311
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
osg::ref_ptr< osg::Group > myBackTransparentGroup
Definition: DtExtrudedModelInstance.h:290
osg::ref_ptr< osg::Geometry > myShapeGeometry
Definition: DtExtrudedModelInstance.h:272
osg::ref_ptr< osg::LineWidth > myScribeWidth
Definition: DtExtrudedModelInstance.h:287
DtSignalConnectionManager myConnections
Definition: DtExtrudedModelInstance.h:331
osg::ref_ptr< osg::Vec3Array > myScribePointsBottom
Definition: DtExtrudedModelInstance.h:280
LineExtrusionMode
Definition: DtExtrudedModelInstance.h:43
osg::Vec4 myColor
Definition: DtExtrudedModelInstance.h:299

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)