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 
47  virtual void render(int mode, unsigned int groupCount, bool geocentric,
48  float geocentricAlpha, const double cameraLocation[3],
49  const DtObserverRenderData& observerRenderData,
50  const double positionMatrix[16], const double projectionMatrix[16],
51  const int viewport[4], int offset) override;
52 
54  virtual void update( int renderMode );
55 
56 
59 
61  virtual void set3DVertexPosition( unsigned int index, unsigned int vertex,
62  float x, float y, float z, float w = 0 );
63 
65  virtual void set3DVertexQuadPositions(unsigned int index,
66  float x, float y, float z, float w);
67 
69  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
70  float& x, float& y, float& z, float& w ) const;
71 
73  virtual void set2DVertexPosition( unsigned int index, unsigned int vertex,
74  float x, float y );
75 
77  virtual void get2DVertexPosition( unsigned int index, unsigned int vertex,
78  float& x, float& y ) const;
79 
81  virtual void set2DOffsetRotation( unsigned int index,
82  unsigned int vertIndex, float angle );
83 
85  virtual void get2DOffsetRotation( unsigned int index,
86  unsigned int vertIndex, float& angle ) const;
87 
89  virtual void setColor( unsigned int index, unsigned int vertIndex,
90  float r, float g, float b, float a );
91 
93  virtual void getColor( unsigned int index, unsigned int vertIndex,
94  float& r, float& g, float& b, float& a ) const;
95 
97  virtual void setUVCoordinates( unsigned int index,
98  unsigned int vertIndex, float u, float v );
99 
101  virtual void getUVCoordinates( unsigned int index,
102  unsigned int vertIndex, float& u, float& v ) const;
103 
110  virtual void projectUVCoordinates(unsigned int index, const DtVector& origin,
111  const DtVector& axisU, const DtVector& axisV, float scale) override;
112 
114 
115 
118 
121  virtual void setFillParameters( unsigned int index, unsigned int fullStipplePattern[32] = 0 ) override;
122 
125  virtual void getFillParameters( unsigned int index, unsigned int fullStipplePattern[32] = 0 ) const ;
126 
134  virtual void setFillPatternFrequency(unsigned int index, float frequency) override;
135 
138  virtual void setTextureHandle( unsigned int index, DtTextureInterface* newTextureHandle );
139 
142  virtual DtTextureInterface* findTextureHandle( unsigned int index ) const;
143 
146  virtual void setGroup( unsigned int index, float zFactor );
147 
150  virtual float group( unsigned int index ) const;
151 
154  virtual void setVisible( unsigned int index, bool visible );
155 
158  virtual bool visible (unsigned int index) const;
159 
161 
164  virtual void setIsNormalisedScreenCoordinates( bool isNormalisedScreenCoords ) override;
165  protected:
166 
168  virtual float* vertexData() const;
169 
171  virtual unsigned int vertexDataSize() const;
172 
173  protected:
174 
176  {
177  unsigned int group;
178  unsigned int* indexPtr;
179  unsigned int quadStipple[32];
180  bool visible;
181  };
182 
186  {
187  bool operator()( const StippledPrimitiveInfo& left, const StippledPrimitiveInfo& right )
188  {
189  return (left.group < right.group);
190  }
191  };
192 
195 
197  {
198  unsigned int key[32];
199  bool operator<(const StipplePattern& b) const;
200  };
201 
202  typedef std::vector<DtOffsetColoredVertex> VertexList;
203  typedef std::vector<StippledPrimitiveInfo> StippledPrimitiveInfoList;
204  typedef std::map< StipplePattern, std::vector<unsigned int> > StippleIndexMap;
205 
211 
213 
214  };
215 
216 }
unsigned int * indexPtr
Definition: DtStippledPrimitiveStyle.h:178
bool mySortDirty
Definition: DtStippledPrimitiveStyle.h:193
std::vector< StippledPrimitiveInfo > StippledPrimitiveInfoList
Definition: DtStippledPrimitiveStyle.h:203
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:210
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:24
DtProjected2DFlatEffect * myEffect
Definition: DtStippledPrimitiveStyle.h:212
Definition: DtStippledPrimitiveStyle.h:175
bool visible
Definition: DtStippledPrimitiveStyle.h:180
DtOverlayResourceProvider & myResourceProvider
Definition: DtStippledPrimitiveStyle.h:206
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:209
unsigned int group
Definition: DtStippledPrimitiveStyle.h:177
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Contains the makVrv::DtFlat2DRenderer class declaration.
Definition: DtStippledPrimitiveStyle.h:196
const char int mode
Definition: ioapi.h:38
std::map< StipplePattern, std::vector< unsigned int > > StippleIndexMap
Definition: DtStippledPrimitiveStyle.h:204
bool myIsNormalisedScreenCoords
Definition: DtStippledPrimitiveStyle.h:194
StippledPrimitiveInfoList myStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:208
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:207
bool operator()(const StippledPrimitiveInfo &left, const StippledPrimitiveInfo &right)
Definition: DtStippledPrimitiveStyle.h:187
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:185
std::vector< DtOffsetColoredVertex > VertexList
Definition: DtStippledPrimitiveStyle.h:202

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)