VR-Forces Developer's Guide
 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) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 namespace makVrv
16 {
17 
18  class DtOverlayRendererInterface;
19  class DtWidgetPicker;
20  class DtLineSegmentInterface;
21  class DtPickableLine;
22  class DtChannel;
23 
27  {
28  public:
29 
32 
34  DtOutlinedPolygon(DtDe& de, DtChannel* channel, DtModelSetId modelSet);
35 
37  virtual ~DtOutlinedPolygon();
38 
43  virtual void setEventsEnabled(bool enabled,
44  unsigned long long userData = 0);
45 
47  bool eventsEnabled() const;
48 
51  virtual void setVertexCount(unsigned int vertexCount);
52 
54  virtual unsigned int vertexCount() const;
55 
58  virtual void set2DPositions(const std::vector<float>& vertices);
59 
61  virtual void set2DPosition(unsigned int vertexIndex, float x1, float y1);
62 
64  virtual void get2DPosition(unsigned int vertexIndex, float& x,
65  float& y) const;
66 
70  virtual void set3DPosition(unsigned int vertexIndex, float x, float y,
71  float z, float w);
72 
74  virtual void get3DPosition(unsigned int vertexIndex, float& x, float& y,
75  float& z, float& w) const;
76 
77  virtual void set3DDirectionAndLength(unsigned int index,
78  float x, float y, float z, float l);
79 
81  virtual void setVertexColor( unsigned int index, float r, float g,
82  float b, float a );
83 
85  virtual void getVertexColor( unsigned int index, float& r, float& g,
86  float& b, float& a );
87 
89  virtual void setColor( float r, float g, float b, float a );
90 
92  virtual void getColor( float& r, float& g, float& b, float& a ) const;
93 
101  void setStippleParameters(unsigned int scale,unsigned short pattern);
102 
107  virtual void setStipple(unsigned int stipplePattern);
108 
110  virtual void setOutlineWidth(float) override;
111 
115  virtual void setEventOutlineWidth(float);
116 
118  virtual int group() const;
119 
121  virtual void setGroup(int);
122 
124  virtual DtLineSegmentInterface* createAndInitNewSegment();
125  protected:
126 
129  virtual void slot_pickerDestroyed();
130 
131  protected:
132 
133  typedef std::vector<DtLineSegmentInterface*> LineSegmentList;
134  typedef std::vector<DtPickableLine*> PickableSegmentList;
135 
141  unsigned long long myUserData;
142  unsigned short myStipplePattern;
143 
144  float myWidth;
146  int myGroup;
148  boost::signalslib::connection myPickerDestroyedConnection;
149  };
150 
152  {
153  public:
155  virtual DtOutlinedPolygonInterface* create(DtDe& de, DtChannel* channel, DtModelSetId modelSet) override;
156  };
157 
158 }
A convex polygon drawn using lines.
Definition: DtOutlinedPolygonInterface.h:25
int myGroup
Definition: DtOutlinedPolygon.h:146
float myWidth
Definition: DtOutlinedPolygon.h:144
std::vector< DtLineSegmentInterface * > LineSegmentList
Definition: DtOutlinedPolygon.h:133
DtWidgetPicker * myPicker
Definition: DtOutlinedPolygon.h:137
Definition: DtOutlinedPolygonInterface.h:124
Definition: DtOutlinedPolygon.h:151
unsigned short myStipplePattern
Definition: DtOutlinedPolygon.h:142
Contains the makVrv::DtOutlinedPolygonInterface class declaration.
bool myPickerDestroyed
Definition: DtOutlinedPolygon.h:147
bool myEventsEnabled
Definition: DtOutlinedPolygon.h:140
The abstract Channel Class.
Definition: DtChannel.h:35
An interface for a single line segment.
Definition: DtLineSegmentInterface.h:23
PickableSegmentList myPickableSegments
Definition: DtOutlinedPolygon.h:139
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
LineSegmentList myLineSegments
Definition: DtOutlinedPolygon.h:138
A convex polygon drawn using lines.
Definition: DtOutlinedPolygon.h:26
float myEventWidth
Definition: DtOutlinedPolygon.h:145
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtModelSetId
Definition: DtModelSetEnums.h:19
std::vector< DtPickableLine * > PickableSegmentList
Definition: DtOutlinedPolygon.h:134
unsigned long long myUserData
Definition: DtOutlinedPolygon.h:141
DtOverlayRendererInterface * myRenderer
Definition: DtOutlinedPolygon.h:136
The DtOverlayRendererInterface implements the overlay concept. An overlay is a 2D scene that is drawn...
Definition: DtOverlayRendererInterface.h:80
boost::signalslib::connection myPickerDestroyedConnection
Definition: DtOutlinedPolygon.h:148
The picker class which allocates and does picking operations on widgets.
Definition: DtWidgetPicker.h:53

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)