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) 2023 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 
49  virtual void render( int mode, unsigned int groupCount, bool geocentric,
50  float geocentricAlpha, const double cameraLocation[3],
51  const DtObserverRenderData& observerRenderData,
52  const double positionMatrix[16], const double projectionMatrix[16],
53  const int viewport[4], int offset) = 0;
54 
56  virtual void update( int renderMode );
57 
58 
61 
63  virtual void set3DVertexPosition( unsigned int index, unsigned int vertIndex,
64  float x, float y, float z, float w ) = 0;
65 
67  virtual void set3DVertexQuadPositions(unsigned int index,
68  float x, float y, float z, float w) = 0;
69 
71  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
72  float& x, float& y, float& z, float& w ) const = 0;
73 
75  virtual void set2DVertexPosition( unsigned int index, unsigned int vertIndex,
76  float x, float y ) = 0;
77 
79  virtual void get2DVertexPosition( unsigned int index, unsigned int vertIndex,
80  float& x, float& y ) const = 0;
81 
83  virtual void set2DOffsetRotation( unsigned int index, unsigned int vertIndex, float angle ) = 0;
84 
86  virtual void get2DOffsetRotation( unsigned int index, unsigned int vertIndex, float& angle ) const = 0;
87 
89  virtual void setColor( unsigned int index, unsigned int vertIndex, float r, float g, float b, float a ) = 0;
90 
92  virtual void getColor( unsigned int index, unsigned int vertIndex, float& r, float& g, float& b, float& a ) const = 0;
93 
95  virtual void setUVCoordinates( unsigned int index, unsigned int vertIndex, float u, float v ) = 0;
96 
98  virtual void getUVCoordinates( unsigned int index, unsigned int vertIndex, float& u, float& v ) const = 0;
99 
106  virtual void projectUVCoordinates(unsigned int index, const DtVector& origin,
107  const DtVector& axisU, const DtVector& axisV, float scale) = 0;
108 
110 
111 
114 
117  virtual void setFillParameters( unsigned int index,
118  unsigned int fullStipplePattern[32] = 0 ) = 0;
119 
122  virtual void getFillParameters( unsigned int index,
123  unsigned int fullStipplePattern[32] = 0 ) const = 0;
124 
132  virtual void setFillPatternFrequency(unsigned int index, float frequency) = 0;
133 
135  virtual void setTextureHandle( unsigned int index, DtTextureInterface* newTextureHandle ) = 0;
136 
138  virtual DtTextureInterface* findTextureHandle( unsigned int index ) const = 0;
139 
142  virtual void setGroup( unsigned int index, float zFactor ) = 0;
143 
146  virtual float group( unsigned int index ) const = 0;
147 
150  virtual void setVisible( unsigned int index, bool visible ) = 0;
151 
154  virtual bool visible (unsigned int index) const = 0;
155 
157 
158 
160  virtual float* vertexData() const = 0;
161 
163  virtual unsigned int vertexDataSize() const = 0;
164 
167  inline unsigned int vertexCount() const
168  {
169  return myVertexCount;
170  };
171 
172  protected:
173 
174  DtBufferObject* myBufferObject;
175 
176  unsigned int myVertexCount;
177 
178  typedef std::vector<unsigned int*> IndexList;
180 
181  };
182 
183 }
unsigned int vertexCount() const
Get the number of vertices per primitive. inlined to speed up PVD icons.
Definition: DtPrimitiveStyle.h:167
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:24
#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:178
IndexList myProxyIndices
Definition: DtPrimitiveStyle.h:179
const char int mode
Definition: ioapi.h:38
unsigned int myVertexCount
Definition: DtPrimitiveStyle.h:176
voidpf uLong offset
Definition: ioapi.h:42
Definition: DtCommonRenderData.h:32

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)