AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxModel::WindAndWaterParameters Class Reference

#include <WindAndWaterParameters.h>

+ Inheritance diagram for agxModel::WindAndWaterParameters:

Public Types

enum  Coefficient { PRESSURE_DRAG, VISCOUS_DRAG, LIFT, BUOYANCY }
 
enum  ShapeTessellation {
  LOW, MEDIUM, HIGH, ULTRA_HIGH,
  DEFAULT_TESSELLATION = MEDIUM
}
 Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder. More...
 

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
 
agx::Real getCoefficient (Coefficient type) const
 
int getReferenceCount () const
 
const agxCollide::Shape * getShape () const
 
agxModel::WindAndWaterParameters::ShapeTessellation getShapeTessellationLevel () 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...
 
virtual void restore (agxStream::InputArchive &in)
 Internal method. More...
 
void setCoefficient (Coefficient type, agx::Real coefficient)
 Set pressure drag, viscous drag, lift or buoyancy coefficient. More...
 
void setShapeTessellationLevel (agxModel::WindAndWaterParameters::ShapeTessellation tessellation)
 Assign tessellation level for native shapes (sphere, capsule and cylinder) used during aero- and hydrodynamics integrations. More...
 
virtual void store (agxStream::OutputArchive &out) const
 Internal method. 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 void setAerodynamicCoefficient (WindAndWaterController *controller, agx::RigidBody *rb, Coefficient type, agx::Real coefficient)
 Set a aerodynamic coefficient for a rigid body. More...
 
static void setHydrodynamicCoefficient (WindAndWaterController *controller, agx::RigidBody *rb, Coefficient type, agx::Real coefficient)
 Set a hydrodynamic coefficient for a rigid body. More...
 
static agx::Real shapeTessellationLevelToResolution (agxModel::WindAndWaterParameters::ShapeTessellation tessellationLevel)
 Translate from ShapeTessellation to scale of default meshing technique. More...
 
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

 WindAndWaterParameters (const agxCollide::Shape *shape, agxModel::AddedMassDbRef addedMassDb)
 
virtual ~WindAndWaterParameters ()
 
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

agxModel::AddedMassDbRef m_addedMassDb
 
agxModel::AddedMassStorage::Identifier m_addedMassIdentifier
 
agx::Real m_buoyancyScaling
 
agx::Real m_liftCoefficient
 
Mutex m_mutex
 
ObserverContainer m_observers
 
agx::Real m_pressureDragCoefficient
 
AtomicValue m_refCount
 
agxCollide::ShapeConstObserver m_shape
 
ShapeTessellation m_tessellation
 
agx::Real m_viscousDragCoefficient
 

Detailed Description

Definition at line 28 of file WindAndWaterParameters.h.

Member Enumeration Documentation

Enumerator
PRESSURE_DRAG 
VISCOUS_DRAG 
LIFT 
BUOYANCY 

Definition at line 44 of file WindAndWaterParameters.h.

Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder.

Enumerator
LOW 
MEDIUM 
HIGH 
ULTRA_HIGH 
DEFAULT_TESSELLATION 

Definition at line 35 of file WindAndWaterParameters.h.

Constructor & Destructor Documentation

agxModel::WindAndWaterParameters::WindAndWaterParameters ( const agxCollide::Shape *  shape,
agxModel::AddedMassDbRef  addedMassDb 
)
protected
virtual agxModel::WindAndWaterParameters::~WindAndWaterParameters ( )
protectedvirtual

Member Function Documentation

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
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(), and agx::InternalData::getOrCreate().

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

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

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

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited
void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
agx::Real agxModel::WindAndWaterParameters::getCoefficient ( Coefficient  type) const
Returns
coefficient of type PRESSURE_DRAG, VISCOUS_DRAG, LIFT or BUOYANCY
static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
const agxCollide::Shape* agxModel::WindAndWaterParameters::getShape ( ) const
Returns
the shape these parameters are associated with
WindAndWaterParameters::ShapeTessellation agxModel::WindAndWaterParameters::getShapeTessellationLevel ( ) const
Returns
the current shape tessellation level

Definition at line 178 of file WindAndWaterParameters.h.

template<typename T >
bool agx::Referenced::is ( ) const
inherited
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.

Referenced by agxData::Val< UInt >::Val().

virtual void agxModel::WindAndWaterParameters::restore ( agxStream::InputArchive &  in)
virtual

Internal method.

static void agxModel::WindAndWaterParameters::setAerodynamicCoefficient ( WindAndWaterController *  controller,
agx::RigidBody *  rb,
Coefficient  type,
agx::Real  coefficient 
)
static

Set a aerodynamic coefficient for a rigid body.

Parameters
controller- The WindAndWaterController used.
rb- The rigid body whose coefficient we want to change.
type- The coefficient we want to change; PRESSURE_DRAG, VISCOUS_DRAG or LIFT.
coefficient- Value of the new coefficient.
void agxModel::WindAndWaterParameters::setCoefficient ( Coefficient  type,
agx::Real  coefficient 
)

Set pressure drag, viscous drag, lift or buoyancy coefficient.

Parameters
type- PRESSURE_DRAG, VISCOUS_DRAG, LIFT or BUOYANCY
coefficient- new coefficient
static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

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

static void agxModel::WindAndWaterParameters::setHydrodynamicCoefficient ( WindAndWaterController *  controller,
agx::RigidBody *  rb,
Coefficient  type,
agx::Real  coefficient 
)
static

Set a hydrodynamic coefficient for a rigid body.

Parameters
controller- The WindAndWaterController used.
rb- The rigid body whose coefficient we want to change.
type- The coefficient we want to change; PRESSURE_DRAG, VISCOUS_DRAG, LIFT or BUOYANCY.
coefficient- Value of the new coefficient.
void agxModel::WindAndWaterParameters::setShapeTessellationLevel ( agxModel::WindAndWaterParameters::ShapeTessellation  tessellation)

Assign tessellation level for native shapes (sphere, capsule and cylinder) used during aero- and hydrodynamics integrations.

This parameter is ignored for mesh shape types and box.

Parameters
tessellation- tessellation level
static agx::Real agxModel::WindAndWaterParameters::shapeTessellationLevelToResolution ( agxModel::WindAndWaterParameters::ShapeTessellation  tessellationLevel)
static

Translate from ShapeTessellation to scale of default meshing technique.

virtual void agxModel::WindAndWaterParameters::store ( agxStream::OutputArchive &  out) const
virtual

Internal method.

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.

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.

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

Member Data Documentation

agxModel::AddedMassDbRef agxModel::WindAndWaterParameters::m_addedMassDb
protected

Definition at line 130 of file WindAndWaterParameters.h.

agxModel::AddedMassStorage::Identifier agxModel::WindAndWaterParameters::m_addedMassIdentifier
protected

Definition at line 129 of file WindAndWaterParameters.h.

agx::Real agxModel::WindAndWaterParameters::m_buoyancyScaling
protected

Definition at line 128 of file WindAndWaterParameters.h.

agx::Real agxModel::WindAndWaterParameters::m_liftCoefficient
protected

Definition at line 126 of file WindAndWaterParameters.h.

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

agx::Real agxModel::WindAndWaterParameters::m_pressureDragCoefficient
protected

Definition at line 125 of file WindAndWaterParameters.h.

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

agxCollide::ShapeConstObserver agxModel::WindAndWaterParameters::m_shape
protected

Definition at line 131 of file WindAndWaterParameters.h.

ShapeTessellation agxModel::WindAndWaterParameters::m_tessellation
protected

Definition at line 132 of file WindAndWaterParameters.h.

agx::Real agxModel::WindAndWaterParameters::m_viscousDragCoefficient
protected

Definition at line 127 of file WindAndWaterParameters.h.


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