VR-Forces Development_Version 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] = 0, const double positionMatrix[16] = 0 );
52 
54  virtual void releaseResources();
55 
57  virtual bool isRenderModeSupported( int mode );
58 
60  DtQuadProxy* allocateProxy(Styles = Style_Flat);
61 
62  protected:
63 
65  void add( DtQuadProxy* toAdd );
66 
68  void remove( const DtQuadProxy* const proxy, bool isBeingDeleted = false );
69 
71  void dirty( DtQuadProxy* proxy );
72 
74  void updateRenderData();
75 
76  protected:
77 
78  typedef std::vector<DtQuadProxy*> QuadProxyList;
79 
80  DtPrimitiveStyle* myStyles[Styles_End];
83 
84  };
85 
86 
91  {
92  public:
93 
94  friend class DtQuadRenderer;
95 
96  ~DtQuadProxy();
97 
99  void setGroup( float order );
100 
102  float group() const;
103 
105  void set3DPosition( int index, float x, float y, float z, float w);
106 
108  void set3DPosition( float x, float y, float z, float w = 0 );
109 
111  void get3DPosition( float& x, float& y, float& z, float& w ) const;
112 
114  void set2DRotation( float angle );
115 
117  void get2DRotation( float& angle ) const;
118 
120  void setPoints( const float points[8] );
121 
123  void getPoints( float points[8] ) const;
124 
126  void setBounds( const float bounds[4] );
127 
129  void getBounds( float bounds[4] ) const;
130 
132  void setStyle( int style );
133 
135  int style() const;
136 
138  void setColor( float r, float g, float b, float a );
139 
141  void getColor( float& r, float& g, float& b, float& a ) const;
142 
144  void setStippleParameters( unsigned int fill,
145  unsigned int fullStipplePattern[32] = 0 );
146 
148  void setTextureParameters( void* textureHangle,
149  float left = 0.0f, float right = 1.0f,
150  float bottom = 0.0f, float top = 1.0f );
151 
153  void* textureHandle() const;
154 
156  unsigned int index() const;
157 
159  void setIndex( unsigned int index );
160 
161  protected:
162 
164  DtQuadProxy( DtQuadRenderer& renderer, unsigned char effect );
165 
169  static void getBoundsFromPoints(float bounds[4], const float points[8]);
170 
171  protected:
172 
174  unsigned int myIndex;
175  unsigned char myStyle;
177 
178  };
179 
180 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)