|
AGXDynamics
2.31.1.0
|
Storage that holds data needed for added mass calculations. More...
#include <AddedMassDb.h>
Inheritance diagram for agxModel::AddedMassStorage:Classes | |
| struct | Report |
| Report from creation, store and restore. More... | |
Public Types | |
| typedef agx::UInt32 | Identifier |
| typedef agx::VectorPOD< agx::Vec6 > | NormalTangentContainer |
| typedef agxModel::dense::Vector | Phi |
| typedef agx::Vector< Phi > | PhiContainer |
Public Member Functions | |
| 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 |
| agxModel::AddedMassStorage::Report | create (const agxCollide::Mesh *mesh, const agx::Vec3 &localCenterOfMassPosition) |
| Create/calculate data given mesh and center of mass position given in mesh coordinate frame. More... | |
| agx::Bool | equals (const agxModel::AddedMassStorage *other, agx::Real threshold=agx::Real(0)) const |
| Mostly for debug purposes. More... | |
| const agxModel::AddedMassStorage::PhiContainer & | getFlowData () const |
| agxModel::AddedMassStorage::Identifier | getIdentifier () const |
| const agxModel::AddedMassStorage::NormalTangentContainer & | getNormalTangentData () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| 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... | |
| agxModel::AddedMassStorage::Report | restore (agxStream::StorageStream &str) |
| Restore data from stream. More... | |
| agxModel::AddedMassStorage::Report | store (agxStream::StorageStream &str) const |
| Store data to stream. More... | |
| 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 agxModel::AddedMassStorage::Identifier | createIdentifier (const agx::String &name) |
| Creates an identifier given name (normally path + filename) used to identify added mass storages. More... | |
| static agx::Bool | isValid (agxModel::AddedMassStorage::Identifier id) |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| AddedMassStorage (agxModel::AddedMassStorage::Identifier identifier) | |
| Construct given identifier. More... | |
| virtual | ~AddedMassStorage () |
| Reference counted object, protected destructor. More... | |
| void | allocate (agx::UInt numElements) |
| Allocate internal structure given the number of elements (triangles). More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
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 | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Storage that holds data needed for added mass calculations.
Definition at line 38 of file AddedMassDb.h.
Definition at line 44 of file AddedMassDb.h.
Definition at line 43 of file AddedMassDb.h.
Definition at line 41 of file AddedMassDb.h.
Definition at line 42 of file AddedMassDb.h.
|
protected |
Construct given identifier.
|
protectedvirtual |
Reference counted object, protected destructor.
Allocate internal structure given the number of elements (triangles).
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| agxModel::AddedMassStorage::Report agxModel::AddedMassStorage::create | ( | const agxCollide::Mesh * | mesh, |
| const agx::Vec3 & | localCenterOfMassPosition | ||
| ) |
Create/calculate data given mesh and center of mass position given in mesh coordinate frame.
|
static |
Creates an identifier given name (normally path + filename) used to identify added mass storages.
|
protectedinherited |
| agx::Bool agxModel::AddedMassStorage::equals | ( | const agxModel::AddedMassStorage * | other, |
| agx::Real | threshold = agx::Real(0) |
||
| ) | const |
Mostly for debug purposes.
Check if two storages are identical.
|
staticprotectedinherited |
| const agxModel::AddedMassStorage::PhiContainer& agxModel::AddedMassStorage::getFlowData | ( | ) | const |
| agxModel::AddedMassStorage::Identifier agxModel::AddedMassStorage::getIdentifier | ( | ) | const |
| const agxModel::AddedMassStorage::NormalTangentContainer& agxModel::AddedMassStorage::getNormalTangentData | ( | ) | const |
|
inherited |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
static |
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.
| agxModel::AddedMassStorage::Report agxModel::AddedMassStorage::restore | ( | agxStream::StorageStream & | str | ) |
Restore data from stream.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| agxModel::AddedMassStorage::Report agxModel::AddedMassStorage::store | ( | agxStream::StorageStream & | str | ) | const |
Store data to stream.
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.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
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 |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.