VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
9 
10 namespace makVrv
11 {
12  class DtLineSegmentProxy;
13  class DtLineRenderer;
14  class DtOverlayRenderer;
15 
19  {
20  public:
21 
22  const static unsigned short NoStipple = 0xFFFF;
23  const static unsigned short NoLine = 0x0;
24 
27 
29  DtLineSegment(DtLineRenderer& renderer);
30 
32  virtual ~DtLineSegment();
33 
38  void setGroup(float group);
39 
41  int group() const;
42 
44  void set2DPositions(float x1, float y1,float x2, float y2);
45 
47  void set2DPosition(unsigned int index0or1, float x, float y);
48 
49  //Set the position of the vertex.
50  void get2DPosition(unsigned int index0or1, float& x, float& y ) const;
51 
53  void setColors(float r1, float g1, float b1, float a1,
54  float r2, float g2, float b2, float a2);
55 
58  void set3DPosition(int index0or1,float dx, float dy, float z, float w);
59 
60  //Get the 3D position of the line.
61  void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const;
62 
64  virtual void set3DDirection(unsigned int index0or1, float x, float y, float z);
65 
67  virtual void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const;
68 
70  virtual void setDirection2DLength(unsigned int index0or1, float length);
71 
73  virtual float direction2DLength(unsigned int index0or1) const;
74 
75  //Set the vertex color.
76  void setColor(unsigned int index0or1,float r, float g, float b, float a);
77 
78  //Get the vertex color.
79  void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const;
80 
81  //Set the first vertex color.
82  void setColor1(float r1, float g1, float b1, float a1);
83 
84  //Set the second vertex color.
85  void setColor2(float r2, float g2, float b2, float a2);
86 
87  //Set the line color.
88  inline void setColor(float r, float g, float b, float a)
89  {
90  setColors(r,g,b,a,r,g,b,a);
91  }
92 
95  void setWidth(float w);
96 
98  float width() const;
99 
106  void setStippleParameters(unsigned int scale,unsigned short pattern);
107 
110  void getStippleParameters(unsigned int& scale, unsigned short& pattern) const;
111 
112  private:
113 
115  DtLineSegment& operator=(const DtLineSegment&);
116 
117  private:
119 
120  protected:
121  DtLineSegment() : myProxy(0) {}
122  };
123 
124 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)