AGXDynamics  2.31.1.0
agxModel::WindAndWaterController::ObjectData Class Reference

Static data for a shape. More...

#include <WindAndWaterController.h>

+ Inheritance diagram for agxModel::WindAndWaterController::ObjectData:

Public Member Functions

 ObjectData (const agxCollide::Shape *shape, const agxModel::AerodynamicsParameters *aeroParams, const agxModel::HydrodynamicsParameters *hydroParams, const agxModel::WaterWrapper *water, const agxModel::WindAndWaterController::WindWrapper *wind, const agx::Vec3 &gravity, agxModel::PressureFieldRenderer *pressureFieldRenderer, const agx::UInt numTriangles, const agx::UInt startIndexT, const agx::UInt startIndexV)
 Construct given shape, parameters, wind and water definitions and gravity. More...
 
agx::Matrix3x3 & addedInertia ()
 Access added inertia matrix. More...
 
agx::Matrix3x3 & addedMass ()
 Access added mass matrix. More...
 
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
 
agx::Bool & containsAddedMass ()
 Set to/is true if this data contains added mass and/or inertia. More...
 
const agx::Bool & containsAddedMass () const
 
agx::Vec3 & force ()
 Access force vector (in world coordinate system). More...
 
const agx::Matrix3x3 & getAddedInertia () const
 
const agx::Matrix3x3 & getAddedMass () const
 
const agxModel::AerodynamicsParameters * getAerodynamicsParameters () const
 
agx::Real getDensity (agx::Bool belowSurface) const
 
agx::Real getDensity (const agxModel::TriangleData &tData) const
 
agx::Real getDensity (const agxModel::VertexData &vData) const
 
agx::Real getDensityAir () const
 
agx::Real getDensityWater () const
 
const agx::Vec3 & getForce () const
 
const agxCollide::Geometry * getGeometry () const
 
const agx::Vec3 & getGravity () const
 
const agxModel::HydrodynamicsParameters * getHydrodynamicsParameters () const
 
agx::UInt getNumTriangles () const
 
agxModel::PressureFieldRenderer * getPressureFieldRenderer () const
 
int getReferenceCount () const
 
const agx::RigidBody * getRigidBody () const
 
agx::RigidBody * getRigidBodySerial ()
 This method is unsafe to use if this object is used during parallel execution. More...
 
const agxCollide::Shape * getShape () const
 
agx::UInt getStartIndexT () const
 
const agx::Vec3 & getTorque () const
 
const WaterWrapper * getWater () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
void lock () const
 Perform a mutex lock for this ObjectData. 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...
 
agx::Vec3 & torque ()
 Access torque vector (in world coordinate system). More...
 
void unLock () const
 Perform a mutex unlock for this ObjectData. 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

template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~ObjectData ()
 
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

const AerodynamicsParameters * m_aeroParams
 
const HydrodynamicsParameters * m_hydroParams
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Static data for a shape.

Definition at line 189 of file WindAndWaterController.h.

Constructor & Destructor Documentation

◆ ObjectData()

agxModel::WindAndWaterController::ObjectData::ObjectData ( const agxCollide::Shape *  shape,
const agxModel::AerodynamicsParameters *  aeroParams,
const agxModel::HydrodynamicsParameters *  hydroParams,
const agxModel::WaterWrapper *  water,
const agxModel::WindAndWaterController::WindWrapper *  wind,
const agx::Vec3 &  gravity,
agxModel::PressureFieldRenderer *  pressureFieldRenderer,
const agx::UInt  numTriangles,
const agx::UInt  startIndexT,
const agx::UInt  startIndexV 
)

Construct given shape, parameters, wind and water definitions and gravity.

◆ ~ObjectData()

virtual agxModel::WindAndWaterController::ObjectData::~ObjectData ( )
protectedvirtual

Member Function Documentation

◆ addedInertia()

agx::Matrix3x3& agxModel::WindAndWaterController::ObjectData::addedInertia ( )

Access added inertia matrix.

Must be in body frame.

◆ addedMass()

agx::Matrix3x3& agxModel::WindAndWaterController::ObjectData::addedMass ( )

Access added mass matrix.

Must be in body frame.

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
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().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ containsAddedMass() [1/2]

agx::Bool& agxModel::WindAndWaterController::ObjectData::containsAddedMass ( )

Set to/is true if this data contains added mass and/or inertia.

◆ containsAddedMass() [2/2]

const agx::Bool& agxModel::WindAndWaterController::ObjectData::containsAddedMass ( ) const
Returns
true if this data contains added mass and/or inertia.

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ force()

agx::Vec3& agxModel::WindAndWaterController::ObjectData::force ( )

Access force vector (in world coordinate system).

Referenced by agxModel::triangleIterator().

◆ getAddedInertia()

const agx::Matrix3x3& agxModel::WindAndWaterController::ObjectData::getAddedInertia ( ) const
Returns
added inertia matrix in rigid body frame

◆ getAddedMass()

const agx::Matrix3x3& agxModel::WindAndWaterController::ObjectData::getAddedMass ( ) const
Returns
added mass matrix in rigid body frame

◆ getAerodynamicsParameters()

const AerodynamicsParameters * agxModel::WindAndWaterController::WindAndWaterData::getAerodynamicsParameters ( ) const
inherited
Returns
aerodynamic parameters for the shape

Definition at line 1157 of file WindAndWaterController.h.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getDensity() [1/3]

agx::Real agxModel::WindAndWaterController::ObjectData::getDensity ( agx::Bool  belowSurface) const
Returns
density of the water if belowSurface = true, density of air if belowSurface = false

◆ getDensity() [2/3]

agx::Real agxModel::WindAndWaterController::ObjectData::getDensity ( const agxModel::TriangleData &  tData) const
Returns
the density of the medium the triangle is currently in

◆ getDensity() [3/3]

agx::Real agxModel::WindAndWaterController::ObjectData::getDensity ( const agxModel::VertexData &  vData) const
Returns
the density of the medium the vertex is currently in

◆ getDensityAir()

agx::Real agxModel::WindAndWaterController::ObjectData::getDensityAir ( ) const
Returns
the density of air

◆ getDensityWater()

agx::Real agxModel::WindAndWaterController::ObjectData::getDensityWater ( ) const
Returns
the density of water

◆ getForce()

const agx::Vec3& agxModel::WindAndWaterController::ObjectData::getForce ( ) const
Returns
the force (in world coordinate system) applied by the wind and water algorithms given they have been executed

◆ getGeometry()

const agxCollide::Geometry* agxModel::WindAndWaterController::ObjectData::getGeometry ( ) const
Returns
the geometry of the shape

◆ getGravity()

const agx::Vec3& agxModel::WindAndWaterController::ObjectData::getGravity ( ) const
Returns
the gravity at the position of the shape

◆ getHydrodynamicsParameters()

const HydrodynamicsParameters * agxModel::WindAndWaterController::WindAndWaterData::getHydrodynamicsParameters ( ) const
inherited
Returns
hydrodynamic parameters for the shape

Definition at line 1162 of file WindAndWaterController.h.

◆ getNumTriangles()

agx::UInt agxModel::WindAndWaterController::ObjectData::getNumTriangles ( ) const
Returns
number of triangles for this object

Referenced by agxModel::triangleIterator().

◆ getPressureFieldRenderer()

agxModel::PressureFieldRenderer* agxModel::WindAndWaterController::ObjectData::getPressureFieldRenderer ( ) const
Returns
the pressure field renderer if present, otherwise null

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getRigidBody()

const agx::RigidBody* agxModel::WindAndWaterController::ObjectData::getRigidBody ( ) const
Returns
the rigid body of the geometry

Referenced by agxModel::triangleIterator().

◆ getRigidBodySerial()

agx::RigidBody* agxModel::WindAndWaterController::ObjectData::getRigidBodySerial ( )

This method is unsafe to use if this object is used during parallel execution.

Returns
the rigid body of the geometry

◆ getShape()

const agxCollide::Shape* agxModel::WindAndWaterController::ObjectData::getShape ( ) const
Returns
the shape

◆ getStartIndexT()

agx::UInt agxModel::WindAndWaterController::ObjectData::getStartIndexT ( ) const
Returns
start index for triangles of this object

Referenced by agxModel::triangleIterator().

◆ getTorque()

const agx::Vec3& agxModel::WindAndWaterController::ObjectData::getTorque ( ) const
Returns
the torque (in world coordinate system) applied by the wind and water algorithms given they have been executed

◆ getWater()

const WaterWrapper* agxModel::WindAndWaterController::ObjectData::getWater ( ) const
Returns
the water wrapper

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ lock()

void agxModel::WindAndWaterController::ObjectData::lock ( ) const
inline

Perform a mutex lock for this ObjectData.

Definition at line 330 of file WindAndWaterController.h.

Referenced by agxModel::triangleIterator().

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

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.

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ torque()

agx::Vec3& agxModel::WindAndWaterController::ObjectData::torque ( )

Access torque vector (in world coordinate system).

Referenced by agxModel::triangleIterator().

◆ unLock()

void agxModel::WindAndWaterController::ObjectData::unLock ( ) const
inline

Perform a mutex unlock for this ObjectData.

Definition at line 335 of file WindAndWaterController.h.

Referenced by agxModel::triangleIterator().

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

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().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
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.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ m_aeroParams

const AerodynamicsParameters* agxModel::WindAndWaterController::WindAndWaterData::m_aeroParams
protectedinherited

Definition at line 182 of file WindAndWaterController.h.

◆ m_hydroParams

const HydrodynamicsParameters* agxModel::WindAndWaterController::WindAndWaterData::m_hydroParams
protectedinherited

Definition at line 183 of file WindAndWaterController.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.


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