VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStippledPrimitiveStyle.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 #include <map>
17 
18 namespace makVrv
19 {
20 
21  class DtOverlayResourceProvider;
22 
26  {
27  public:
28 
31  unsigned int vertexCount );
32 
34  virtual ~DtStippledPrimitiveStyle();
35 
37  virtual void add( unsigned int* );
38 
40  virtual void remove( unsigned int index );
41 
43  virtual void render( int mode, unsigned int groupCount, bool geocentric,
44  float geocentricAlpha, const double cameraLocation[3],
45  const double positionMatrix[16],
46  const double projectionMatrix[16],
47  int offset);
48 
50  virtual void update( int renderMode );
51 
52 
55 
57  virtual void set3DVertexPosition( unsigned int index, unsigned int vertex,
58  float x, float y, float z, float w = 0 );
59 
61  virtual void set3DVertexQuadPositions(unsigned int index,
62  float x, float y, float z, float w);
63 
65  virtual void get3DVertexPosition( unsigned int index, unsigned int vertex,
66  float& x, float& y, float& z, float& w ) const;
67 
69  virtual void set2DVertexPosition( unsigned int index, unsigned int vertex,
70  float x, float y );
71 
73  virtual void get2DVertexPosition( unsigned int index, unsigned int vertex,
74  float& x, float& y ) const;
75 
77  virtual void set2DOffsetRotation( unsigned int index,
78  unsigned int vertIndex, float angle );
79 
81  virtual void get2DOffsetRotation( unsigned int index,
82  unsigned int vertIndex, float& angle ) const;
83 
85  virtual void setColor( unsigned int index, unsigned int vertIndex,
86  float r, float g, float b, float a );
87 
89  virtual void getColor( unsigned int index, unsigned int vertIndex,
90  float& r, float& g, float& b, float& a ) const;
91 
93  virtual void setUVCoordinates( unsigned int index,
94  unsigned int vertIndex, float u, float v );
95 
97  virtual void getUVCoordinates( unsigned int index,
98  unsigned int vertIndex, float& u, float& v ) const;
99 
101 
102 
105 
108  virtual void setFillParameters( unsigned int index, void* fill,
109  unsigned int fullStipplePattern[32] = 0 );
110 
113  virtual void getFillParameters( unsigned int index, void*& fill,
114  unsigned int fullStipplePattern[32] = 0 ) const;
115 
118  virtual void setGroup( unsigned int index, float zFactor );
119 
122  virtual float group( unsigned int index ) const;
123 
125 
126  protected:
127 
129  virtual float* vertexData() const;
130 
132  virtual unsigned int vertexDataSize() const;
133 
134  protected:
135 
137  {
138  unsigned int* indexPtr;
139  unsigned int quadStipple[32];
140  };
141 
143  {
144  unsigned int key[32];
145  bool operator<(const StipplePattern& b) const;
146  };
147 
148  typedef std::vector<DtOffsetColoredVertex> VertexList;
149  typedef std::vector<StippledPrimitiveInfo> StippledPrimitiveInfoList;
150  typedef std::map< StipplePattern, std::vector<unsigned int> > StippleIndexMap;
151 
156 
158 
159  };
160 
161 }
unsigned int * indexPtr
Definition: DtStippledPrimitiveStyle.h:138
std::vector< StippledPrimitiveInfo > StippledPrimitiveInfoList
Definition: DtStippledPrimitiveStyle.h:149
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:21
StippleIndexMap myStippleIndexMap
Definition: DtStippledPrimitiveStyle.h:155
DtProjected2DFlatEffect * myEffect
Definition: DtStippledPrimitiveStyle.h:157
Definition: DtStippledPrimitiveStyle.h:136
DtOverlayResourceProvider & myResourceProvider
Definition: DtStippledPrimitiveStyle.h:152
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])
Contains the makVrv::DtFlat2DRenderer class declaration.
Definition: DtStippledPrimitiveStyle.h:142
const char int mode
Definition: ioapi.h:38
std::map< StipplePattern, std::vector< unsigned int > > StippleIndexMap
Definition: DtStippledPrimitiveStyle.h:150
StippledPrimitiveInfoList myStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:154
An effect for rendering 2D flat colored quads.
Definition: DtProjected2DFlatEffect.h:19
voidpf uLong offset
Definition: ioapi.h:42
VertexList myStippleVertices
Definition: DtStippledPrimitiveStyle.h:153
A style for drawing quads with a stipple pattern.
Definition: DtStippledPrimitiveStyle.h:25
Contains the makVrv::DtPrimitiveStyle class declaration.
std::vector< DtOffsetColoredVertex > VertexList
Definition: DtStippledPrimitiveStyle.h:148

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)