AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agxModel::AddedMassStorage Class Reference

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

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.
 
agx::Bool equals (const agxModel::AddedMassStorage *other, agx::Real threshold=agx::Real(0)) const
 Mostly for debug purposes.
 
const agxModel::AddedMassStorage::PhiContainer & getFlowData () const
 
agxModel::AddedMassStorage::Identifier getIdentifier () const
 
const agxModel::AddedMassStorage::NormalTangentContainer & getNormalTangentData () const
 
agxModel::AddedMassStorage::Report restore (agxStream::StorageStream &str)
 Restore data from stream.
 
agxModel::AddedMassStorage::Report store (agxStream::StorageStream &str) const
 Store data to stream.
 
- 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.
 

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.
 
static agx::Bool isValid (agxModel::AddedMassStorage::Identifier id)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

 AddedMassStorage (agxModel::AddedMassStorage::Identifier identifier)
 Construct given identifier.
 
virtual ~AddedMassStorage ()
 Reference counted object, protected destructor.
 
void allocate (agx::UInt numElements)
 Allocate internal structure given the number of elements (triangles).
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

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.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Storage that holds data needed for added mass calculations.

Definition at line 113 of file AddedMassDb.h.

Member Typedef Documentation

◆ Identifier

◆ NormalTangentContainer

◆ Phi

◆ PhiContainer

Constructor & Destructor Documentation

◆ AddedMassStorage()

agxModel::AddedMassStorage::AddedMassStorage ( agxModel::AddedMassStorage::Identifier  identifier)
protected

Construct given identifier.

◆ ~AddedMassStorage()

virtual agxModel::AddedMassStorage::~AddedMassStorage ( )
protectedvirtual

Reference counted object, protected destructor.

Member Function Documentation

◆ allocate()

void agxModel::AddedMassStorage::allocate ( agx::UInt  numElements)
protected

Allocate internal structure given the number of elements (triangles).

◆ create()

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.

◆ createIdentifier()

static agxModel::AddedMassStorage::Identifier agxModel::AddedMassStorage::createIdentifier ( const agx::String &  name)
static

Creates an identifier given name (normally path + filename) used to identify added mass storages.

◆ equals()

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.

◆ getFlowData()

const agxModel::AddedMassStorage::PhiContainer & agxModel::AddedMassStorage::getFlowData ( ) const
Returns
the flow data, empty if not loaded

◆ getIdentifier()

agxModel::AddedMassStorage::Identifier agxModel::AddedMassStorage::getIdentifier ( ) const
Returns
the identifier of this storage

◆ getNormalTangentData()

const agxModel::AddedMassStorage::NormalTangentContainer & agxModel::AddedMassStorage::getNormalTangentData ( ) const
Returns
normal-tangent data, empty if not loaded

◆ isValid()

static agx::Bool agxModel::AddedMassStorage::isValid ( agxModel::AddedMassStorage::Identifier  id)
static
Returns
true if the identifier is valid

◆ restore()

agxModel::AddedMassStorage::Report agxModel::AddedMassStorage::restore ( agxStream::StorageStream &  str)

Restore data from stream.

◆ store()

agxModel::AddedMassStorage::Report agxModel::AddedMassStorage::store ( agxStream::StorageStream &  str) const

Store data to stream.


The documentation for this class was generated from the following file: