VR-Forces 4.1.1 Class Documentation
DtQuadRenderer.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 DtQuadProxy;
21  class DtPrimitiveStyle;
22  class DtOverlayResourceProvider;
23 
27  {
28  public:
29 
30  enum Styles
31  {
32  Style_Flat = 0,
36  Styles_End
37  };
38 
39  friend class DtQuadProxy;
40 
43 
45  virtual ~DtQuadRenderer();
46 
48  virtual int numberOfPrimitives() const;
49 
51  virtual void render( bool geocentric, float geocentricAlpha,
52  const double location[3] = 0, const double positionMatrix[16] = 0 );
53 
55  virtual void releaseResources();
56 
58  virtual bool isRenderModeSupported( int mode );
59 
61  DtQuadProxy* allocateProxy(Styles = Style_Flat);
62 
63  protected:
64 
66  void add( DtQuadProxy* toAdd );
67 
69  void remove( const DtQuadProxy* const proxy, bool isBeingDeleted = false );
70 
72  void dirty( DtQuadProxy* proxy );
73 
75  void updateRenderData();
76 
77  protected:
78 
79  typedef std::vector<DtQuadProxy*> QuadProxyList;
80 
81  DtPrimitiveStyle* myStyles[Styles_End];
84 
85  };
86 
87 
92  {
93  public:
94 
95  friend class DtQuadRenderer;
96 
97  ~DtQuadProxy();
98 
100  void setGroup( float order );
101 
103  float group() const;
104 
106  void set3DPosition( int index, float x, float y, float z, float w);
107 
109  void set3DPosition( float x, float y, float z, float w = 0 );
110 
112  void get3DPosition( float& x, float& y, float& z, float& w ) const;
113 
115  void set2DRotation( float angle );
116 
118  void get2DRotation( float& angle ) const;
119 
121  void setPoints( const float points[8] );
122 
124  void getPoints( float points[8] ) const;
125 
127  void setBounds( const float bounds[4] );
128 
130  void getBounds( float bounds[4] ) const;
131 
133  void setStyle( int style );
134 
136  int style() const;
137 
139  void setColor( float r, float g, float b, float a );
140 
142  void getColor( float& r, float& g, float& b, float& a ) const;
143 
145  void setStippleParameters( unsigned int fill,
146  unsigned int fullStipplePattern[32] = 0 );
147 
149  void setTextureParameters( void* textureHangle,
150  float left = 0.0f, float right = 1.0f,
151  float bottom = 0.0f, float top = 1.0f );
152 
154  void* textureHandle() const;
155 
157  unsigned int index() const;
158 
160  void setIndex( unsigned int index );
161 
162  protected:
163 
165  DtQuadProxy( DtQuadRenderer& renderer, unsigned char effect );
166 
170  static void getBoundsFromPoints(float bounds[4], const float points[8]);
171 
172  protected:
173 
175  unsigned int myIndex;
176  unsigned char myStyle;
178  unsigned int myVertexGroup;
179 
180  };
181 
182 }

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)