VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSegmentedLine.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 
16 namespace makVrv
17 {
18 
19  class DtOverlayRendererInterface;
20  class DtWidgetPicker;
21  class DtLineSegmentInterface;
22  class DtPickableLine;
23  class DtDe;
24  class DtChannel;
25 
29  {
30  public:
31 
33  DtSegmentedLine( DtDe& de, DtChannel* channel, DtModelSetId modelSet );
34 
37 
39  virtual ~DtSegmentedLine();
40 
42  DtSegmentedLine() = delete;
43 
45  DtSegmentedLine( const DtSegmentedLine& ) = delete;
46 
48  DtSegmentedLine& operator=( const DtSegmentedLine& ) = delete;
49 
50  public:
51 
56  virtual void setEventsEnabled(bool enabled, unsigned long long userData = 0) override;
57 
59  virtual bool eventsEnabled() const override;
60 
65  virtual void setVertexCount(unsigned int vertexCount) override;
66 
69  virtual unsigned int vertexCount() const override;
70 
72  virtual unsigned int segmentCount() const override;
73 
75  virtual void set2DPosition(unsigned int vertexIndex, float x1, float y1) override;
76 
78  virtual void get2DPosition(unsigned int vertexIndex, float& x, float& y) const override;
79 
83  virtual void set3DPosition(unsigned int vertexIndex, float x, float y, float z, float w) override;
84 
86  virtual void get3DPosition(unsigned int vertexIndex, float& x, float& y, float& z, float& w) const override;
87 
89  virtual void set3DDirection(unsigned int vertexIndex, float x, float y, float z) override;
90 
92  virtual void get3DDirection(unsigned int vertexIndex, float& x, float& y, float& z) const override;
93 
95  virtual void setDirection2DLength(unsigned int vertexIndex, float length) override;
96 
98  virtual float direction2DLength(unsigned int vertexIndex) const override;
99 
101  virtual void setSegmentColor(unsigned int segment, float r, float g, float b, float a) override;
102 
104  virtual void setPointColor(unsigned int point, float r, float g, float b, float a) override;
105 
107  virtual void setStipplePattern( unsigned int segment, unsigned int pattern ) override;
108  virtual void setStipplePattern( unsigned int segment, unsigned int scale, unsigned int pattern ) override;
109 
111  virtual void setWidth(unsigned int segment, float w) override;
112 
116  virtual void setEventWidth(float) override;
117 
120  virtual void setGroup( int ) override;
121 
126  virtual void setTexture( DtTextureInterface* texture ) override;
127 
131  virtual void setZoomFactor( float z ) override;
132 
135  virtual void setRotationOffset( float ) override;
137 
138  protected:
140  virtual DtLineSegmentInterface* createAndInitNewSegment();
141 
143  virtual void removeLineSegmentsUntilEndFrom(int segmentCount);
144 
146  virtual void setLineSegment(int, DtLineSegmentInterface*);
147 
150  virtual void slot_pickerDestroyed();
151 
152  protected:
153 
154  using LineSegmentList = std::vector<DtLineSegmentInterface*>;
155  using PickableSegmentList = std::vector<DtPickableLine*>;
156 
162  unsigned int myVertexCount;
163  unsigned long long myUserData;
165 
167  boost::signalslib::connection myPickerDestroyedConnection;
168  int myGroup;
169  };
170 
172  {
173  public:
175  virtual DtSegmentedLineInterface* create( DtDe& de, DtChannel* channel, DtModelSetId modelSet ) override;
176  };
177 }
std::vector< DtLineSegmentInterface * > LineSegmentList
Definition: DtSegmentedLine.h:154
DtWidgetPicker * myPicker
Definition: DtSegmentedLine.h:158
double length(const dvec3 &theVec)
Definition: DtVecUtils.h:20
Contains the makVrv::DtSegmentedLineInterface class declaration.
unsigned long long myUserData
Definition: DtSegmentedLine.h:163
DtOverlayRendererInterface * myRenderer
Definition: DtSegmentedLine.h:157
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:26
float myEventWidth
Definition: DtSegmentedLine.h:164
boost::signalslib::connection myPickerDestroyedConnection
Definition: DtSegmentedLine.h:167
Definition: DtSegmentedLineInterface.h:127
An interface for a convex polygon drawn using lines.
Definition: DtSegmentedLineInterface.h:25
The abstract Channel Class.
Definition: DtChannel.h:35
An interface for a single line segment.
Definition: DtLineSegmentInterface.h:23
Definition: DtSegmentedLine.h:171
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
bool myPickerDestroyed
Definition: DtSegmentedLine.h:166
unsigned int myVertexCount
Definition: DtSegmentedLine.h:162
std::vector< DtPickableLine * > PickableSegmentList
Definition: DtSegmentedLine.h:155
bool myEventsEnabled
Definition: DtSegmentedLine.h:161
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
A convex polygon drawn using lines.
Definition: DtSegmentedLine.h:28
DtModelSetId
Definition: DtModelSetEnums.h:19
The DtOverlayRendererInterface implements the overlay concept. An overlay is a 2D scene that is drawn...
Definition: DtOverlayRendererInterface.h:80
int myGroup
Definition: DtSegmentedLine.h:168
PickableSegmentList myPickableSegments
Definition: DtSegmentedLine.h:160
LineSegmentList myLineSegments
Definition: DtSegmentedLine.h:159
The picker class which allocates and does picking operations on widgets.
Definition: DtWidgetPicker.h:53

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)