VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTexturedOutlinedPolygon.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 
13 
15 
17 
18 namespace makVrv
19 {
20  class DtChannel;
21  class DtOverlayRendererInterface;
22  class DtTextureInterface;
23 
27  {
28  public:
29 
32 
34  DtTexturedOutlinedPolygon(DtDe& de, DtChannel* channel, DtModelSetId modelSet);
35 
37  virtual ~DtTexturedOutlinedPolygon();
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 
127  virtual void setTexture( DtTextureInterface* texture, float textureWidth) override;
128 
130  virtual void setZoomFactor(float z);
131 
133  virtual void setRotationOffset(float);
134 
135  protected:
136 
139  virtual void slot_pickerDestroyed();
140 
141  protected:
146 
147  typedef std::vector<DtLineSegmentInterface*> LineSegmentList;
148  typedef std::vector<DtPickableLine*> PickableSegmentList;
149 
155  unsigned long long myUserData;
156  unsigned short myStipplePattern;
157 
158  float myWidth;
160  int myGroup;
162  boost::signalslib::connection myPickerDestroyedConnection;
163  };
164 
166  {
167  public:
169  virtual DtTexturedOutlinedPolygonInterface* create(DtDe& de, DtChannel* channel, DtModelSetId modelSet) override;
170  };
171 }
float myZoomFactor
Definition: DtTexturedOutlinedPolygon.h:144
std::vector< DtLineSegmentInterface * > LineSegmentList
Definition: DtTexturedOutlinedPolygon.h:147
unsigned short myStipplePattern
Definition: DtTexturedOutlinedPolygon.h:156
boost::signalslib::connection myPickerDestroyedConnection
Definition: DtTexturedOutlinedPolygon.h:162
Definition: DtTexturedOutlinedPolygon.h:165
DtOverlayRendererInterface * myRenderer
Definition: DtTexturedOutlinedPolygon.h:150
unsigned long long myUserData
Definition: DtTexturedOutlinedPolygon.h:155
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
DtWidgetPicker * myPicker
Definition: DtTexturedOutlinedPolygon.h:151
float myRotationOffset
Definition: DtTexturedOutlinedPolygon.h:145
The abstract Channel Class.
Definition: DtChannel.h:35
An interface for a single line segment.
Definition: DtLineSegmentInterface.h:23
PickableSegmentList myPickableSegments
Definition: DtTexturedOutlinedPolygon.h:153
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
int myGroup
Definition: DtTexturedOutlinedPolygon.h:160
DtTextureInterface * myTexture
Definition: DtTexturedOutlinedPolygon.h:142
bool myPickerDestroyed
Definition: DtTexturedOutlinedPolygon.h:161
LineSegmentList myLineSegments
Definition: DtTexturedOutlinedPolygon.h:152
bool myEventsEnabled
Definition: DtTexturedOutlinedPolygon.h:154
Draw a polygonal line with a texture.
Definition: DtTexturedOutlinedPolygon.h:26
float myWidth
Definition: DtTexturedOutlinedPolygon.h:158
float myEventWidth
Definition: DtTexturedOutlinedPolygon.h:159
Contains the makVrv::DtOutlinedPolygon class declaration.
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:76
Draw a polygonal line with a texture.
Definition: DtTexturedOutlinedPolygonInterface.h:25
std::vector< DtPickableLine * > PickableSegmentList
Definition: DtTexturedOutlinedPolygon.h:148
Definition: DtTexturedOutlinedPolygonInterface.h:49
DtModelSetId
Definition: DtModelSetEnums.h:19
float myTextureWidth
Definition: DtTexturedOutlinedPolygon.h:143
The DtOverlayRendererInterface implements the overlay concept. An overlay is a 2D scene that is drawn...
Definition: DtOverlayRendererInterface.h:80
The picker class which allocates and does picking operations on widgets.
Definition: DtWidgetPicker.h:53

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)