VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgOverlayDirectionLineModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
15 namespace makVrv
16 {
17  class DtLineSegment;
18 
22  : public DtOsgModelInstance
23  {
24  public:
25 
28 
31 
33  virtual void setVisible(bool);
34 
36  virtual void setModelSet( int modelSet );
37 
44  virtual void addPoint(const DtVector& position, int index = -1);
45 
47  virtual void setPosition(int index, const DtVector& position);
48 
50  virtual void setStipplePattern(unsigned int stipple);
51 
53  virtual void setColor(float r, float g, float b, float a);
54 
56  virtual void setWidth(float width);
57 
59  virtual void setEventsEnabled(bool, unsigned long long userData);
60 
62  virtual const std::vector<DtVector>& points() const;
63 
65  bool eventsEnabled() const;
66 
68  virtual void setPositionOffset(const DtVector&);
69 
71  virtual void setDirection( int index, const DtVector& direction );
72 
75  virtual void setLength( int index, float length );
76 
78  virtual void update();
79 
82  virtual void setGroup( int );
83 
86  virtual bool realize(DtModelDefinition& definition);
87 
88 
89  protected:
91  virtual void createLineIfNecessary();
92 
94  virtual void updateAttributes();
95 
97  virtual void updateGeometry();
98 
100  virtual void set3DVertexPosition( unsigned int index, double x, double y, double z );
101 
102  protected:
103 
105  {
107  : direction()
108  , length(0.0f)
109  {
110  }
111 
113  float length;
114  };
115 
116  std::vector<DtVector> myPoints;
117  DirectionAttributes myDirections[2];
118  unsigned int myModelSet;
120 
121  osg::Vec4 myColor;
122  float myWidth;
123  unsigned int myStipplePattern;
124 
129  unsigned long long myUserData;
130 
132  int myGroup;
133  };
134 }
135 
136 
Model instance to draw a 2D line with styleable segments.
Definition: DtOsgOverlayDirectionLineModelInstance.h:21
DtLineSegment * myLine
Definition: DtOsgOverlayDirectionLineModelInstance.h:119
unsigned int myModelSet
Definition: DtOsgOverlayDirectionLineModelInstance.h:118
DtVector myPositionOffset
Definition: DtOsgOverlayDirectionLineModelInstance.h:131
DtVector direction
Definition: DtOsgOverlayDirectionLineModelInstance.h:112
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::Vec4 myColor
Definition: DtOsgOverlayDirectionLineModelInstance.h:121
bool myVisibleFlag
Definition: DtOsgOverlayDirectionLineModelInstance.h:128
bool myAttributesDirty
Definition: DtOsgOverlayDirectionLineModelInstance.h:126
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:33
Contains makVrv::DtOsgModelInstance class.
std::vector< DtVector > myPoints
Definition: DtOsgOverlayDirectionLineModelInstance.h:116
bool myEventsEnabled
Definition: DtOsgOverlayDirectionLineModelInstance.h:127
float myWidth
Definition: DtOsgOverlayDirectionLineModelInstance.h:122
A class which represents a single line segment.
Definition: DtLineSegment.h:21
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
DirectionAttributes()
Definition: DtOsgOverlayDirectionLineModelInstance.h:106
unsigned long long myUserData
Definition: DtOsgOverlayDirectionLineModelInstance.h:129
bool myGeometryDirty
Definition: DtOsgOverlayDirectionLineModelInstance.h:125
unsigned int myStipplePattern
Definition: DtOsgOverlayDirectionLineModelInstance.h:123
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
float length
Definition: DtOsgOverlayDirectionLineModelInstance.h:113
Definition: DtOsgOverlayDirectionLineModelInstance.h:104
int myGroup
Definition: DtOsgOverlayDirectionLineModelInstance.h:132

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)