VR-Forces 4.0.4 Class Documentation
include/vrvGraphics/DtFlatPrimitiveStyle.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2011 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvGraphics/DtFlat2DRenderer.h>
00013 #include <vrvGraphics/DtPrimitiveStyle.h>
00014 
00015 #include <vector>
00016 
00017 namespace makVrv
00018 {
00019 
00020    class DtOverlayResourceProvider;
00021 
00024    class DT_DLL_VRVGRAPHICS DtFlatPrimitiveStyle : public DtPrimitiveStyle
00025    {
00026    public:
00027 
00029       DtFlatPrimitiveStyle( DtOverlayResourceProvider& provider,
00030          unsigned int vertexCountPerPrimitve );
00031 
00033       virtual ~DtFlatPrimitiveStyle();
00034 
00036       virtual void add( unsigned int* index );
00037 
00039       virtual void remove( unsigned int index );
00040 
00042       virtual void render( int mode, unsigned int groupCount, bool geocentric,
00043          float geocentricAlpha, const double cameraLocation[3] = 0,
00044          const double positionMatrix[16] = 0, int offset = 0 );
00045 
00046 
00049 
00051       virtual void set3DVertexPosition( unsigned int index, unsigned int vertex,
00052          float x, float y, float z, float w = 0 );
00053 
00055       virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
00056          float& x, float& y, float& z, float& w ) const;
00057 
00059       virtual void set2DVertexPosition( unsigned int index, unsigned int vertex,
00060          float x, float y );
00061 
00063       virtual void get2DVertexPosition( unsigned int index, unsigned int vertex,
00064          float& x, float& y ) const;
00065 
00067       virtual void set2DOffsetRotation( unsigned int index,
00068          unsigned int vertIndex, float angle );
00069 
00071       virtual void get2DOffsetRotation( unsigned int index,
00072          unsigned int vertIndex, float& angle ) const;
00073 
00075       virtual void setColor( unsigned int index, unsigned int vertIndex,
00076          float r, float g, float b, float a );
00077 
00079       virtual void getColor( unsigned int index, unsigned int vertIndex,
00080          float& r, float& g, float& b, float& a ) const;
00081 
00083       virtual void setUVCoordinates( unsigned int index,
00084          unsigned int vertIndex, float u, float v );
00085 
00087       virtual void getUVCoordinates( unsigned int index,
00088          unsigned int vertIndex, float& u, float& v ) const;
00089 
00091 
00092 
00095 
00098       virtual void setFillParameters( unsigned int index, void* fill,
00099          unsigned int fullStipplePattern[32] = 0 );
00100 
00103       virtual void getFillParameters( unsigned int index, void*& fill,
00104          unsigned int fullStipplePattern[32] = 0 ) const;
00105 
00108       virtual void setGroup( unsigned int index, float zFactor );
00109 
00112       virtual float group( unsigned int index ) const;
00113 
00115 
00116    protected:
00117 
00119       virtual float* vertexData() const;
00120 
00122       virtual unsigned int vertexDataSize() const;
00123 
00124    protected:
00125 
00126       typedef std::vector<DtOffsetColoredVertex> QuadVertexList;
00127       DtOverlayResourceProvider& myResourceProvider;
00128       QuadVertexList myVertices;
00129       DtProjected2DFlatEffect* myEffect;
00130 
00131    };
00132 
00133 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)