VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStippledPrimitiveStyle.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 
14 
15 #include <matrix/vlVector.h>
16 
17 #include <vector>
18 #include <map>
19 
20 namespace makVrv
21 {
22 
23  class DtOverlayResourceProvider;
24  struct DtObserverRenderData;
25 
29  {
30  public:
31 
34  unsigned int vertexCount );
35 
37  virtual ~DtStippledPrimitiveStyle();
38 
40  virtual void add( unsigned int* );
41 
43  virtual void remove( unsigned int index );
44 
56  virtual void render(int mode, unsigned int groupCount, bool geocentric,
57  float geocentricAlpha, const double cameraLocation[3],
58  const DtObserverRenderData& observerRenderData,
59  const double positionMatrix[16], const double projectionMatrix[16],
60  const int viewport[4], int offset) override;
61 
63  virtual void update( int renderMode );
64 
65 
68 
70  virtual void set3DVertexPosition( unsigned int index, unsigned int vertex,
71  float x, float y, float z, float w = 0 );
72 
74  virtual void set3DVertexQuadPositions(unsigned int index,
75  float x, float y, float z, float w);
76 
78  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
79  float& x, float& y, float& z, float& w ) const;
80 
82  virtual void set2DVertexPosition( unsigned int index, unsigned int vertex,
83  float x, float y );
84 
86  virtual void get2DVertexPosition( unsigned int index, unsigned int vertex,
87  float& x, float& y ) const;
88 
90  virtual void set2DOffsetRotation( unsigned int index,
91  unsigned int vertIndex, float angle );
92 
94  virtual void get2DOffsetRotation( unsigned int index,
95  unsigned int vertIndex, float& angle ) const;
96 
98  virtual void setColor( unsigned int index, unsigned int vertIndex,
99  float r, float g, float b, float a );
100 
102  virtual void getColor( unsigned int index, unsigned int vertIndex,
103  float& r, float& g, float& b, float& a ) const;
104 
106  virtual void setUVCoordinates( unsigned int index,
107  unsigned int vertIndex, float u, float v );
108 
110  virtual void getUVCoordinates( unsigned int index,
111  unsigned int vertIndex, float& u, float& v ) const;
112 
120  virtual void projectUVCoordinates(unsigned int index, const DtVector& origin,
121  const DtVector& axisU, const DtVector& axisV, float scale) override;
122 
124 
125 
128 
132  virtual void setFillParameters( unsigned int index, unsigned int fullStipplePattern[32] = 0 ) override;
133 
137  virtual void getFillParameters( unsigned int index, unsigned int fullStipplePattern[32] = 0 ) const ;
138 
146  virtual void setFillPatternFrequency(unsigned int index, float frequency) override;
147 
150  virtual void setTextureHandle( unsigned int index, DtTextureInterface* newTextureHandle );
151 
154  virtual DtTextureInterface* findTextureHandle( unsigned int index ) const;
155 
159  virtual void setGroup( unsigned int index, float zFactor );
160 
163  virtual float group( unsigned int index ) const;
164 
168  virtual void setVisible( unsigned int index, bool visible );
169 
172  virtual bool visible (unsigned int index) const;
173 
175 
178  virtual void setIsNormalisedScreenCoordinates( bool isNormalisedScreenCoords ) override;
179  protected:
180 
182  virtual float* vertexData() const;
183 
185  virtual unsigned int vertexDataSize() const;
186 
187  protected:
188 
190  {
191  unsigned int group;
192  unsigned int* indexPtr;
193  unsigned int quadStipple[32];
194  bool visible;
195  };
196 
200  {
201  bool operator()( const StippledPrimitiveInfo& left, const StippledPrimitiveInfo& right )
202  {
203  return (left.group < right.group);
204  }
205  };
206 
209 
211  {
212  unsigned int key[32];
213  bool operator<(const StipplePattern& b) const;
214  };
215 
216  typedef std::vector<DtOffsetColoredVertex> VertexList;
217  typedef std::vector<StippledPrimitiveInfo> StippledPrimitiveInfoList;
218  typedef std::map< StipplePattern, std::vector<unsigned int> > StippleIndexMap;
219 
225 
227 
228  };
229 
230 }
unsigned int * indexPtr
Definition: DtStippledPrimitiveStyle.h:192
bool mySortDirty
Definition: DtStippledPrimitiveStyle.h:207
std::vector< StippledPrimitiveInfo > StippledPrimitiveInfoList
Definition: DtStippledPrimitiveStyle.h:217
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:25
voidpf uLong int origin
Definition: ioapi.h:42
StippleIndexMap myStippleIndexMap
Definition: DtStippledPrimitiveStyle.h:224
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:26
DtProjected2DFlatEffect * myEffect
Definition: DtStippledPrimitiveStyle.h:226
Definition: DtStippledPrimitiveStyle.h:189
bool visible
Definition: DtStippledPrimitiveStyle.h:194
DtOverlayResourceProvider & myResourceProvider
Definition: DtStippledPrimitiveStyle.h:220
The overlay resource provider class provides resources for overlay drawing classes.
Definition: DtOverlayResourceProvider.h:28
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
StippledPrimitiveInfoList mySortedStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:223
unsigned int group
Definition: DtStippledPrimitiveStyle.h:191
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Contains the makVrv::DtFlat2DRenderer class declaration.
Definition: DtStippledPrimitiveStyle.h:210
const char int mode
Definition: ioapi.h:38
std::map< StipplePattern, std::vector< unsigned int > > StippleIndexMap
Definition: DtStippledPrimitiveStyle.h:218
bool myIsNormalisedScreenCoords
Definition: DtStippledPrimitiveStyle.h:208
StippledPrimitiveInfoList myStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:222
An effect for rendering 2D flat colored quads.
Definition: DtProjected2DFlatEffect.h:19
voidpf uLong offset
Definition: ioapi.h:42
Definition: DtCommonRenderData.h:33
VertexList myStippleVertices
Definition: DtStippledPrimitiveStyle.h:221
bool operator()(const StippledPrimitiveInfo &left, const StippledPrimitiveInfo &right)
Definition: DtStippledPrimitiveStyle.h:201
A style for drawing quads with a stipple pattern.
Definition: DtStippledPrimitiveStyle.h:28
Contains the makVrv::DtPrimitiveStyle class declaration.
Sorts primitives by their group, used to make sure the indices are in the correct order...
Definition: DtStippledPrimitiveStyle.h:199
std::vector< DtOffsetColoredVertex > VertexList
Definition: DtStippledPrimitiveStyle.h:216

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)