|
AGXDynamics
2.31.1.0
|
Stores triangle mesh data as triangle lists, i.e. More...
#include <MeshData.h>
Inheritance diagram for agxCollide::MeshData:Public Member Functions | |
| MeshData () | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| const BoundingAABB & | getBound () const |
| const char * | getClassName () const override |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::UInt32Vector & | getIndices () |
| const agx::UInt32Vector & | getIndices () const |
| size_t | getNumTriangles () const |
| int | getReferenceCount () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| agx::Vec3Vector & | getVertices () |
| const agx::Vec3Vector & | getVertices () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~MeshData () |
| Hiding destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| BoundingAABB | m_bound |
| agx::UInt32Vector | m_indices |
| Mutex | m_mutex |
| size_t | m_numTriangles |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
| agx::Vec3Vector | m_vertices |
Stores triangle mesh data as triangle lists, i.e.
always three indices refer to a triangle. The triangles are thus formed by indices 012, 345, 678 and so on. Each index contains a unsigned int referring to a position in the vertices vector. Thus, vertices can be reused in several triangles at once, saving storage space. The number of triangles is indices.size() / 3, but is cached in numTriangles.
Definition at line 38 of file MeshData.h.
| agxCollide::MeshData::MeshData | ( | ) |
|
protectedvirtual |
Hiding destructor.
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
inlinestatic |
Definition at line 58 of file MeshData.h.
|
inlinestatic |
Definition at line 58 of file MeshData.h.
|
protectedinherited |
|
protectedinherited |
| const BoundingAABB & agxCollide::MeshData::getBound | ( | ) | const |
Definition at line 208 of file MeshData.h.
References m_bound.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Reimplemented in agxCollide::CollisionMeshData.
Definition at line 58 of file MeshData.h.
|
inlinestatic |
Definition at line 58 of file MeshData.h.
|
staticprotectedinherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
| agx::UInt32Vector & agxCollide::MeshData::getIndices | ( | ) |
Definition at line 190 of file MeshData.h.
References m_indices.
| const agx::UInt32Vector & agxCollide::MeshData::getIndices | ( | ) | const |
Definition at line 196 of file MeshData.h.
References m_indices.
| size_t agxCollide::MeshData::getNumTriangles | ( | ) | const |
Definition at line 202 of file MeshData.h.
References m_numTriangles.
|
inherited |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Reimplemented in agxCollide::CollisionMeshData.
Definition at line 58 of file MeshData.h.
|
inherited |
Definition at line 268 of file Serializable.h.
| agx::Vec3Vector & agxCollide::MeshData::getVertices | ( | ) |
Definition at line 178 of file MeshData.h.
References m_vertices.
| const agx::Vec3Vector & agxCollide::MeshData::getVertices | ( | ) | const |
Definition at line 184 of file MeshData.h.
References m_vertices.
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
|
overridevirtual |
Reimplemented in agxCollide::CollisionMeshData.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
overridevirtual |
Reimplemented in agxCollide::CollisionMeshData.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
protected |
Definition at line 66 of file MeshData.h.
Referenced by getBound().
|
protected |
Definition at line 65 of file MeshData.h.
Referenced by getIndices().
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
protected |
Definition at line 67 of file MeshData.h.
Referenced by getNumTriangles().
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protected |
Definition at line 64 of file MeshData.h.
Referenced by getVertices().