Mudbox/renderer.h Source File

renderer.h
Go to the documentation of this file.
1 
2 //**************************************************************************/
3 // Copyright (c) 2008 Autodesk, Inc.
4 // All rights reserved.
5 //
6 // Use of this software is subject to the terms of the Autodesk license
7 // agreement provided at the time of installation or download, or which
8 // otherwise accompanies this software in either electronic or hard copy form.
9 //
10 //**************************************************************************/
11 // DESCRIPTION:
12 // CREATED: October 2008
13 //**************************************************************************/
14 
15 namespace mudbox {
16 
30 {
32 
33  enum MeshChange
34  {
35  changeTopology,
36  changeVertexPosition,
37  changeVertexState,
38  };
39 
41  virtual void Initialize( void );
43  virtual void SetMesh( Mesh *pMesh );
49  virtual void Render(
50  const Selector *pSelector = 0,
51  bool bSkipMaterials = false,
52  const Camera *pCamera = 0,
54  );
55 
57  virtual unsigned int RenderData( const Selector *pSelector, unsigned int iStart, const Camera *pCamera );
59  virtual void DecodeData( unsigned int iData, unsigned int &iFaceIndex, unsigned int &iVertexIndex );
60 
62  virtual void OnVertexPositionChange( unsigned int iVertexIndex, unsigned int iFaceIndex );
64  virtual void OnVertexStateChange( unsigned int iVertexIndex, unsigned int iFaceIndex );
66  virtual void OnMeshChange( MeshChange eChange = changeTopology );
67 
69  virtual void SetLODLevel( float fLevel );
71  virtual float LODLevel( void ) const;
72 
74  virtual const AxisAlignedBoundingBox &ActiveUVArea( void ) const;
75 
77  virtual void SetWireFrameMode( bool bMode );
79  virtual bool WireFrameMode( void ) const;
81  virtual void SetColorMode( bool bMode );
83  virtual bool ColorMode( void ) const;
86  virtual void SetVertexColor( Color cVertexColor );
88  virtual Color VertexColor( void ) const;
90  virtual void SetWireLevel( unsigned int iLevel );
92  virtual unsigned int WireLevel( void ) const;
94  virtual void SetTextureCoordinateMode( bool bMode );
96  virtual bool TextureCoordinateMode( void ) const;
98  virtual void SetTangentMode( bool bMode );
100  virtual bool TangentMode( void ) const;
101 
102  virtual bool ReadyForClientRender() { return true;}
103 
105  virtual void SetFacetedMode( bool bMode );
107  virtual bool FacetedMode( void ) const;
108 };
109 
118 {
120 
121 public:
124  {
126  enum Type
127  {
131  eShort
132  } m_eType;
137  Material::VertexDataUsage m_eUsage;
138  };
139 
141  virtual int ComponentCount( void ) const;
142 
144  virtual ComponentDescription Component(
145  int iIndex
146  ) const;
147 
149  virtual const void *VertexData(
150  unsigned int iVertexIndex,
151  int iComponentIndex
152  ) const;
153 
163  virtual void SetVertexData(
164  unsigned int iVertexIndex,
165  int iComponentIndex,
166  unsigned int iDimensionIndex,
167  const void* pValue
168  );
169 
171  struct DirtyVertex
172  {
173  unsigned int m_iVertexIndex;
174  unsigned int m_iFaceIndex;
175  };
177 
189  virtual QVector<DirtyVertex> &DirtyVertexList( void );
190 };
191 
192 }; // end of namespace mudbox
Material::VertexDataUsage m_eUsage
This tells the renderer what to do with this data.
Definition: renderer.h:137
A Mesh is a collection of vertices organized into faces, and optional Texture Coordinate information...
Definition: mesh.h:452
This structure carries information about a component.
Definition: renderer.h:123
This structure describes a dirty vertex.
Definition: renderer.h:171
int m_iDimension
Dimension of the component, must not be greater than 4.
Definition: renderer.h:134
Represents a bounding box whose axes are aligned with the coordinate system.
Definition: math.h:838
unsigned int m_iFaceIndex
Index of the vertex.
Definition: renderer.h:174
This is the base class for a renderer implementation, which transforms a mesh into the opengl pipelin...
Definition: renderer.h:29
Represents a color with four components: red, green, blue, alpha.
Definition: math.h:674
This base class represents any shape in 3d space.
Definition: math.h:1584
Represents a camera (point of view) in a Mudbox scene.
Definition: camera.h:20
Class: ConvolutionKernel.
Definition: array.h:15
This class is the base of all node types that can be structured in a hierarchy.
Definition: treenode.h:18
#define DECLARE_CLASS
This macro should be used in declaration of classes which are inherited from the Node class (or any d...
Definition: node.h:91
This interface can be used to provide additional vertex data for the rendering.
Definition: renderer.h:117
#define MBDLL_DECL
Definition: dllinterface.h:35