AGX Dynamics  2.38.0.2
RenderData.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agx/agxPhysics_export.h>
20 #include <agx/Referenced.h>
21 #include <agx/Vector.h>
22 #include <agx/Vec3.h>
23 #include <agx/Vec2.h>
24 #include <agx/agx_vector_types.h>
25 #include <agxStream/Serializable.h>
27 
28 namespace agxCollide
29 {
39  {
40  public:
41 
43  enum Mode
44  {
45 // POINTS=0,
46 // LINES=1,
47 // LINE_STRIP=2,
48 // LINE_LOOP=3,
49  TRIANGLES=4
50 // TRIANGLE_STRIP=5,
51 // TRIANGLE_FAN=6,
52 // QUADS=7,
53 // QUAD_STRIP=8,
54 // POLYGON=9,
55  };
56 
57  enum StateInfo
58  {
59  STANDARD=0x0,
60  NO_RENDER=0x1
61  };
62 
64  RenderData();
65 
67  void setRenderMaterial( agxCollide::RenderMaterial* renderMaterial );
68 
70  agxCollide::RenderMaterial *getRenderMaterial( ) const;
71 
73  bool hasRenderMaterial( ) const;
74 
76  void setVertexArray( const agx::Vec3Vector& vertices );
77 
79  const agx::Vec3Vector& getVertexArray() const;
80  agx::Vec3Vector& getVertexArray();
81 
83  void setIndexArray( const agx::UInt32Vector& indices, Mode mode );
84 
86  const agx::UInt32Vector& getIndexArray() const;
87  agx::UInt32Vector& getIndexArray();
88 
90  void setNormalArray( const agx::Vec3Vector& normals );
91 
93  const agx::Vec3Vector& getNormalArray() const;
94  agx::Vec3Vector& getNormalArray();
95 
97  void setTexCoordArray( const agx::Vec2Vector& texCoords );
98 
100  const agx::Vec2Vector& getTexCoordArray() const;
101  agx::Vec2Vector& getTexCoordArray();
102 
104  void setColorArray( const agx::Vec4Vector& color );
105 
107  const agx::Vec4Vector& getColorArray() const;
108  agx::Vec4Vector& getColorArray();
109 
110 
112  Mode getMode() const;
113 
115  void setShouldRender(bool shouldRender);
116 
118  bool getShouldRender() const;
119 
121  RenderData* clone() const;
122 
123 #ifndef SWIG
125 #endif
126 
127  protected:
128 
129  virtual ~RenderData();
130 
131 
140 
141  };
142 
143 }
144 
agxPhysics_export.h
Referenced.h
Vector.h
agxCollide::RenderData::m_texCoords
agx::Vec2Vector m_texCoords
Definition: RenderData.h:135
RenderMaterial.h
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
agxCollide::RenderData::m_vertices
agx::Vec3Vector m_vertices
Definition: RenderData.h:132
agxCollide::RenderData::m_mode
Mode m_mode
Definition: RenderData.h:139
agxCollide::RenderData::m_vertexColor
agx::Vec4Vector m_vertexColor
Definition: RenderData.h:136
agxCollide::RenderData::m_normals
agx::Vec3Vector m_normals
Definition: RenderData.h:134
agxCollide::RenderData
Class for storing rendering information for a Shape.
Definition: RenderData.h:38
agxCollide::RenderData::m_renderMaterial
agxCollide::RenderMaterialRef m_renderMaterial
Definition: RenderData.h:137
AGXSTREAM_DECLARE_SERIALIZABLE
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
agx::VectorPOD< Vec3 >
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxCollide::RenderData::m_indices
agx::UInt32Vector m_indices
Definition: RenderData.h:133
Vec2.h
Vec3.h
agx::ref_ptr< RenderMaterial >
agxCollide::RenderData::StateInfo
StateInfo
Definition: RenderData.h:57
agxCollide::RenderData::m_renderState
agx::UInt32 m_renderState
Definition: RenderData.h:138
agxCollide::RenderData::Mode
Mode
Specifies which type of primitive this render data represents.
Definition: RenderData.h:43
Serializable.h
agxCollide::RenderMaterial
Class for storing rendering material.
Definition: RenderMaterial.h:32
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:119
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition: ContactForceFilterParticipant.h:22
agxCollide::AGX_DECLARE_POINTER_TYPES
AGX_DECLARE_POINTER_TYPES(SpaceListener)
agx::UInt32
uint32_t UInt32
Definition: Integer.h:32
agx_vector_types.h