VR-Forces 4.6 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 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)