VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtExtrudedLineModelSegmentInstance.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>
15 
17 
18 #include <matrix/vlVector.h>
19 
20 #include <osg/PrimitiveSet>
21 #include <osg/Geode>
22 #include <osg/Geometry>
23 #include <osg/LineWidth>
24 
25 namespace osg
26 {
27  class Geode;
28  class Array;
29  class Texture;
30  class Group;
31 }
32 
33 namespace makVrv
34 {
35  class DtOsgSegmentPickable;
36  class DtDe;
37  class DtCoordinateSystem;
38 
42  {
43  public:
45  {
49  FullExtrusion
50  };
51 
54 
57 
59  virtual void setStipplePattern(unsigned int, int repeatFactor);
60 
62  virtual void getStipplePattern(unsigned int&, int&);
63 
65  virtual void setColor(const osg::Vec4&);
66 
68  virtual void getColor(float& r, float& g, float& b, float& a);
69 
71  virtual void setPoints(const DtVector& start, const DtVector& end);
72  virtual void updatePoints(const DtVector&, const DtVector&);
73 
75  virtual void setTextureHeight(double height);
76 
78  virtual void setTextureWidth(double width);
79 
81  virtual void setTexture(osg::Texture* texture);
82 
89 
91  virtual void setUpExtent(float height);
92 
94  virtual void setDownExtent(float height);
95 
97  virtual void setLeftExtent(float height);
98 
100  virtual void setRightExtent(float heigh);
102 
104  virtual void setWidth(float);
105 
107  virtual void setScribeWidth(float);
108 
111  virtual void setHeight(float);
112 
115  virtual void setLineWidth(float width);
116 
118  virtual void setScribed(bool b);
119 
122  virtual void setScribeColor(const osg::Vec4&);
123 
125  virtual void setOcclusionEnabled(bool enabled);
126 
128  virtual void setPickable(bool);
129 
131  bool pickable() const;
132 
134  osg::Node* rootNode();
135 
137  void setOrigin(const DtVector& origin);
138 
140  virtual void setSolid(bool);
141 
143  virtual void setEndArrow(bool);
144 
146  virtual bool endArrow() const;
147 
149  virtual void setStartArrow(bool);
150 
152  virtual bool startArrow() const;
153 
155  virtual void setArrowSize(double);
156 
158  virtual void setArrowStyle(vrvTacticalGraphicUtilities::ArrowStyle);
159 
163  virtual void setIsLastSegment(bool);
164  virtual bool isLastSegment() const;
165 
167  virtual void updateColors();
168 
169  protected:
171  virtual void updateMode();
172 
174  virtual void updateTextureCoordinates();
175 
177  virtual int addPointsForExtentExtrusion(const DtVector& point);
178 
181  virtual void setupScribeTransparency(bool b);
182 
184  virtual int addFaceForRotation(const osg::Quat& rotation, const DtVector& point);
185 
187  virtual int addPointsForFullExtrusion(const DtVector& from,
188  const DtVector& to);
189 
191  virtual void updateStippling();
192 
194  virtual void updateScribeLine();
195 
197  virtual bool frontAndBackFaceRendered() const;
198 
200  virtual void updatePointsForLineStrip();
201 
203  virtual void updatePointsForTriangleStrip();
204 
206  virtual void updatePointsForExtrusion();
207 
209  virtual void createFaces();
210 
212  virtual void updateScribeForTriangleStrip();
213 
215  virtual void updateScribeForExtrusion();
216 
218  virtual void updatePointsWithArrows();
219 
221  virtual void connectFaces(osg::DrawElementsUInt*, int startFace, int endFace) const;
222 
224  virtual void slot_coordinateSystemChanged();
225 
226  protected:
227  typedef std::vector<DtVector> PointVector;
228 
232 
236 
239 
243 
244  osg::Vec4 myColor;
245 
248 
249  float myUpExtent;
253 
257 
260  double myArrowSize;
262 
264 
265  bool myScribed;
266  bool mySolid;
268 
269  unsigned int myStipplePattern;
271 
273 
278 
279  osg::Vec4 myScribeColor;
281 
283 
285 
287 
290  DtCoordinateSystem* myCoordinateSystem = nullptr;
291 
292  };
293 }
Diagonal crossing liens.
Definition: DtTacticalGraphicUtilities.h:93
A prism controlled by control points.
Definition: DtExtrudedLineModelSegmentInstance.h:41
std::vector< DtVector > PointVector
Definition: DtExtrudedLineModelSegmentInstance.h:227
DtVector myStartPoint
Definition: DtExtrudedLineModelSegmentInstance.h:254
bool myScribeColorSet
Definition: DtExtrudedLineModelSegmentInstance.h:280
Draws a line with extruded width.
Definition: DtExtrudedLineModelSegmentInstance.h:48
osg::ref_ptr< osg::Texture > myTexture
Definition: DtExtrudedLineModelSegmentInstance.h:237
bool myScribeWidthSet
Definition: DtExtrudedLineModelSegmentInstance.h:267
Create a series of cylinders that can be used as pickable on lines that only have osg width...
Definition: DtOsgSegmentPickable.h:23
float myDownExtent
Definition: DtExtrudedLineModelSegmentInstance.h:250
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
Definition: DtExtrudedLineModelSegmentInstance.h:238
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
voidpf uLong int origin
Definition: ioapi.h:42
osg::Vec4 myColor
Definition: DtExtrudedLineModelSegmentInstance.h:244
DtSignalConnectionManager myConnections
Definition: DtExtrudedLineModelSegmentInstance.h:286
osg::ref_ptr< osg::Group > myMainTransform
Definition: DtExtrudedLineModelSegmentInstance.h:242
osg::ref_ptr< osg::Geometry > myScribeGeometry
Definition: DtExtrudedLineModelSegmentInstance.h:234
vrvTacticalGraphicUtilities::ArrowStyle myArrowStyle
Definition: DtExtrudedLineModelSegmentInstance.h:261
bool myIsLastSegment
Definition: DtExtrudedLineModelSegmentInstance.h:282
Definition: DtExtrudedLineModelSegmentInstance.h:46
PointVector myDrawPoints
Definition: DtExtrudedLineModelSegmentInstance.h:263
osg::ref_ptr< osg::Geode > myShapeGeode
Definition: DtExtrudedLineModelSegmentInstance.h:229
Draws a line without width or height.
Definition: DtExtrudedLineModelSegmentInstance.h:47
DtOsgSegmentPickable * myPickable
If drawing as line use this pointer to create the pickable segments of that line, else geometry will ...
Definition: DtExtrudedLineModelSegmentInstance.h:276
unsigned int myStipplePattern
Definition: DtExtrudedLineModelSegmentInstance.h:269
DtDe & myDe
Definition: DtExtrudedLineModelSegmentInstance.h:284
osg::ref_ptr< osg::Geode > myScribeGeode
Definition: DtExtrudedLineModelSegmentInstance.h:233
Contains makVrv::DtOsgModelInstance class.
osg::ref_ptr< osg::LineWidth > myScribeWidth
Definition: DtExtrudedLineModelSegmentInstance.h:241
osg::ref_ptr< osg::LineWidth > myLineWidth
Definition: DtExtrudedLineModelSegmentInstance.h:240
double myTextureHeight
Definition: DtExtrudedLineModelSegmentInstance.h:247
bool myScribed
Definition: DtExtrudedLineModelSegmentInstance.h:265
double myTextureWidth
Definition: DtExtrudedLineModelSegmentInstance.h:246
float myRightExtent
Definition: DtExtrudedLineModelSegmentInstance.h:252
ArrowStyle
Definition: DtTacticalGraphicUtilities.h:43
LineExtrusionMode
Definition: DtExtrudedLineModelSegmentInstance.h:44
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
double myArrowSize
Definition: DtExtrudedLineModelSegmentInstance.h:260
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
DtVector myOrigin
Definition: DtExtrudedLineModelSegmentInstance.h:256
bool myIsPickable
Definition: DtExtrudedLineModelSegmentInstance.h:277
Base class to provide boost signal/slot management.
Contains DLL export macros.
bool myEndArrow
Definition: DtExtrudedLineModelSegmentInstance.h:259
osg::ref_ptr< osg::Vec3Array > myScribePoints
Definition: DtExtrudedLineModelSegmentInstance.h:235
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
int myRepeatFactor
Definition: DtExtrudedLineModelSegmentInstance.h:270
float myLeftExtent
Definition: DtExtrudedLineModelSegmentInstance.h:251
osg::ref_ptr< osg::Vec3Array > myShapePoints
Definition: DtExtrudedLineModelSegmentInstance.h:231
osg::ref_ptr< osg::Geometry > myShapeGeometry
Definition: DtExtrudedLineModelSegmentInstance.h:230
bool mySolid
Definition: DtExtrudedLineModelSegmentInstance.h:266
float myUpExtent
Definition: DtExtrudedLineModelSegmentInstance.h:249
DtVector myEndPoint
Definition: DtExtrudedLineModelSegmentInstance.h:255
LineExtrusionMode myMode
Definition: DtExtrudedLineModelSegmentInstance.h:272
osg::Vec4 myScribeColor
Definition: DtExtrudedLineModelSegmentInstance.h:279
bool myStartArrow
Definition: DtExtrudedLineModelSegmentInstance.h:258

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)