VR-Forces 4.10 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 group;
139  unsigned int* indexPtr;
140  unsigned int quadStipple[32];
141  };
142 
146  {
147  bool operator()( const StippledPrimitiveInfo& left, const StippledPrimitiveInfo& right )
148  {
149  return (left.group < right.group);
150  }
151  };
152 
154 
156  {
157  unsigned int key[32];
158  bool operator<(const StipplePattern& b) const;
159  };
160 
161  typedef std::vector<DtOffsetColoredVertex> VertexList;
162  typedef std::vector<StippledPrimitiveInfo> StippledPrimitiveInfoList;
163  typedef std::map< StipplePattern, std::vector<unsigned int> > StippleIndexMap;
164 
170 
172 
173  };
174 
175 }
unsigned int * indexPtr
Definition: DtStippledPrimitiveStyle.h:139
bool mySortDirty
Definition: DtStippledPrimitiveStyle.h:153
std::vector< StippledPrimitiveInfo > StippledPrimitiveInfoList
Definition: DtStippledPrimitiveStyle.h:162
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:21
StippleIndexMap myStippleIndexMap
Definition: DtStippledPrimitiveStyle.h:169
DtProjected2DFlatEffect * myEffect
Definition: DtStippledPrimitiveStyle.h:171
Definition: DtStippledPrimitiveStyle.h:136
DtOverlayResourceProvider & myResourceProvider
Definition: DtStippledPrimitiveStyle.h:165
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
StippledPrimitiveInfoList mySortedStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:168
unsigned int group
Definition: DtStippledPrimitiveStyle.h:138
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Contains the makVrv::DtFlat2DRenderer class declaration.
Definition: DtStippledPrimitiveStyle.h:155
const char int mode
Definition: ioapi.h:38
std::map< StipplePattern, std::vector< unsigned int > > StippleIndexMap
Definition: DtStippledPrimitiveStyle.h:163
StippledPrimitiveInfoList myStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:167
An effect for rendering 2D flat colored quads.
Definition: DtProjected2DFlatEffect.h:19
voidpf uLong offset
Definition: ioapi.h:42
VertexList myStippleVertices
Definition: DtStippledPrimitiveStyle.h:166
bool operator()(const StippledPrimitiveInfo &left, const StippledPrimitiveInfo &right)
Definition: DtStippledPrimitiveStyle.h:147
A style for drawing quads with a stipple pattern.
Definition: DtStippledPrimitiveStyle.h:25
Contains the makVrv::DtPrimitiveStyle class declaration.
Sorts primitives by their group, used to make sure the indices are in the correct order...
Definition: DtStippledPrimitiveStyle.h:145
std::vector< DtOffsetColoredVertex > VertexList
Definition: DtStippledPrimitiveStyle.h:161

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)