VR-Forces 4.10 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) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
12 
13 namespace makVrv
14 {
15  class DtLineSegmentProxy;
16  class DtLineRenderer;
17  class DtOverlayRenderer;
18 
22  {
23  public:
24 
25  const static unsigned short NoStipple = 0xFFFF;
26  const static unsigned short NoLine = 0x0;
27 
30 
32  DtLineSegment(DtLineRenderer& renderer);
33 
35  virtual ~DtLineSegment();
36 
41  void setGroup(float group);
42 
44  int group() const;
45 
47  void set2DPositions(float x1, float y1,float x2, float y2);
48 
50  void set2DPosition(unsigned int index0or1, float x, float y);
51 
52  //Set the position of the vertex.
53  void get2DPosition(unsigned int index0or1, float& x, float& y ) const;
54 
56  void setColors(float r1, float g1, float b1, float a1,
57  float r2, float g2, float b2, float a2);
58 
61  void set3DPosition(int index0or1,float dx, float dy, float z, float w);
62 
63  //Get the 3D position of the line.
64  void get3DPosition(int index0or1,float& dx, float& dy, float& z, float& w) const;
65 
67  virtual void set3DDirection(unsigned int index0or1, float x, float y, float z);
68 
70  virtual void get3DDirection(unsigned int index0or1, float& x, float& y, float& z) const;
71 
73  virtual void setDirection2DLength(unsigned int index0or1, float length);
74 
76  virtual float direction2DLength(unsigned int index0or1) const;
77 
78  //Set the vertex color.
79  void setColor(unsigned int index0or1,float r, float g, float b, float a);
80 
81  //Get the vertex color.
82  void getColor(unsigned int index0or1,float& r, float& g, float& b, float& a) const;
83 
84  //Set the first vertex color.
85  void setColor1(float r1, float g1, float b1, float a1);
86 
87  //Set the second vertex color.
88  void setColor2(float r2, float g2, float b2, float a2);
89 
90  //Set the line color.
91  inline void setColor(float r, float g, float b, float a)
92  {
93  setColors(r,g,b,a,r,g,b,a);
94  }
95 
98  void setWidth(float w);
99 
101  float width() const;
102 
109  void setStippleParameters(unsigned int scale,unsigned short pattern);
110 
113  void getStippleParameters(unsigned int& scale, unsigned short& pattern) const;
114 
115  private:
116 
118  DtLineSegment() : myProxy(0) {}
119  DtLineSegment& operator=(const DtLineSegment&);
120 
121  protected:
123  };
124 
125 }
void setColor(float r, float g, float b, float a)
Definition: DtLineSegment.h:91
A line segment proxy is a flyweight class for controlling a single line segment.
Definition: DtLineRenderer.h:132
A class which represents a single line segment.
Definition: DtLineSegmentInterface.h:16
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
A class which represents a single line segment.
Definition: DtLineSegment.h:21
DtLineSegmentProxy * myProxy
Definition: DtLineSegment.h:122
DtLineSegment()
Definition: DtLineSegment.h:118
A class responsible for rendering lines.
Definition: DtLineRenderer.h:25
The DtOverlayRenderer implements the overlay concept.
Definition: DtOverlayRenderer.h:23

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)