VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFilledPolygon.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2025 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
16 namespace makVrv
17 {
18  class DtChannel;
19  class DtOverlayRendererInterface;
20  class DtTriangleRenderer;
21  class DtTriangleProxy;
22  class DtWidgetPicker;
23  class DtPickableTriangle;
24 
28  {
29  public:
30 
33 
35  DtFilledPolygon(DtDe& de, DtChannel* channel, DtModelSetId modelSet);
36 
38  virtual ~DtFilledPolygon();
39 
43  virtual void setFillType(FillType type);
44 
46  virtual FillType fillType() const;
47 
51  virtual void setFillParameter( unsigned int param, unsigned int fullStipplePattern[32] = 0 ) override;
52 
55  virtual void setFillTexture(DtTextureInterface* textureHandle) override;
56 
58  virtual void clearFillPattern();
59 
61  virtual void getFillParameter( unsigned int& paramOut, unsigned int fullStipplePatternOut[32]) const override;
62 
68  virtual void setFillPatternFrequency(float frequency) override;
69 
74  virtual void setEventsEnabled(bool enabled, unsigned long long = 0);
75 
77  bool eventsEnabled() const;
78 
81  virtual void setVertexCount(unsigned int vertexCount);
82 
84  virtual unsigned int vertexCount() const;
85 
87  virtual void set2DPositions( const std::vector<float>& vertices );
88 
91  virtual void set2DPosition( unsigned int vertexIndex, float x, float y );
92 
94  virtual void set2DCentroidPosition( float x, float y );
95 
97  virtual void get2DPosition( unsigned int vertexIndex, float& x, float& y ) const;
98 
100  virtual void set3DPosition( unsigned int vertexIndex, float x, float y, float z, float w );
101 
103  virtual void set3DCentroidPosition( float x, float y, float z, float w );
104 
106  virtual void get3DPosition( unsigned int index, float& x, float& y, float& z, float& w ) const;
107 
108  void set3DDirectionAndLength( unsigned int index, float x, float y, float z, float l );
109 
116  virtual void projectUVCoordinates(const DtVector& origin,
117  const DtVector& axisU, const DtVector& axisV, float scale = 1.0f) override;
118 
120  virtual void setStipple( unsigned int stipplePattern );
121 
124  virtual void setVertexColor( unsigned int index, float r, float g, float b, float a ) override;
125  virtual void getVertexColor( unsigned int index, float& r, float& g, float& b, float& a ) override;
127 
129  virtual void setCentroidColor( float r, float g, float b, float a );
130 
132  virtual void setColor(float r, float g, float b, float a);
133 
135  virtual void getColor(float& r, float& g, float& b, float& a) const;
136 
138  virtual int group() const;
139 
141  virtual void setGroup(int);
142 
145  virtual void triangulate();
146 
153  virtual void set2DPositionsTriangles( const std::vector<float>& vertices );
154 
158  virtual void setVertexCountTriangles( unsigned int vertexCount );
159 
162  virtual void setIsNormalisedScreenCoordinates( bool isNormalisedScreenCoords ) override;
163  protected:
164 
167  virtual void slot_pickerDestroyed();
168 
169  protected:
170 
171  typedef std::vector<float> VertexList;
172  typedef std::vector<DtTriangleProxy*> TriangleProxyList;
173  typedef std::vector<DtPickableTriangle*> PickableTriangleList;
174 
180  boost::signalslib::connection myPickerDestroyedConnection;
181  unsigned long long myUserData;
184  float myCenterPoint[2];
185  double my3DCenterPoint[3];
188  unsigned int myFillParam;
190  unsigned int myFullStipplePattern[32];
192  int myGroup;
193  };
194 
196  {
197  public:
199  virtual DtFilledPolygonInterface* create(DtDe& de, DtChannel* channel, DtModelSetId modelSet) override;
200  };
201 }
202 
bool myIsNormalisedScreenCoords
Definition: DtFilledPolygon.h:179
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygonInterface.h:26
unsigned int myFillParam
Definition: DtFilledPolygon.h:188
DtOverlayRendererInterface * myRenderer
Definition: DtFilledPolygon.h:175
Creator.
Definition: DtFilledPolygonInterface.h:171
voidpf uLong int origin
Definition: ioapi.h:42
unsigned long long myUserData
Definition: DtFilledPolygon.h:181
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
std::vector< float > VertexList
Definition: DtFilledPolygon.h:171
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygon.h:27
Contains the makVrv::DtFilledPolygonInterface class declaration.
TriangleProxyList myTriangles
Definition: DtFilledPolygon.h:186
DtWidgetPicker * myPicker
Definition: DtFilledPolygon.h:176
The abstract Channel Class.
Definition: DtChannel.h:35
boost::signalslib::connection myPickerDestroyedConnection
Definition: DtFilledPolygon.h:180
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
bool myPickerDestroyed
Definition: DtFilledPolygon.h:178
int myGroup
Definition: DtFilledPolygon.h:192
FillType
Definition: DtFilledPolygonInterface.h:30
std::vector< DtTriangleProxy * > TriangleProxyList
Definition: DtFilledPolygon.h:172
VertexList myVertices
Definition: DtFilledPolygon.h:182
DtTextureInterface * myFillTexture
Definition: DtFilledPolygon.h:189
std::vector< DtPickableTriangle * > PickableTriangleList
Definition: DtFilledPolygon.h:173
VertexList my3DVertices
Definition: DtFilledPolygon.h:183
PickableTriangleList myPickableTriangles
Definition: DtFilledPolygon.h:187
Definition: DtFilledPolygon.h:195
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
DtModelSetId
Definition: DtModelSetEnums.h:19
bool myEventsEnabled
Definition: DtFilledPolygon.h:177
FillType myFillType
Definition: DtFilledPolygon.h:191
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)