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) 2023 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 
123  virtual void setVertexColor( unsigned int index, float r, float g, float b, float a );
124 
126  virtual void getVertexColor( unsigned int index, float& r, float& g, float& b, float& a );
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 
160  protected:
161 
164  virtual void slot_pickerDestroyed();
165 
166  protected:
167 
168  typedef std::vector<float> VertexList;
169  typedef std::vector<DtTriangleProxy*> TriangleProxyList;
170  typedef std::vector<DtPickableTriangle*> PickableTriangleList;
171 
176  boost::signalslib::connection myPickerDestroyedConnection;
177  unsigned long long myUserData;
180  float myCenterPoint[2];
181  double my3DCenterPoint[3];
184  unsigned int myFillParam;
186  unsigned int myFullStipplePattern[32];
188  int myGroup;
189  };
190 
192  {
193  public:
195  virtual DtFilledPolygonInterface* create(DtDe& de, DtChannel* channel, DtModelSetId modelSet) override;
196  };
197 }
198 
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygonInterface.h:26
unsigned int myFillParam
Definition: DtFilledPolygon.h:184
DtOverlayRendererInterface * myRenderer
Definition: DtFilledPolygon.h:172
Creator.
Definition: DtFilledPolygonInterface.h:168
voidpf uLong int origin
Definition: ioapi.h:42
unsigned long long myUserData
Definition: DtFilledPolygon.h:177
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
std::vector< float > VertexList
Definition: DtFilledPolygon.h:168
A variable vertex convex filled 2D polygon.
Definition: DtFilledPolygon.h:27
Contains the makVrv::DtFilledPolygonInterface class declaration.
TriangleProxyList myTriangles
Definition: DtFilledPolygon.h:182
DtWidgetPicker * myPicker
Definition: DtFilledPolygon.h:173
The abstract Channel Class.
Definition: DtChannel.h:35
boost::signalslib::connection myPickerDestroyedConnection
Definition: DtFilledPolygon.h:176
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
bool myPickerDestroyed
Definition: DtFilledPolygon.h:175
int myGroup
Definition: DtFilledPolygon.h:188
FillType
Definition: DtFilledPolygonInterface.h:30
std::vector< DtTriangleProxy * > TriangleProxyList
Definition: DtFilledPolygon.h:169
VertexList myVertices
Definition: DtFilledPolygon.h:178
DtTextureInterface * myFillTexture
Definition: DtFilledPolygon.h:185
std::vector< DtPickableTriangle * > PickableTriangleList
Definition: DtFilledPolygon.h:170
VertexList my3DVertices
Definition: DtFilledPolygon.h:179
PickableTriangleList myPickableTriangles
Definition: DtFilledPolygon.h:183
Definition: DtFilledPolygon.h:191
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
bool myEventsEnabled
Definition: DtFilledPolygon.h:174
FillType myFillType
Definition: DtFilledPolygon.h:187
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)