VR-Forces 4.8 Class Documentation
 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) 2019 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 namespace makVrv
15 {
16 
17  class DtBufferObject;
18 
22  {
23  public:
24 
26  DtPrimitiveStyle( unsigned int vertexCountPerPrimitive );
27 
29  virtual ~DtPrimitiveStyle();
30 
32  virtual void releaseResources();
33 
35  int numberOfPrimitives() const;
36 
38  virtual void add( unsigned int* indexToUpdate );
39 
41  virtual void remove( unsigned int index );
42 
44  virtual void render( int mode, unsigned int groupCount, bool geocentric,
45  float geocentricAlpha, const double cameraLocation[3],
46  const double positionMatrix[16],
47  const double projectionMatrix[16],
48  int offset) = 0;
49 
51  virtual void update( int renderMode );
52 
53 
56 
58  virtual void set3DVertexPosition( unsigned int index, unsigned int vertIndex,
59  float x, float y, float z, float w ) = 0;
60 
62  virtual void set3DVertexQuadPositions(unsigned int index,
63  float x, float y, float z, float w) = 0;
64 
66  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
67  float& x, float& y, float& z, float& w ) const = 0;
68 
70  virtual void set2DVertexPosition( unsigned int index, unsigned int vertIndex,
71  float x, float y ) = 0;
72 
74  virtual void get2DVertexPosition( unsigned int index, unsigned int vertIndex,
75  float& x, float& y ) const = 0;
76 
78  virtual void set2DOffsetRotation( unsigned int index, unsigned int vertIndex, float angle ) = 0;
79 
81  virtual void get2DOffsetRotation( unsigned int index, unsigned int vertIndex, float& angle ) const = 0;
82 
84  virtual void setColor( unsigned int index, unsigned int vertIndex, float r, float g, float b, float a ) = 0;
85 
87  virtual void getColor( unsigned int index, unsigned int vertIndex, float& r, float& g, float& b, float& a ) const = 0;
88 
90  virtual void setUVCoordinates( unsigned int index, unsigned int vertIndex, float u, float v ) = 0;
91 
93  virtual void getUVCoordinates( unsigned int index, unsigned int vertIndex, float& u, float& v ) const = 0;
94 
96 
97 
100 
103  virtual void setFillParameters( unsigned int index, void* fill,
104  unsigned int fullStipplePattern[32] = 0 ) = 0;
105 
108  virtual void getFillParameters( unsigned int index, void*& fill,
109  unsigned int fullStipplePattern[32] = 0 ) const = 0;
110 
113  virtual void setGroup( unsigned int index, float zFactor ) = 0;
114 
117  virtual float group( unsigned int index ) const = 0;
118 
120 
121 
123  virtual float* vertexData() const = 0;
124 
126  virtual unsigned int vertexDataSize() const = 0;
127 
130  inline unsigned int vertexCount() const
131  {
132  return myVertexCount;
133  };
134 
135  protected:
136 
137  DtBufferObject* myBufferObject;
138 
139  unsigned int myVertexCount;
140 
141  typedef std::vector<unsigned int*> IndexList;
143 
144  };
145 
146 }
unsigned int vertexCount() const
Get the number of vertices per primitive.
Definition: DtPrimitiveStyle.h:130
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:21
A class the wraps a OpenGL Array Buffer object.
Definition: DtBufferObject.h:17
#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:141
IndexList myProxyIndices
Definition: DtPrimitiveStyle.h:142
const char int mode
Definition: ioapi.h:38
unsigned int myVertexCount
Definition: DtPrimitiveStyle.h:139
voidpf uLong offset
Definition: ioapi.h:42

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)