VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtPrimitiveStyle.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <matrix/vlVector.h>
15 
16 namespace makVrv
17 {
18 
19  class DtBufferObject;
20  struct DtObserverRenderData;
21  class DtTextureInterface;
22 
26  {
27  public:
28 
30  DtPrimitiveStyle( unsigned int vertexCountPerPrimitive );
31 
33  virtual ~DtPrimitiveStyle();
34 
36  virtual void releaseResources();
37 
39  int numberOfPrimitives() const;
40 
42  virtual void add( unsigned int* indexToUpdate );
43 
45  virtual void remove( unsigned int index );
46 
58  virtual void render( int mode, unsigned int groupCount, bool geocentric,
59  float geocentricAlpha, const double cameraLocation[3],
60  const DtObserverRenderData& observerRenderData,
61  const double positionMatrix[16], const double projectionMatrix[16],
62  const int viewport[4], int offset) = 0;
63 
65  virtual void update( int renderMode );
66 
67 
70 
72  virtual void set3DVertexPosition( unsigned int index, unsigned int vertIndex,
73  float x, float y, float z, float w ) = 0;
74 
76  virtual void set3DVertexQuadPositions(unsigned int index,
77  float x, float y, float z, float w) = 0;
78 
80  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
81  float& x, float& y, float& z, float& w ) const = 0;
82 
84  virtual void set2DVertexPosition( unsigned int index, unsigned int vertIndex,
85  float x, float y ) = 0;
86 
88  virtual void get2DVertexPosition( unsigned int index, unsigned int vertIndex,
89  float& x, float& y ) const = 0;
90 
92  virtual void set2DOffsetRotation( unsigned int index, unsigned int vertIndex, float angle ) = 0;
93 
95  virtual void get2DOffsetRotation( unsigned int index, unsigned int vertIndex, float& angle ) const = 0;
96 
98  virtual void setColor( unsigned int index, unsigned int vertIndex, float r, float g, float b, float a ) = 0;
99 
101  virtual void getColor( unsigned int index, unsigned int vertIndex, float& r, float& g, float& b, float& a ) const = 0;
102 
104  virtual void setUVCoordinates( unsigned int index, unsigned int vertIndex, float u, float v ) = 0;
105 
107  virtual void getUVCoordinates( unsigned int index, unsigned int vertIndex, float& u, float& v ) const = 0;
108 
116  virtual void projectUVCoordinates(unsigned int index, const DtVector& origin,
117  const DtVector& axisU, const DtVector& axisV, float scale) = 0;
118 
127  virtual void setFadeFlags(unsigned int /*index*/, unsigned int /*vertIndex*/, float /*flags*/) {}
128 
130 
131 
134 
138  virtual void setFillParameters( unsigned int index,
139  unsigned int fullStipplePattern[32] = 0 ) = 0;
140 
144  virtual void getFillParameters( unsigned int index,
145  unsigned int fullStipplePattern[32] = 0 ) const = 0;
146 
154  virtual void setFillPatternFrequency(unsigned int index, float frequency) = 0;
155 
157  virtual void setTextureHandle( unsigned int index, DtTextureInterface* newTextureHandle ) = 0;
158 
160  virtual DtTextureInterface* findTextureHandle( unsigned int index ) const = 0;
161 
165  virtual void setGroup( unsigned int index, float zFactor ) = 0;
166 
169  virtual float group( unsigned int index ) const = 0;
170 
174  virtual void setVisible( unsigned int index, bool visible ) = 0;
175 
178  virtual bool visible (unsigned int index) const = 0;
179 
181 
182 
184  virtual float* vertexData() const = 0;
185 
187  virtual unsigned int vertexDataSize() const = 0;
188 
191  inline unsigned int vertexCount() const
192  {
193  return myVertexCount;
194  };
195 
198  virtual void setIsNormalisedScreenCoordinates( bool isNormalisedScreenCoords );
199  protected:
200 
202 
203  unsigned int myVertexCount;
204 
205  typedef std::vector<unsigned int*> IndexList;
207 
208  };
209 
210 }
unsigned int vertexCount() const
Get the number of vertices per primitive. inlined to speed up PVD icons.
Definition: DtPrimitiveStyle.h:191
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:25
voidpf uLong int origin
Definition: ioapi.h:42
A class the wraps a OpenGL Array Buffer object.
Definition: DtBufferObject.h:17
Interface for a texture. Used to pass in a texture to vrvGraphics.
Definition: DtTextureInterface.h:26
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
std::vector< unsigned int * > IndexList
Definition: DtPrimitiveStyle.h:205
virtual void setFadeFlags(unsigned int, unsigned int, float)
Sets the symbol-decoration fade flag for the vertex. Encodes a single-bit value in a float: 0...
Definition: DtPrimitiveStyle.h:127
IndexList myProxyIndices
Definition: DtPrimitiveStyle.h:206
const char int mode
Definition: ioapi.h:38
DtBufferObject * myBufferObject
Definition: DtPrimitiveStyle.h:201
unsigned int myVertexCount
Definition: DtPrimitiveStyle.h:203
voidpf uLong offset
Definition: ioapi.h:42
Definition: DtCommonRenderData.h:33

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)