VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFlatPrimitiveStyle.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <vector>
16 
17 namespace makVrv
18 {
19 
20  class DtOverlayResourceProvider;
21 
25  {
26  public:
27 
30  unsigned int vertexCountPerPrimitve );
31 
33  virtual ~DtFlatPrimitiveStyle();
34 
36  virtual void add( unsigned int* index );
37 
39  virtual void remove( unsigned int index );
40 
42  virtual void render( int mode, unsigned int groupCount, bool geocentric,
43  float geocentricAlpha, const double cameraLocation[3],
44  const double positionMatrix[16],
45  const double projectionMatrix[16],
46  int offset);
47 
49  virtual void update( int renderMode );
50 
53 
55  virtual void set3DVertexPosition( unsigned int index, unsigned int vertex,
56  float x, float y, float z, float w = 0 );
57 
59  virtual void set3DVertexQuadPositions(unsigned int index,
60  float x, float y, float z, float w);
61 
63  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
64  float& x, float& y, float& z, float& w ) const;
65 
67  virtual void set2DVertexPosition( unsigned int index, unsigned int vertex,
68  float x, float y );
69 
71  virtual void get2DVertexPosition( unsigned int index, unsigned int vertex,
72  float& x, float& y ) const;
73 
75  virtual void set2DOffsetRotation( unsigned int index,
76  unsigned int vertIndex, float angle );
77 
79  virtual void get2DOffsetRotation( unsigned int index,
80  unsigned int vertIndex, float& angle ) const;
81 
83  virtual void setColor( unsigned int index, unsigned int vertIndex,
84  float r, float g, float b, float a );
85 
87  virtual void getColor( unsigned int index, unsigned int vertIndex,
88  float& r, float& g, float& b, float& a ) const;
89 
91  virtual void setUVCoordinates( unsigned int index,
92  unsigned int vertIndex, float u, float v );
93 
95  virtual void getUVCoordinates( unsigned int index,
96  unsigned int vertIndex, float& u, float& v ) const;
97 
99 
100 
103 
106  virtual void setFillParameters( unsigned int index, void* fill,
107  unsigned int fullStipplePattern[32] = 0 );
108 
111  virtual void getFillParameters( unsigned int index, void*& fill,
112  unsigned int fullStipplePattern[32] = 0 ) const;
113 
116  virtual void setGroup( unsigned int index, float zFactor );
117 
120  virtual float group( unsigned int index ) const;
121 
123 
124  protected:
125 
127  virtual float* vertexData() const;
128 
130  virtual unsigned int vertexDataSize() const;
131 
132  protected:
134  {
135  unsigned int group;
136  unsigned int* indexPtr;
137  };
138 
142  {
143  bool operator()( const FlatPrimitiveInfo& left, const FlatPrimitiveInfo& right )
144  {
145  return (left.group < right.group);
146  }
147  };
148 
150 
151  typedef std::vector<FlatPrimitiveInfo> FlatPrimitiveInfoList;
152  typedef std::vector<unsigned int> FlatIndexList;
153  typedef std::vector<DtOffsetColoredVertex> QuadVertexList;
154 
158 
162 
163  };
164 
165 }
bool mySortDirty
Definition: DtFlatPrimitiveStyle.h:149
Definition: DtFlatPrimitiveStyle.h:133
DtOverlayResourceProvider & myResourceProvider
Definition: DtFlatPrimitiveStyle.h:159
bool operator()(const FlatPrimitiveInfo &left, const FlatPrimitiveInfo &right)
Definition: DtFlatPrimitiveStyle.h:143
unsigned int group
Definition: DtFlatPrimitiveStyle.h:135
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:21
FlatIndexList myFlatIndices
Definition: DtFlatPrimitiveStyle.h:157
Sorts flat primitives by their group, used to make sure the indices are in the correct order...
Definition: DtFlatPrimitiveStyle.h:141
DtProjected2DFlatEffect * myEffect
Definition: DtFlatPrimitiveStyle.h:161
The overlay resource provider class provies resources for overlay drawing classes.
Definition: DtOverlayResourceProvider.h:23
#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< FlatPrimitiveInfo > FlatPrimitiveInfoList
Definition: DtFlatPrimitiveStyle.h:151
std::vector< unsigned int > FlatIndexList
Definition: DtFlatPrimitiveStyle.h:152
Contains the makVrv::DtFlat2DRenderer class declaration.
A style for rendering a 2D quad with only a flat color.
Definition: DtFlatPrimitiveStyle.h:24
FlatPrimitiveInfoList myFlatPrimitives
Definition: DtFlatPrimitiveStyle.h:155
std::vector< DtOffsetColoredVertex > QuadVertexList
Definition: DtFlatPrimitiveStyle.h:153
const char int mode
Definition: ioapi.h:38
QuadVertexList myVertices
Definition: DtFlatPrimitiveStyle.h:160
An effect for rendering 2D flat colored quads.
Definition: DtProjected2DFlatEffect.h:19
voidpf uLong offset
Definition: ioapi.h:42
FlatPrimitiveInfoList mySortedFlatPrimitives
Definition: DtFlatPrimitiveStyle.h:156
Contains the makVrv::DtPrimitiveStyle class declaration.
unsigned int * indexPtr
Definition: DtFlatPrimitiveStyle.h:136

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)