VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
13 
14 #include <vector>
15 
16 namespace makVrv
17 {
18 
19  class DtQuadProxy;
20  class DtPrimitiveStyle;
21  class DtOverlayResourceProvider;
22 
26  {
27  public:
28 
29  enum Styles
30  {
31  Style_Flat = 0,
35  Styles_End
36  };
37 
38  friend class DtQuadProxy;
39 
42 
44  virtual ~DtQuadRenderer();
45 
47  virtual int numberOfPrimitives() const;
48 
50  virtual void render( bool geocentric, float geocentricAlpha,
51  const double location[3]
52  , const double positionMatrix[16]
53  , const double projectionMatrix[16]);
54 
56  virtual void releaseResources();
57 
59  virtual bool isRenderModeSupported( int mode );
60 
62  DtQuadProxy* allocateProxy(Styles = Style_Flat);
63 
64  protected:
65 
67  void add( DtQuadProxy* toAdd );
68 
70  void remove( const DtQuadProxy* const proxy, bool isBeingDeleted = false );
71 
73  void dirty( DtQuadProxy* proxy );
74 
76  void updateRenderData();
77 
78  protected:
79 
80  typedef std::vector<DtQuadProxy*> QuadProxyList;
81 
82  DtPrimitiveStyle* myStyles[Styles_End];
85 
86  };
87 
88 
93  {
94  public:
95 
96  friend class DtQuadRenderer;
97 
98  ~DtQuadProxy();
99 
101  void setGroup( float order );
102 
104  float group() const;
105 
107  void set3DPosition( int index, float x, float y, float z, float w);
108 
110  void set3DPosition( float x, float y, float z, float w = 0 );
111 
113  void get3DPosition( float& x, float& y, float& z, float& w ) const;
114 
116  void set2DRotation( float angle );
117 
119  void get2DRotation( float& angle ) const;
120 
122  void setPoints( const float points[8] );
123 
125  void getPoints( float points[8] ) const;
126 
128  void setBounds( const float bounds[4] );
129 
131  void getBounds( float bounds[4] ) const;
132 
134  void setStyle( int style );
135 
137  int style() const;
138 
140  void setColor( float r, float g, float b, float a );
141 
143  void getColor( float& r, float& g, float& b, float& a ) const;
144 
146  void setStippleParameters( unsigned int fill,
147  unsigned int fullStipplePattern[32] = 0 );
148 
150  void setTextureParameters( void* textureHangle,
151  float left = 0.0f, float right = 1.0f,
152  float bottom = 0.0f, float top = 1.0f );
153 
155  void* textureHandle() const;
156 
158  unsigned int index() const;
159 
161  void setIndex( unsigned int index );
162 
163  protected:
164 
166  DtQuadProxy( DtQuadRenderer& renderer, unsigned char effect );
167 
171  static void getBoundsFromPoints(float bounds[4], const float points[8]);
172 
173  protected:
174 
176  unsigned int myIndex;
177  unsigned char myStyle;
179 
180  };
181 
182 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)