AGX Dynamics 2.37.3.4
|
Class for storing rendering information for a Shape. More...
#include <RenderData.h>
Public Types | |
enum | Mode { TRIANGLES =4 } |
Specifies which type of primitive this render data represents. More... | |
enum | StateInfo { STANDARD =0x0 , NO_RENDER =0x1 } |
Public Member Functions | |
RenderData () | |
Constructor. | |
AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxCollide::RenderData) | |
RenderData * | clone () const |
Returns an exact copy of the render data as a new object. | |
agx::Vec4Vector & | getColorArray () |
const agx::Vec4Vector & | getColorArray () const |
agx::UInt32Vector & | getIndexArray () |
const agx::UInt32Vector & | getIndexArray () const |
Mode | getMode () const |
agx::Vec3Vector & | getNormalArray () |
const agx::Vec3Vector & | getNormalArray () const |
agxCollide::RenderMaterial * | getRenderMaterial () const |
bool | getShouldRender () const |
agx::Vec2Vector & | getTexCoordArray () |
const agx::Vec2Vector & | getTexCoordArray () const |
agx::Vec3Vector & | getVertexArray () |
const agx::Vec3Vector & | getVertexArray () const |
bool | hasRenderMaterial () const |
void | setColorArray (const agx::Vec4Vector &color) |
Set and copy the per vertex colors. | |
void | setIndexArray (const agx::UInt32Vector &indices, Mode mode) |
Set the indices. | |
void | setNormalArray (const agx::Vec3Vector &normals) |
Set the per vertex normals. | |
void | setRenderMaterial (agxCollide::RenderMaterial *renderMaterial) |
Set the renderMaterial of this RenderData. | |
void | setShouldRender (bool shouldRender) |
Set if the data stored should be rendered at all. | |
void | setTexCoordArray (const agx::Vec2Vector &texCoords) |
Set the per vertex texture coordinates. | |
void | setVertexArray (const agx::Vec3Vector &vertices) |
Set the vertices. | |
Public Member Functions inherited from agx::Referenced | |
Referenced () | |
Default constructor. | |
Referenced (const Referenced &) | |
template<typename T > | |
T * | as () |
Subclass casting. | |
template<typename T > | |
const T * | as () const |
template<typename T > | |
T * | asSafe () |
Safe subclass casting, return nullptr if template type does not match. | |
template<typename T > | |
const T * | asSafe () const |
int | getReferenceCount () const |
template<typename T > | |
bool | is () const |
Subclass test. | |
Referenced & | operator= (const Referenced &) |
Assignment operator. Will increment the number of references to the referenced object. | |
void | reference (void *ptr=nullptr) const |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
void | unreference (void *ptr=nullptr) const |
Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
void | unreference_nodelete () const |
Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Member Functions inherited from agxStream::Serializable | |
virtual | ~Serializable () |
Destructor for normal C++ use but hidden from SWIG bindings. | |
virtual const char * | getClassName () const |
bool | getEnableSerialization () const |
bool | getEnableUuidGeneration () |
agx::UInt32 | getIndex () const |
This index is given at creation of this object. | |
virtual StorageAgent * | getStorageAgent () const =0 |
agx::Uuid | getUuid () const |
bool | isFinished () const |
void | setEnableSerialization (bool flag) |
Set to false to disable serialization of this object. | |
void | setFinished () |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
void | setUuid (const agx::Uuid &uuid) |
Explicitly set a Uuid on a serializable object. | |
Static Public Member Functions | |
static agxStream::Serializable * | create (agxStream::InputArchive &) |
Static Public Member Functions inherited from agx::Referenced | |
template<typename T > | |
static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
static void | setEnableUuidGeneration (bool flag) |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Protected Member Functions | |
virtual | ~RenderData () |
Protected Member Functions inherited from agx::Referenced | |
virtual | ~Referenced () |
Destructor. | |
void | allocateObserverVector () const |
void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
Serializable () | |
Default constructor. | |
Serializable (const Serializable &other) | |
Copy constructor. | |
void | generateUuid () |
Protected Attributes | |
agx::UInt32Vector | m_indices |
Mode | m_mode |
agx::Vec3Vector | m_normals |
agxCollide::RenderMaterialRef | m_renderMaterial |
agx::UInt32 | m_renderState |
agx::Vec2Vector | m_texCoords |
agx::Vec4Vector | m_vertexColor |
agx::Vec3Vector | m_vertices |
Protected Attributes inherited from agx::Referenced | |
Mutex | m_mutex |
ObserverContainer | m_observers |
AtomicValue | m_refCount |
Additional Inherited Members | |
Static Protected Member Functions inherited from agx::Referenced | |
static DeleteHandler * | getDeleteHandler () |
static void | setDeleteHandler (DeleteHandler *handler) |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
Class for storing rendering information for a Shape.
This data can later be accessed by a rendering engine. You can also derive from this class and implement your own containing more relevant information for your specific needs, such as textures, multitexcoords, shaders etc. Just make sure you implement the store/restore method too.
Definition at line 38 of file RenderData.h.
Specifies which type of primitive this render data represents.
Enumerator | |
---|---|
TRIANGLES |
Definition at line 43 of file RenderData.h.
Enumerator | |
---|---|
STANDARD | |
NO_RENDER |
Definition at line 57 of file RenderData.h.
agxCollide::RenderData::RenderData | ( | ) |
Constructor.
|
protectedvirtual |
agxCollide::RenderData::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | agxCollide::RenderData | ) |
RenderData * agxCollide::RenderData::clone | ( | ) | const |
Returns an exact copy of the render data as a new object.
|
inlinestatic |
Definition at line 124 of file RenderData.h.
agx::Vec4Vector & agxCollide::RenderData::getColorArray | ( | ) |
const agx::Vec4Vector & agxCollide::RenderData::getColorArray | ( | ) | const |
agx::UInt32Vector & agxCollide::RenderData::getIndexArray | ( | ) |
const agx::UInt32Vector & agxCollide::RenderData::getIndexArray | ( | ) | const |
Mode agxCollide::RenderData::getMode | ( | ) | const |
agx::Vec3Vector & agxCollide::RenderData::getNormalArray | ( | ) |
const agx::Vec3Vector & agxCollide::RenderData::getNormalArray | ( | ) | const |
agxCollide::RenderMaterial * agxCollide::RenderData::getRenderMaterial | ( | ) | const |
bool agxCollide::RenderData::getShouldRender | ( | ) | const |
agx::Vec2Vector & agxCollide::RenderData::getTexCoordArray | ( | ) |
const agx::Vec2Vector & agxCollide::RenderData::getTexCoordArray | ( | ) | const |
agx::Vec3Vector & agxCollide::RenderData::getVertexArray | ( | ) |
const agx::Vec3Vector & agxCollide::RenderData::getVertexArray | ( | ) | const |
bool agxCollide::RenderData::hasRenderMaterial | ( | ) | const |
void agxCollide::RenderData::setColorArray | ( | const agx::Vec4Vector & | color | ) |
Set and copy the per vertex colors.
void agxCollide::RenderData::setIndexArray | ( | const agx::UInt32Vector & | indices, |
Mode | mode | ||
) |
Set the indices.
void agxCollide::RenderData::setNormalArray | ( | const agx::Vec3Vector & | normals | ) |
Set the per vertex normals.
void agxCollide::RenderData::setRenderMaterial | ( | agxCollide::RenderMaterial * | renderMaterial | ) |
Set the renderMaterial of this RenderData.
void agxCollide::RenderData::setShouldRender | ( | bool | shouldRender | ) |
Set if the data stored should be rendered at all.
void agxCollide::RenderData::setTexCoordArray | ( | const agx::Vec2Vector & | texCoords | ) |
Set the per vertex texture coordinates.
void agxCollide::RenderData::setVertexArray | ( | const agx::Vec3Vector & | vertices | ) |
Set the vertices.
|
protected |
Definition at line 133 of file RenderData.h.
|
protected |
Definition at line 139 of file RenderData.h.
|
protected |
Definition at line 134 of file RenderData.h.
|
protected |
Definition at line 137 of file RenderData.h.
|
protected |
Definition at line 138 of file RenderData.h.
|
protected |
Definition at line 135 of file RenderData.h.
|
protected |
Definition at line 136 of file RenderData.h.
|
protected |
Definition at line 132 of file RenderData.h.