![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /***************************************************************************** 00002 * Copyright (c) 2011 MAK Technologies, Inc. 00003 * All rights reserved. 00004 *****************************************************************************/ 00005 00009 00010 #pragma once 00011 00012 #include <vrvGraphics/vrvGraphics.h> 00013 00014 namespace makVrv 00015 { 00016 00017 class DtBufferObject; 00018 00021 class DT_DLL_VRVGRAPHICS DtPrimitiveStyle 00022 { 00023 public: 00024 00026 DtPrimitiveStyle( unsigned int vertexCountPerPrimitive ); 00027 00029 virtual ~DtPrimitiveStyle(); 00030 00032 virtual void releaseResources(); 00033 00035 int numberOfPrimitives() const; 00036 00038 virtual void add( unsigned int* indexToUpdate ); 00039 00041 virtual void remove( unsigned int index ); 00042 00044 virtual void render( int mode, unsigned int groupCount, bool geocentric, 00045 float geocentricAlpha, const double cameraLocation[3] = 0, 00046 const double positionMatrix[16] = 0, 00047 int offset = 0 ) = 0; 00048 00050 virtual void update( int renderMode ); 00051 00052 00055 00057 virtual void set3DVertexPosition( unsigned int index, unsigned int vertIndex, 00058 float x, float y, float z, float w ) = 0; 00059 00061 virtual void get3DVertexPosition( unsigned int index, unsigned int vertex, 00062 float& x, float& y, float& z, float& w ) const = 0; 00063 00065 virtual void set2DVertexPosition( unsigned int index, unsigned int vertIndex, 00066 float x, float y ) = 0; 00067 00069 virtual void get2DVertexPosition( unsigned int index, unsigned int vertIndex, 00070 float& x, float& y ) const = 0; 00071 00073 virtual void set2DOffsetRotation( unsigned int index, unsigned int vertIndex, float angle ) = 0; 00074 00076 virtual void get2DOffsetRotation( unsigned int index, unsigned int vertIndex, float& angle ) const = 0; 00077 00079 virtual void setColor( unsigned int index, unsigned int vertIndex, float r, float g, float b, float a ) = 0; 00080 00082 virtual void getColor( unsigned int index, unsigned int vertIndex, float& r, float& g, float& b, float& a ) const = 0; 00083 00085 virtual void setUVCoordinates( unsigned int index, unsigned int vertIndex, float u, float v ) = 0; 00086 00088 virtual void getUVCoordinates( unsigned int index, unsigned int vertIndex, float& u, float& v ) const = 0; 00089 00091 00092 00095 00098 virtual void setFillParameters( unsigned int index, void* fill, 00099 unsigned int fullStipplePattern[32] = 0 ) = 0; 00100 00103 virtual void getFillParameters( unsigned int index, void*& fill, 00104 unsigned int fullStipplePattern[32] = 0 ) const = 0; 00105 00108 virtual void setGroup( unsigned int index, float zFactor ) = 0; 00109 00112 virtual float group( unsigned int index ) const = 0; 00113 00115 00116 00118 virtual float* vertexData() const = 0; 00119 00121 virtual unsigned int vertexDataSize() const = 0; 00122 00124 unsigned int vertexCount() const; 00125 00126 protected: 00127 00128 DtBufferObject* myBufferObject; 00129 00130 unsigned int myVertexCount; 00131 00132 typedef std::vector<unsigned int*> IndexList; 00133 IndexList myProxyIndices; 00134 00135 }; 00136 00137 }