VR-Vantage API Documentation
DtLineSegment.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
6 
7 #pragma once
10 
11 namespace makVrv
12 {
13  class DtLineSegmentProxy;
14  class DtLineRenderer;
15  class DtOverlayRenderer;
16 
20  {
21  public:
22 
23  const static unsigned short NoStipple = 0xFFFF;
24  const static unsigned short NoLine = 0x0;
25 
28 
30  DtLineSegment(DtLineRenderer& renderer);
31 
33  virtual ~DtLineSegment();
34 
39  void setGroup(float group);
40 
42  int group() const;
43 
45  void set2DPositions(float x1, float y1,float x2, float y2);
46 
48  void set2DPosition(unsigned int index0or1, float x, float y);
49 
50  //Set the position of the vertex.
51  void get2DPosition(unsigned int index0or1, float& x, float& y ) const;
52 
54  void setColors(float r1, float g1, float b1, float a1,
55  float r2, float g2, float b2, float a2);
56 
59  void set3DPosition(int index0or1,float dx, float dy, float z, float w);
60 
61  //Get the 3D position of the line.
62  void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const;
63 
65  virtual void set3DDirection(unsigned int index0or1, float x, float y, float z);
66 
68  virtual void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const;
69 
71  virtual void setDirection2DLength(unsigned int index0or1, float length);
72 
74  virtual float direction2DLength(unsigned int index0or1) const;
75 
76  //Set the vertex color.
77  void setColor(unsigned int index0or1,float r, float g, float b, float a);
78 
79  //Get the vertex color.
80  void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const;
81 
82  //Set the first vertex color.
83  void setColor1(float r1, float g1, float b1, float a1);
84 
85  //Set the second vertex color.
86  void setColor2(float r2, float g2, float b2, float a2);
87 
88  //Set the line color.
89  inline void setColor(float r, float g, float b, float a)
90  {
91  setColors(r,g,b,a,r,g,b,a);
92  }
93 
96  void setWidth(float w);
97 
99  float width() const;
100 
107  void setStippleParameters(unsigned int scale,unsigned short pattern);
108 
111  void getStippleParameters(unsigned int& scale, unsigned short& pattern) const;
112 
113  private:
114 
116  DtLineSegment& operator=(const DtLineSegment&);
117 
118  private:
120 
121  protected:
122  DtLineSegment() : myProxy(0) {}
123  };
124 
125 }


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)