VR-Forces 4.1 Class Documentation
DtOsgOverlayDirectionLineModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 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  bool eventsEnabled() const;
63 
65  virtual void setPositionOffset(const DtVector&);
66 
68  virtual void setDirection( int index, const DtVector& direction );
69 
72  virtual void setLength( int index, float length );
73 
75  virtual void update();
76 
79  virtual bool realize(DtModelDefinition& definition);
80 
81 
82  protected:
84  virtual void createLineIfNecessary();
85 
87  virtual void updateAttributes();
88 
90  virtual void updateGeometry();
91 
93  virtual void set3DVertexPosition( unsigned int index, double x, double y, double z );
94 
95  protected:
96 
98  {
100  : direction()
101  , length(0.0f)
102  {
103  }
104 
106  float length;
107  };
108 
109 
110  DtVector myPoints[2];
111  DirectionAttributes myDirections[2];
112  unsigned int myModelSet;
114 
115  osg::Vec4 myColor;
116  float myWidth;
117  unsigned int myStipplePattern;
118 
123  unsigned long long myUserData;
124 
125 
127  };
128 }
129 
130 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)