VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOutlinedPolygon.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 
13 #include <vrvGraphics/DtPolygon.h>
14 
15 namespace makVrv
16 {
17 
18  class DtOverlayRenderer;
19  class DtWidgetPicker;
20  class DtLineSegmentInterface;
21  class DtPickableLine;
22 
26  {
27  public:
28 
31 
33  virtual ~DtOutlinedPolygon();
34 
39  virtual void setEventsEnabled(bool enabled,
40  unsigned long long userData = 0);
41 
43  bool eventsEnabled() const;
44 
47  virtual void setVertexCount(unsigned int vertexCount);
48 
50  virtual unsigned int vertexCount() const;
51 
54  virtual void set2DPositions(const std::vector<float>& vertices);
55 
57  virtual void set2DPosition(unsigned int vertexIndex, float x1, float y1);
58 
60  virtual void get2DPosition(unsigned int vertexIndex, float& x,
61  float& y) const;
62 
66  virtual void set3DPosition(unsigned int vertexIndex, float x, float y,
67  float z, float w);
68 
70  virtual void get3DPosition(unsigned int vertexIndex, float& x, float& y,
71  float& z, float& w) const;
72 
73  virtual void set3DDirectionAndLength(unsigned int index,
74  float x, float y, float z, float l);
75 
77  virtual void setVertexColor( unsigned int index, float r, float g,
78  float b, float a );
79 
81  virtual void getVertexColor( unsigned int index, float& r, float& g,
82  float& b, float& a );
83 
85  virtual void setColor( float r, float g, float b, float a );
86 
88  virtual void getColor( float& r, float& g, float& b, float& a ) const;
89 
97  void setStippleParameters(unsigned int scale,unsigned short pattern);
98 
103  virtual void setStipple(unsigned int stipplePattern);
104 
106  virtual void setOutlineWidth(float);
107 
111  virtual void setEventOutlineWidth(float);
112 
114  virtual int group() const;
115 
117  virtual void setGroup(int);
118 
120  virtual DtLineSegmentInterface* createAndInitNewSegment();
121 
122  protected:
123 
126  virtual void slot_pickerDestroyed();
127 
128  protected:
129 
130  typedef std::vector<DtLineSegmentInterface*> LineSegmentList;
131  typedef std::vector<DtPickableLine*> PickableSegmentList;
132 
138  unsigned long long myUserData;
139  unsigned short myStipplePattern;
140 
141  float myWidth;
143  int myGroup;
146  };
147 
148 }
int myGroup
Definition: DtOutlinedPolygon.h:143
float myWidth
Definition: DtOutlinedPolygon.h:141
std::vector< DtLineSegmentInterface * > LineSegmentList
Definition: DtOutlinedPolygon.h:130
Contains the makVrv::DtPolygon class declaration.
unsigned short myStipplePattern
Definition: DtOutlinedPolygon.h:139
DtWidgetPicker & myPicker
Definition: DtOutlinedPolygon.h:134
bool myPickerDestroyed
Definition: DtOutlinedPolygon.h:144
bool myEventsEnabled
Definition: DtOutlinedPolygon.h:137
A class which represents a single line segment.
Definition: DtLineSegmentInterface.h:16
PickableSegmentList myPickableSegments
Definition: DtOutlinedPolygon.h:136
DtOverlayRenderer & myRenderer
Definition: DtOutlinedPolygon.h:133
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
LineSegmentList myLineSegments
Definition: DtOutlinedPolygon.h:135
A convex polygon drawn using lines.
Definition: DtOutlinedPolygon.h:25
A variable vertex 2D polygon.
Definition: DtPolygon.h:19
float myEventWidth
Definition: DtOutlinedPolygon.h:142
bool myPickerConnected
Definition: DtOutlinedPolygon.h:145
std::vector< DtPickableLine * > PickableSegmentList
Definition: DtOutlinedPolygon.h:131
unsigned long long myUserData
Definition: DtOutlinedPolygon.h:138
The picker class which allocates and does picking operatings on widgets.
Definition: DtWidgetPicker.h:32
The DtOverlayRenderer implements the overlay concept.
Definition: DtOverlayRenderer.h:23

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)