VR-Forces 5.0.1 Developer's Guide
 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) 2022 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 
126  virtual void setVisible( unsigned int index, bool visible );
127 
130  virtual bool visible (unsigned int index) const;
131 
133 
134  protected:
135 
137  virtual float* vertexData() const;
138 
140  virtual unsigned int vertexDataSize() const;
141 
142  protected:
143 
145  {
146  unsigned int group;
147  unsigned int* indexPtr;
148  unsigned int quadStipple[32];
149  bool visible;
150  };
151 
155  {
156  bool operator()( const StippledPrimitiveInfo& left, const StippledPrimitiveInfo& right )
157  {
158  return (left.group < right.group);
159  }
160  };
161 
163 
165  {
166  unsigned int key[32];
167  bool operator<(const StipplePattern& b) const;
168  };
169 
170  typedef std::vector<DtOffsetColoredVertex> VertexList;
171  typedef std::vector<StippledPrimitiveInfo> StippledPrimitiveInfoList;
172  typedef std::map< StipplePattern, std::vector<unsigned int> > StippleIndexMap;
173 
179 
181 
182  };
183 
184 }
unsigned int * indexPtr
Definition: DtStippledPrimitiveStyle.h:147
bool mySortDirty
Definition: DtStippledPrimitiveStyle.h:162
std::vector< StippledPrimitiveInfo > StippledPrimitiveInfoList
Definition: DtStippledPrimitiveStyle.h:171
The abstract base class for the various primitive styles.
Definition: DtPrimitiveStyle.h:21
StippleIndexMap myStippleIndexMap
Definition: DtStippledPrimitiveStyle.h:178
DtProjected2DFlatEffect * myEffect
Definition: DtStippledPrimitiveStyle.h:180
Definition: DtStippledPrimitiveStyle.h:144
bool visible
Definition: DtStippledPrimitiveStyle.h:149
DtOverlayResourceProvider & myResourceProvider
Definition: DtStippledPrimitiveStyle.h:174
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:177
unsigned int group
Definition: DtStippledPrimitiveStyle.h:146
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
Contains the makVrv::DtFlat2DRenderer class declaration.
Definition: DtStippledPrimitiveStyle.h:164
const char int mode
Definition: ioapi.h:38
std::map< StipplePattern, std::vector< unsigned int > > StippleIndexMap
Definition: DtStippledPrimitiveStyle.h:172
StippledPrimitiveInfoList myStipplePrimitives
Definition: DtStippledPrimitiveStyle.h:176
An effect for rendering 2D flat colored quads.
Definition: DtProjected2DFlatEffect.h:19
voidpf uLong offset
Definition: ioapi.h:42
VertexList myStippleVertices
Definition: DtStippledPrimitiveStyle.h:175
bool operator()(const StippledPrimitiveInfo &left, const StippledPrimitiveInfo &right)
Definition: DtStippledPrimitiveStyle.h:156
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:154
std::vector< DtOffsetColoredVertex > VertexList
Definition: DtStippledPrimitiveStyle.h:170

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)