AGX Dynamics  2.37.3.2
agxModel::WindAndWaterController Class Reference

Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynamics). More...

#include <WindAndWaterController.h>

+ Inheritance diagram for agxModel::WindAndWaterController:

Classes

struct  AerodynamicsData
 
struct  DynamicsData
 Data for rigid body with aero/hydro static/dynamic forces and added mass and inertia matrices. More...
 
struct  DynamicsLinkedStructureData
 Hydro- and aerodynamic results for a linked structure. More...
 
struct  DynamicsWireData
 Hydro- and aerodynamic results for a wire. More...
 
class  ObjectData
 Static data for a shape. More...
 
struct  PressureFieldRendererData
 
struct  Segment
 
class  UnitPrimitiveCache
 
class  WaterFlowGenerator
 Interface for generating water flow. More...
 
class  WindAndWaterData
 Data for different objects. More...
 
class  WindAndWaterFlowGenerator
 Interface for generating water flow and wind. More...
 
class  WindGenerator
 Interface for generating wind effects. More...
 
class  WindWrapper
 Wraps wind related things. More...
 
class  WireLinkedStructureData
 Data for a wire or a linked structure. More...
 
struct  WirePair
 

Public Types

typedef agx::observer_ptr< const Algorithm > AlgorithmConstObserver
 
typedef agx::ref_ptr< const Algorithm > AlgorithmConstRef
 
typedef agx::observer_ptr< Algorithm > AlgorithmObserver
 
typedef agx::ref_ptr< Algorithm > AlgorithmRef
 
enum  ForceType {
  OTHER = 0, PRESSURE_DRAG, VISCOUS_DRAG, LIFT,
  BUOYANCY, Count
}
 
typedef agxModel::WindAndWaterController::ObjectData ObjectData
 
typedef agx::Vector< ObjectDataRef > ObjectDataContainer
 
typedef agx::ref_ptr< ObjectData > ObjectDataRef
 
typedef agx::Vector< Segment > SegmentContainer
 
typedef agx::observer_ptr< const WaterFlowGenerator > WaterFlowGeneratorConstObserver
 
typedef agx::ref_ptr< const WaterFlowGenerator > WaterFlowGeneratorConstRef
 
typedef agx::observer_ptr< WaterFlowGenerator > WaterFlowGeneratorObserver
 
typedef agx::ref_ptr< WaterFlowGenerator > WaterFlowGeneratorRef
 
typedef agx::observer_ptr< const WindGenerator > WindGeneratorConstObserver
 
typedef agx::ref_ptr< const WindGenerator > WindGeneratorConstRef
 
typedef agx::observer_ptr< WindGenerator > WindGeneratorObserver
 
typedef agx::ref_ptr< WindGenerator > WindGeneratorRef
 
typedef agx::Vector< WireLinkedStructureDataRef > WireLinkedStructureDataContainer
 
typedef agx::ref_ptr< WireLinkedStructureData > WireLinkedStructureDataRef
 
typedef agx::Vector< WirePair > WirePairContainer
 
- Public Types inherited from agxSDK::StepEventListener
enum  ActivationMask {
  STEP_NONE = 0x0, PRE_COLLIDE = 0x1, PRE_STEP = 0x2, POST_STEP = 0x4,
  LAST_STEP = 0x8, DEFAULT = PRE_STEP | POST_STEP, ALL = PRE_COLLIDE | PRE_STEP | POST_STEP | LAST_STEP
}
 Defines the event states for which a listener will be activated, a mask can be bitwise OR:ed from these members. More...
 
- Public Types inherited from agxSDK::EventListener
enum  Type { UNDEFINED_TYPE, STEP_EVENT_LISTENER, CONTACT_EVENT_LISTENER, GUI_EVENT_LISTENER }
 Type of EventListener. More...
 
- Public Types inherited from agx::Component
typedef Event2< Component *, Object * > ObjectEvent
 Event when adding removing child objects. More...
 
typedef Callback1< Object * > TraverseCallback
 
- Public Types inherited from agx::Object
typedef agx::observer_ptr< const Event > EventConstObserver
 
typedef agx::ref_ptr< const Event > EventConstRef
 
typedef agx::observer_ptr< Event > EventObserver
 
typedef agx::Vector< EventObserver > EventObserverVector
 
typedef agx::VectorPOD< Event * > EventPtrVector
 
typedef agx::ref_ptr< Event > EventRef
 
typedef agx::Vector< EventRef > EventRefVector
 

Public Member Functions

 WindAndWaterController ()
 Construct wind and water controller. More...
 
virtual agx::Bool addWater (agxCollide::Geometry *geometry)
 Flag a geometry as water. More...
 
virtual agxModel::WindAndWaterController::DynamicsData calculateDynamicsData (const agxCollide::Geometry *waterGeometry, const agx::RigidBody *rb, const agx::Vec3 &gravity, const agxCollide::Space *space=nullptr, agx::Bool updateRenderers=false)
 Calculates forces given water geometry (may be null) acting on a rigid body. More...
 
agxModel::WindAndWaterController::DynamicsLinkedStructureData calculateLinkedStructureDynamicsData (const agxCollide::Geometry *waterGeometry, agxSDK::LinkedStructure *linkedStructure, const agxCollide::Space *space)
 Calculates forces for hydro- and aerodynamics acting on a linked structure. More...
 
agxModel::WindAndWaterController::DynamicsWireData calculateWireDynamicsData (const agxCollide::Geometry *waterGeometry, agxWire::Wire *wire)
 Calculates forces for hydro- and aerodynamics acting on a wire. More...
 
bool getCenterOfBuoyancy (agxCollide::Geometry *geometry, agx::Vec3 &centerOfBuoyancy) const
 Get the center of buoyancy based on the triangular mesh of the given geometry. More...
 
bool getCenterOfBuoyancy (agx::RigidBody *body, agx::Vec3 &centerOfBuoyancy) const
 Get the weighted average center of buoyancy for all the geometries in a rigid body. More...
 
const char * getClassName () const override
 
bool getEnableCenterOfBuoyancy (const agxCollide::Geometry *geometry) const
 Get if the center of buoyancy calculations are enabled or not for the given geometry. More...
 
agx::Vec3 getForce (agxCollide::Geometry *geometry) const
 Get the total hydrodynamic force on a geometry. More...
 
agx::Vec3 getForce (agx::RigidBody *body) const
 Get the total hydrodynamic force on a geometry. More...
 
agx::Vec3 getForceComponent (agxCollide::Geometry *geometry, WindAndWaterController::ForceType type) const
 Get the given part of the hydrodynamic force for a geometry. More...
 
agx::Vec3 getForceComponent (agx::RigidBody *body, WindAndWaterController::ForceType type) const
 Get the given part of the hydrodynamic force for a rigid body. More...
 
virtual WindAndWaterController::ForceType getForceType () const
 
virtual agxModel::AerodynamicsParameters * getOrCreateAerodynamicsParameters (const agxCollide::Shape *shape) const
 Creates new or returns an already created parameter storage for a given shape. More...
 
agxModel::AerodynamicsParameters * getOrCreateAerodynamicsParameters (const agxWire::Wire *wire) const
 Creates new or returns an already created parameter storage for a given wire. More...
 
agxModel::AerodynamicsParameters * getOrCreateAerodynamicsParameters (const agxSDK::LinkedStructure *linkedStructure) const
 Creates new or returns an already created parameter storage for a given linked structure. More...
 
virtual agxModel::HydrodynamicsParameters * getOrCreateHydrodynamicsParameters (const agxCollide::Shape *shape) const
 Creates new or returns an already created parameter storage for a given shape. More...
 
agxModel::HydrodynamicsParameters * getOrCreateHydrodynamicsParameters (const agxWire::Wire *wire) const
 Creates new or returns an already created parameter storage for a given wire. More...
 
agxModel::HydrodynamicsParameters * getOrCreateHydrodynamicsParameters (const agxSDK::LinkedStructure *linkedStructure) const
 Creates new or returns an already created parameter storage for a given linked structure. More...
 
agxStream::StorageAgent * getStorageAgent () const override
 
agx::Vec3 getTorque (agxCollide::Geometry *geometry) const
 Get the total hydrodynamic torque on a geometry. More...
 
agx::Vec3 getTorque (agx::RigidBody *body) const
 Get the total hydrodynamic torque on a rigid body. More...
 
agx::Vec3 getTorqueComponent (agxCollide::Geometry *geometry, WindAndWaterController::ForceType type) const
 Get the given part of the hydrodynamic torque for a geometry. More...
 
agx::Vec3 getTorqueComponent (agx::RigidBody *body, WindAndWaterController::ForceType type) const
 Get the given part of the hydrodynamic torque for a geometry. More...
 
agxModel::WindAndWaterController::WaterFlowGenerator * getWaterFlowGenerator (const agxCollide::Geometry *waterGeometry) const
 
agxModel::WaterWrapper * getWaterWrapper (const agxCollide::Geometry *waterGeometry)
 
virtual agxModel::WindAndWaterController::WindGenerator * getWindGenerator () const
 
virtual void post (const agx::TimeStamp &) override
 Internal method. More...
 
virtual void post (agxModel::WindAndWaterController *)
 Called during normal post. More...
 
virtual void pre (const agx::TimeStamp &) override
 Internal method. More...
 
virtual void pre (agxModel::WindAndWaterController *)
 Called before all data is collected and before updateInteraction is called. More...
 
virtual void preCollide (const agx::TimeStamp &) override
 Internal method. More...
 
virtual void preCollide (agxModel::WindAndWaterController *)
 Called during normal preCollide events. More...
 
virtual agx::Bool registerPressureFieldRenderer (agxModel::PressureFieldRenderer *pressureFieldRenderer, const agxCollide::Shape *shape)
 Pressure field renderer for a given shape. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void setAirDensity (agx::Real airDensity)
 Set the density of air. More...
 
virtual agx::Bool setEnableAerodynamics (agxCollide::Geometry *geometry, agx::Bool enable)
 Enable/disable a geometry for aerodynamics calculations. More...
 
virtual void setEnableAerodynamics (agx::Bool enable)
 Enable/disable aerodynamics for all objects in the simulation. More...
 
virtual agx::Bool setEnableAerodynamics (agx::RigidBody *rb, agx::Bool enable)
 Enable/disable all geometries in rb for aerodynamics calculations. More...
 
virtual agx::Bool setEnableAerodynamics (agxWire::Wire *wire, agx::Bool enable)
 Enable/disable a wire for aerodynamics calculations. More...
 
agx::Bool setEnableAerodynamics (agxSDK::LinkedStructure *linkedStructure, agx::Bool enable)
 Enable/disable a linked structure for aerodynamics calculations. More...
 
void setEnableCenterOfBuoyancy (agxCollide::Geometry *geometry, bool enable)
 Enable or disable the center of buoyancy calculations for a geometry. More...
 
void setEnableCenterOfBuoyancy (agx::RigidBody *body, bool enable)
 Enable or disable the center of buoyancy calculations for all geometries in a rigid body. More...
 
virtual agx::Bool setWaterFlowGenerator (const agxCollide::Geometry *waterGeometry, agxModel::WindAndWaterController::WaterFlowGenerator *flowGenerator)
 Assign unique water flow generator to a water geometry. More...
 
virtual agx::Bool setWaterWrapper (agxCollide::Geometry *geometry, agxModel::WaterWrapper *waterWrapper)
 Assign a water wrapper to a water geometry;. More...
 
virtual void setWindGenerator (agxModel::WindAndWaterController::WindGenerator *windGenerator)
 Assign unique wind generator. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual void updateInteraction (agxModel::WindAndWaterController::ObjectData &, const GlobalTriangleData::Container &)
 Called when it's time to update interaction. More...
 
- Public Member Functions inherited from agxSDK::StepEventListener
 StepEventListener (int mask=DEFAULT)
 Default constructor, sets the default activation mask to all (POST_STEP and PRE_STEP) events. More...
 
const char * getClassName () const override
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void last (const agx::TimeStamp &time)
 Called after a step is taken in the simulation Implement this method in the derived class to get callbacks. More...
 
virtual void setMask (int mask) override
 Specifies a bitmask which determines which event types will activate this listener. More...
 
- Public Member Functions inherited from agxSDK::EventListener
virtual void addNotification ()
 Called when this listener is added to the simulation. More...
 
int getMask () const
 
agx::UInt32 getPriority () const
 
Simulation * getSimulation ()
 
const Simulation * getSimulation () const
 
Type getType () const
 
bool isEnabled () const
 
virtual void removeNotification ()
 Called when this listener is removed from the simulation. More...
 
void setEnable (bool enable)
 Specify whether the listener should react at all at events. More...
 
- Public Member Functions inherited from agx::Component
 Component (const agx::Name &name=agx::Name(), agx::Model *model=agx::Component::ClassModel(), agx::Device *device=nullptr)
 
virtual void addObject (agx::Object *object, bool assignContext=true)
 Add an object to the component. More...
 
virtual String autoComplete (const String &partialName, StringVector &matchingNames) const
 
virtual void buildNavigationTree (agxJson::Value &eNode) const override
 
virtual void configure (TiXmlElement *eComponent) override
 
void configure (Model *model)
 
agx::Device * getDevice ()
 
const agx::Device * getDevice () const
 
template<typename T >
T * getDevice ()
 
template<typename T >
const T * getDevice () const
 
size_t getNumObjects (const agx::Name &name) const
 
agx::Object * getObject (const agx::Name &name, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, size_t index=0) const
 
agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0) const
 
template<typename T >
T * getObject (const agx::Name &name, size_t index=0)
 
template<typename T >
const T * getObject (const agx::Name &name, size_t index=0) const
 
const agx::ObjectRefVector & getObjects () const
 
template<typename T >
void getObjects (agx::ObjectPtrVector &result, bool recursive=false) const
 
void getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const
 
virtual Object * getResourceImpl (const Path &path, agx::Model *model) override
 
virtual void printSubtree () const override
 
void printSubtree (std::ostream &stream, int depth=0) const
 
virtual void rebind () override
 
void removeAllObjects ()
 Remove all components. More...
 
virtual void removeObject (agx::Object *object)
 Remove an object from the component. More...
 
void removeObject (const agx::Name &name, size_t index=0)
 Remove an object with a specified name (and optional index) from the component. More...
 
virtual void snapshot (TiXmlNode *eParent, const String &directory) const override
 
void traverse (const TraverseCallback &callback)
 
void traverse (ComponentVisitor *)
 
- Public Member Functions inherited from agx::Object
 Object (const Name &name=Name(), Model *model=Object::ClassModel())
 
void addListener (EventListener *listener)
 
agx::String fullName () const
 
agx::String fullPath () const
 
agx::String fullPath (const agx::Object *root) const
 
agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const
 
template<typename T >
T * getAutoScopedResource (const agx::Path &path)
 
template<typename T >
const T * getAutoScopedResource (const agx::Path &path) const
 
agx::Object * getContext ()
 
const agx::Object * getContext () const
 
template<typename T >
T * getContext ()
 
template<typename T >
const T * getContext () const
 
agx::UInt32 getId () const
 
const agx::Name & getImplementationName () const
 
agx::Model * getModel ()
 
const agx::Model * getModel () const
 
const agx::Name & getName () const
 
agx::Object * getNextSibling ()
 
const agx::Object * getNextSibling () const
 
agx::Path getPath () const
 
agx::Path getPath (const agx::Object *root) const
 
agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr) const
 
template<typename T >
T * getResource (const agx::Path &path)
 
template<typename T >
const T * getResource (const agx::Path &path) const
 
agx::Object * getRootContext ()
 
const agx::Object * getRootContext () const
 
bool hasListener (EventListener *listener)
 
bool hasParent (const agx::Object *node) const
 
bool isUnique () const
 
void removeListener (EventListener *listener)
 
virtual void save (TiXmlElement *) const
 
virtual void setContext (agx::Object *context)
 
void setId (UInt32 id)
 
void setModel (agx::Model *model)
 Set the object model (handled automatically). More...
 
void setName (const agx::Name &name)
 Set the name of the object. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
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
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. 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...
 
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...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
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...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static agxCollide::TrimeshRef createPrimitiveMesh (const agxCollide::Shape *shape, agxModel::WindAndWaterParameters::ShapeTessellation tessellation)
 Create a mesh from a primitive shape given a tessellation level. More...
 
static agxModel::WindAndWaterController * find (agxSDK::Simulation *simulation, const agx::Uuid &uuid)
 Search the given simulation for a WindAndWaterController with the given Uuid. More...
 
static agxModel::WindAndWaterControllerPtrVector findAll (const agxSDK::Simulation *simulation, const agx::Name &name)
 Find all WindAndWaterControllers with given name. More...
 
static agxModel::WindAndWaterControllerPtrVector findAll (const agxSDK::Simulation *simulation)
 Finds all WindAndWaterControllers in the given simulation. More...
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxSDK::StepEventListener
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxSDK::EventListener
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Component
static Component * _load (TiXmlElement *eComponent, Device *device)
 
static agx::Model * ClassModel ()
 
static Component * load (const String &path, const Path &_namespace=Path())
 
static Component * load (const String &path, Device *device, const Path &_namespace=Path())
 
static Component * load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path())
 
static Component * load (TiXmlElement *eComponent, Device *device)
 
- Static Public Member Functions inherited from agx::Object
static agx::Model * ClassModel ()
 
static agx::String generateName (const agx::String &bindPath)
 
static const HashSet< Object * > & getActiveObjects ()
 
static bool getEnableRebind ()
 Should rebinding be allowed? Right now a global setting. More...
 
static Object * load (TiXmlElement *eObject, Device *device)
 
template<typename T >
static T * load (TiXmlElement *eObject, Device *device)
 
static Object * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
static Object * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
static void load (const String &path, Device *device, ObjectPtrVector &loadedObjects)
 
template<typename T >
static T * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
template<typename T >
static T * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
static TiXmlDocument openDocument (const String &path)
 
static void setEnableRebind (bool flag)
 Sets if rebinding of objects should be allowed (Right now a global setting). More...
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Types

typedef agx::HashVector< const agxCollide::Geometry *, AerodynamicsDataRef > AerodynamicsDataContainer
 
typedef agx::ref_ptr< AerodynamicsData > AerodynamicsDataRef
 
typedef agx::HashVector< const agxCollide::Shape *, AerodynamicsParametersRef > AerodynamicsParametersContainer
 
typedef agx::HashVector< const agxSDK::LinkedStructure *, AerodynamicsParametersRef > AerodynamicsParametersLinkedStructureContainer
 
typedef agx::HashVector< const agxWire::Wire *, AerodynamicsParametersRef > AerodynamicsParametersWireContainer
 
typedef agx::Vector< agxModel::WindAndWaterController::AlgorithmRef > AlgorithmContainer
 
typedef agx::HashVector< const agxCollide::Geometry *, std::pair< agx::Vec3, agx::Real > > CenterOfBuoyancyContainer
 
typedef agx::HashVector< const agxCollide::Geometry *, bool > EnableCbContainer
 
typedef agx::Vector< agxCollide::GeometryConstObserver > GeometryConstObserverVector
 
typedef agx::HashVector< const agxCollide::Geometry *, std::pair< agx::Vec3Vector, agx::Vec3Vector > > GeometryForceTorqueContainer
 
typedef agx::HashVector< const agxCollide::Shape *, HydrodynamicsParametersRef > HydrodynamicsParametersContainer
 
typedef agx::HashVector< const agxSDK::LinkedStructure *, HydrodynamicsParametersRef > HydrodynamicsParametersLinkedStructureContainer
 
typedef agx::HashVector< const agxWire::Wire *, HydrodynamicsParametersRef > HydrodynamicsParametersWireContainer
 
typedef agx::HashVector< const agxCollide::Shape *, PressureFieldRendererDataRef > PressureFieldRendererDataContainer
 
typedef agx::ref_ptr< PressureFieldRendererData > PressureFieldRendererDataRef
 
typedef agx::HashVector< const agxCollide::Geometry *, WaterFlowGeneratorRef > WaterFlowGeneratorContainer
 
typedef agx::HashVector< const agxCollide::Geometry *, WaterWrapperRef > WaterWrapperContainer
 
typedef agx::Vector< agxWire::WireObserver > WireObserverVector
 

Protected Member Functions

virtual ~WindAndWaterController ()
 Reference counted object, protected destructor. More...
 
agxModel::WindAndWaterController::WireLinkedStructureData * calculateLinkedStructureData (const agxCollide::Geometry *waterGeometry, const agxCollide::Geometry *geometry, const agx::Vec3 &gravity, const AerodynamicsParameters *aeroParams, const HydrodynamicsParameters *hydroParams, agx::Bool aeroEnabled, agx::Bool hydroEnabled, const agx::TimeStamp &t=0)
 Calculate linked structure data for all segments. More...
 
virtual agxModel::WindAndWaterController::ObjectDataContainer calculateObjectData (const agxCollide::Geometry *waterGeometry, const agxCollide::Geometry *geometry, const agx::Vec3 &gravity, agx::Bool aeroEnabled, agx::Bool hydroEnabled, agx::Bool updateRenderers, const agx::UIntVector startIndexT, const agx::UIntVector startIndexV, const agx::TimeStamp &t=0)
 Calculate object data (for each shape) in a geometry. More...
 
agxModel::WindAndWaterController::WireLinkedStructureData * calculateWireData (agxWire::Wire *wire, WirePairContainer wirePairs, WindAndWaterController::WindWrapper wind, agx::Bool aeroEnable, const agx::TimeStamp &t=0)
 Calculate wire data for all segments. More...
 
void configureDefaultAlgorithms ()
 Configure the default algorithms. More...
 
void garbageCollect ()
 Collects garbage (e.g., due to deleted shapes). More...
 
agxModel::PressureFieldRenderer * getPressureFieldRender (const agxCollide::Shape *shape) const
 
agxModel::WindAndWaterController::PressureFieldRendererData * getPressureFieldRenderData (const agxCollide::Shape *shape) const
 
void getSizeOfGeometry (const agxCollide::Geometry *geometry, agx::UIntVector &numTriangles, agx::UIntVector &numVertices)
 
virtual void updateAlgorithms (const ObjectDataContainer &data, bool updateRenderers)
 Updates algorithms given current triangle data. More...
 
- Protected Member Functions inherited from agxSDK::StepEventListener
virtual ~StepEventListener ()
 Destructor. More...
 
- Protected Member Functions inherited from agxSDK::EventListener
 EventListener (Type type=UNDEFINED_TYPE)
 Default constructor. More...
 
virtual ~EventListener ()
 Destructor. More...
 
void setSimulation (Simulation *simulation)
 Set the associated simulation for this EventListener. More...
 
- Protected Member Functions inherited from agx::Component
virtual ~Component ()
 
String expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const
 
void setDevice (Device *device)
 
- Protected Member Functions inherited from agx::Object
virtual ~Object ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Protected Attributes

AddedMassDbRef m_addedMassDb
 
AerodynamicsParametersContainer m_aerodynamicsParameters
 
AerodynamicsParametersLinkedStructureContainer m_aerodynamicsParametersLinkedStructures
 
AerodynamicsParametersWireContainer m_aerodynamicsParametersWires
 
agx::Bool m_aeroForAll
 
AerodynamicsDataContainer m_aeroGeometries
 
WireObserverVector m_aeroWires
 
agx::Real m_airDensity
 
AlgorithmContainer m_algorithms
 
CenterOfBuoyancyContainer m_centerOfBuoyancy
 
EnableCbContainer m_enableCenterOfBuoyancy
 
WaterFlowGeneratorContainer m_flowGenerators
 
GeometryForceTorqueContainer m_geomForcesAndTorques
 
AerodynamicsParametersRef m_globalAerodynamicsParameters
 
HydrodynamicsParametersRef m_globalHydrodynamicsParameters
 
HydrodynamicsParametersContainer m_hydrodynamicsParameters
 
HydrodynamicsParametersLinkedStructureContainer m_hydrodynamicsParametersLinkedStructures
 
HydrodynamicsParametersWireContainer m_hydrodynamicsParametersWires
 
PressureFieldRendererDataContainer m_pressureFieldRenderers
 
GlobalTriangleData::Container m_trianglePool
 
UnitPrimitiveCache m_unitPrimitiveCache
 
VertexData::Container m_vertexPool
 
GeometryConstObserverVector m_waterGeometries
 
WaterWrapperContainer m_waterWrappers
 
WindGeneratorRef m_windGenerator
 
- Protected Attributes inherited from agxSDK::EventListener
bool m_enabled
 
int m_mask
 
agx::UInt32 m_priority
 
Type m_type
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Public Attributes inherited from agx::Component
ObjectEvent addObjectEvent
 
ObjectEvent removeObjectEvent
 
- 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. More...
 

Detailed Description

Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynamics).

Interface for a WindAndWaterController algorithm.

Callbacks during preCollide, pre and post state. Forces should be calculated in the updateInteraction call where all static data is present for a given shape.

Definition at line 45 of file WindAndWaterController.h.

Member Typedef Documentation

◆ AerodynamicsDataContainer

◆ AerodynamicsDataRef

◆ AerodynamicsParametersContainer

◆ AerodynamicsParametersLinkedStructureContainer

◆ AerodynamicsParametersWireContainer

◆ AlgorithmConstObserver

◆ AlgorithmConstRef

Definition at line 48 of file WindAndWaterController.h.

◆ AlgorithmContainer

◆ AlgorithmObserver

◆ AlgorithmRef

◆ CenterOfBuoyancyContainer

◆ EnableCbContainer

◆ GeometryConstObserverVector

◆ GeometryForceTorqueContainer

◆ HydrodynamicsParametersContainer

◆ HydrodynamicsParametersLinkedStructureContainer

◆ HydrodynamicsParametersWireContainer

◆ ObjectData

◆ ObjectDataContainer

◆ ObjectDataRef

◆ PressureFieldRendererDataContainer

◆ PressureFieldRendererDataRef

◆ SegmentContainer

◆ WaterFlowGeneratorConstObserver

◆ WaterFlowGeneratorConstRef

◆ WaterFlowGeneratorContainer

◆ WaterFlowGeneratorObserver

◆ WaterFlowGeneratorRef

◆ WaterWrapperContainer

◆ WindGeneratorConstObserver

◆ WindGeneratorConstRef

◆ WindGeneratorObserver

◆ WindGeneratorRef

◆ WireLinkedStructureDataContainer

◆ WireLinkedStructureDataRef

◆ WireObserverVector

◆ WirePairContainer

Member Enumeration Documentation

◆ ForceType

Enumerator
OTHER 
PRESSURE_DRAG 
VISCOUS_DRAG 
LIFT 
BUOYANCY 
Count 

Definition at line 50 of file WindAndWaterController.h.

Constructor & Destructor Documentation

◆ WindAndWaterController()

agxModel::WindAndWaterController::WindAndWaterController ( )

Construct wind and water controller.

◆ ~WindAndWaterController()

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

Reference counted object, protected destructor.

Member Function Documentation

◆ addWater()

virtual agx::Bool agxModel::WindAndWaterController::addWater ( agxCollide::Geometry *  geometry)
virtual

Flag a geometry as water.

Overlap calculations will be made explicitly with other geometries where hydrodynamics is enabled.

Parameters
geometry- water geometry

◆ calculateDynamicsData()

virtual agxModel::WindAndWaterController::DynamicsData agxModel::WindAndWaterController::calculateDynamicsData ( const agxCollide::Geometry *  waterGeometry,
const agx::RigidBody *  rb,
const agx::Vec3 &  gravity,
const agxCollide::Space *  space = nullptr,
agx::Bool  updateRenderers = false 
)
virtual

Calculates forces given water geometry (may be null) acting on a rigid body.

Parameters
waterGeometry- water geometry
rb- rigid body to calculate (aero and hydro) interactions
gravity- gravity at rb position
space- if space is provided, group collision filters are checked as well (i.e., basically space->canCollide( waterGeoemtry, rbGeometry ))
updateRenderers- if true, any shape with a pressure field renderer will be updated
Returns
forces and added mass

◆ calculateLinkedStructureData()

agxModel::WindAndWaterController::WireLinkedStructureData* agxModel::WindAndWaterController::calculateLinkedStructureData ( const agxCollide::Geometry *  waterGeometry,
const agxCollide::Geometry *  geometry,
const agx::Vec3 &  gravity,
const AerodynamicsParameters *  aeroParams,
const HydrodynamicsParameters *  hydroParams,
agx::Bool  aeroEnabled,
agx::Bool  hydroEnabled,
const agx::TimeStamp &  t = 0 
)
protected

Calculate linked structure data for all segments.

◆ calculateLinkedStructureDynamicsData()

agxModel::WindAndWaterController::DynamicsLinkedStructureData agxModel::WindAndWaterController::calculateLinkedStructureDynamicsData ( const agxCollide::Geometry *  waterGeometry,
agxSDK::LinkedStructure *  linkedStructure,
const agxCollide::Space *  space 
)

Calculates forces for hydro- and aerodynamics acting on a linked structure.

Parameters
waterGeometry- water geometry
linkedStructure- linked structure affected by hydro- and aerodynamics.

◆ calculateObjectData()

virtual agxModel::WindAndWaterController::ObjectDataContainer agxModel::WindAndWaterController::calculateObjectData ( const agxCollide::Geometry *  waterGeometry,
const agxCollide::Geometry *  geometry,
const agx::Vec3 &  gravity,
agx::Bool  aeroEnabled,
agx::Bool  hydroEnabled,
agx::Bool  updateRenderers,
const agx::UIntVector  startIndexT,
const agx::UIntVector  startIndexV,
const agx::TimeStamp &  t = 0 
)
protectedvirtual

Calculate object data (for each shape) in a geometry.

◆ calculateWireData()

agxModel::WindAndWaterController::WireLinkedStructureData* agxModel::WindAndWaterController::calculateWireData ( agxWire::Wire *  wire,
WirePairContainer  wirePairs,
WindAndWaterController::WindWrapper  wind,
agx::Bool  aeroEnable,
const agx::TimeStamp &  t = 0 
)
protected

Calculate wire data for all segments.

◆ calculateWireDynamicsData()

agxModel::WindAndWaterController::DynamicsWireData agxModel::WindAndWaterController::calculateWireDynamicsData ( const agxCollide::Geometry *  waterGeometry,
agxWire::Wire *  wire 
)

Calculates forces for hydro- and aerodynamics acting on a wire.

Parameters
waterGeometry- water geometry
wire- wire affected by aero- and hydrodynamics

◆ configureDefaultAlgorithms()

void agxModel::WindAndWaterController::configureDefaultAlgorithms ( )
protected

Configure the default algorithms.

◆ create() [1/2]

static agxStream::Serializable* agxModel::WindAndWaterController::create ( )
inlinestatic

Definition at line 898 of file WindAndWaterController.h.

◆ create() [2/2]

static agxStream::Serializable* agxModel::WindAndWaterController::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 898 of file WindAndWaterController.h.

◆ createPrimitiveMesh()

static agxCollide::TrimeshRef agxModel::WindAndWaterController::createPrimitiveMesh ( const agxCollide::Shape *  shape,
agxModel::WindAndWaterParameters::ShapeTessellation  tessellation 
)
static

Create a mesh from a primitive shape given a tessellation level.

The same mesh is used for hydrodynamic calculations.

Parameters
shape- the shape that the mesh should be based on.
tessellation- the desired tessellation of the mesh.
Returns
the mesh that is used for hydro- and aerodynamic calculations. Returns nullptr if shape is unknown or a mesh.

◆ find()

static agxModel::WindAndWaterController* agxModel::WindAndWaterController::find ( agxSDK::Simulation *  simulation,
const agx::Uuid &  uuid 
)
static

Search the given simulation for a WindAndWaterController with the given Uuid.

Parameters
simulation- The simulation to search in.
uuid- The Uuid of the WindAndWaterController to search for.
Returns
A WindAndWaterController with Uuid uuid in simulation simulation, or nullptr.

◆ findAll() [1/2]

static agxModel::WindAndWaterControllerPtrVector agxModel::WindAndWaterController::findAll ( const agxSDK::Simulation *  simulation,
const agx::Name &  name 
)
static

Find all WindAndWaterControllers with given name.

Parameters
simulation- The simulation to search in.
name- The name of the WindAndWaterController.
Returns
A vector of WindAndWaterControllers.

◆ findAll() [2/2]

static agxModel::WindAndWaterControllerPtrVector agxModel::WindAndWaterController::findAll ( const agxSDK::Simulation *  simulation)
static

Finds all WindAndWaterControllers in the given simulation.

Parameters
simulation- The simulation to search in.
Returns
A vector of WindAndWaterControllers.

◆ garbageCollect()

void agxModel::WindAndWaterController::garbageCollect ( )
protected

Collects garbage (e.g., due to deleted shapes).

◆ getCenterOfBuoyancy() [1/2]

bool agxModel::WindAndWaterController::getCenterOfBuoyancy ( agxCollide::Geometry *  geometry,
agx::Vec3 &  centerOfBuoyancy 
) const

Get the center of buoyancy based on the triangular mesh of the given geometry.

Parameters
geometry- The geometry we want to know center of buoyancy for
centerOfBuoyancy- The value of the center of buoyancy will be saved to this Vec3, if it exists.
Returns
true if a value of center of buoyancy exists and was written to the centerOfBuoyancy parameter, false otherwise

◆ getCenterOfBuoyancy() [2/2]

bool agxModel::WindAndWaterController::getCenterOfBuoyancy ( agx::RigidBody *  body,
agx::Vec3 &  centerOfBuoyancy 
) const

Get the weighted average center of buoyancy for all the geometries in a rigid body.

If any geometries are intersecting, this value might be off.

Parameters
body- The rigid body we want to know center of buoyancy for
centerOfBuoyancy- The value of the center of buoyancy will be saved to this Vec3, if it exists.
Returns
true if a value of center of buoyancy exists and was written to the centerOfBuoyancy parameter, false otherwise

◆ getClassName()

const char* agxModel::WindAndWaterController::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 898 of file WindAndWaterController.h.

◆ getConstructClassId()

static const char* agxModel::WindAndWaterController::getConstructClassId ( )
inlinestatic

Definition at line 898 of file WindAndWaterController.h.

◆ getEnableCenterOfBuoyancy()

bool agxModel::WindAndWaterController::getEnableCenterOfBuoyancy ( const agxCollide::Geometry *  geometry) const

Get if the center of buoyancy calculations are enabled or not for the given geometry.

\ param geometry - The geometry we want to see if the calculations are enabled for

◆ getForce() [1/2]

agx::Vec3 agxModel::WindAndWaterController::getForce ( agxCollide::Geometry *  geometry) const

Get the total hydrodynamic force on a geometry.

Parameters
geometry- The geometry you want to know the hydrodynamic force for
Returns
A Vec3 of the force

◆ getForce() [2/2]

agx::Vec3 agxModel::WindAndWaterController::getForce ( agx::RigidBody *  body) const

Get the total hydrodynamic force on a geometry.

Parameters
body- The rigid body you want to know the hydrodynamic force for
Returns
A Vec3 of the force

◆ getForceComponent() [1/2]

agx::Vec3 agxModel::WindAndWaterController::getForceComponent ( agxCollide::Geometry *  geometry,
WindAndWaterController::ForceType  type 
) const

Get the given part of the hydrodynamic force for a geometry.

Parameters
geometry- The geometry you want to know the hydrodynamic force for
type- The type of hydrodynamic force you want to know
Returns
A Vec3 of the force

◆ getForceComponent() [2/2]

agx::Vec3 agxModel::WindAndWaterController::getForceComponent ( agx::RigidBody *  body,
WindAndWaterController::ForceType  type 
) const

Get the given part of the hydrodynamic force for a rigid body.

Parameters
body- The rigid body you want to know the hydrodynamic force for
type- The type of hydrodynamic force you want to know
Returns
A Vec3 of the force

◆ getForceType()

virtual WindAndWaterController::ForceType agxModel::WindAndWaterController::getForceType ( ) const
inlinevirtual

Definition at line 1186 of file WindAndWaterController.h.

References agxStream::ElementTypes::OTHER.

◆ getOrCreateAerodynamicsParameters() [1/3]

virtual agxModel::AerodynamicsParameters* agxModel::WindAndWaterController::getOrCreateAerodynamicsParameters ( const agxCollide::Shape *  shape) const
virtual

Creates new or returns an already created parameter storage for a given shape.

The parameters defines the interaction between the shape and air since there will be no contact material between them.

◆ getOrCreateAerodynamicsParameters() [2/3]

agxModel::AerodynamicsParameters* agxModel::WindAndWaterController::getOrCreateAerodynamicsParameters ( const agxWire::Wire *  wire) const

Creates new or returns an already created parameter storage for a given wire.

The parameters defines the interaction between the wire and air since there will be no contact material between them.

◆ getOrCreateAerodynamicsParameters() [3/3]

agxModel::AerodynamicsParameters* agxModel::WindAndWaterController::getOrCreateAerodynamicsParameters ( const agxSDK::LinkedStructure *  linkedStructure) const

Creates new or returns an already created parameter storage for a given linked structure.

The parameters defines the interaction between the linked structure and air since there will be no contact material between them.

◆ getOrCreateHydrodynamicsParameters() [1/3]

virtual agxModel::HydrodynamicsParameters* agxModel::WindAndWaterController::getOrCreateHydrodynamicsParameters ( const agxCollide::Shape *  shape) const
virtual

Creates new or returns an already created parameter storage for a given shape.

The parameters defines the interaction between the shape and water since there will be no contact material between them.

◆ getOrCreateHydrodynamicsParameters() [2/3]

agxModel::HydrodynamicsParameters* agxModel::WindAndWaterController::getOrCreateHydrodynamicsParameters ( const agxWire::Wire *  wire) const

Creates new or returns an already created parameter storage for a given wire.

The parameters defines the interaction between the wire and water since there will be no contact material between them.

◆ getOrCreateHydrodynamicsParameters() [3/3]

agxModel::HydrodynamicsParameters* agxModel::WindAndWaterController::getOrCreateHydrodynamicsParameters ( const agxSDK::LinkedStructure *  linkedStructure) const

Creates new or returns an already created parameter storage for a given linked structure.

The parameters defines the interaction between the linked structure and water since there will be no contact material between them.

◆ getPressureFieldRender()

agxModel::PressureFieldRenderer* agxModel::WindAndWaterController::getPressureFieldRender ( const agxCollide::Shape *  shape) const
protected
Returns
pressure field renderer if present

◆ getPressureFieldRenderData()

agxModel::WindAndWaterController::PressureFieldRendererData* agxModel::WindAndWaterController::getPressureFieldRenderData ( const agxCollide::Shape *  shape) const
protected
Returns
render data for shape if present

◆ getSizeOfGeometry()

void agxModel::WindAndWaterController::getSizeOfGeometry ( const agxCollide::Geometry *  geometry,
agx::UIntVector &  numTriangles,
agx::UIntVector &  numVertices 
)
protected

◆ getStorageAgent()

agxStream::StorageAgent* agxModel::WindAndWaterController::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 898 of file WindAndWaterController.h.

◆ getTorque() [1/2]

agx::Vec3 agxModel::WindAndWaterController::getTorque ( agxCollide::Geometry *  geometry) const

Get the total hydrodynamic torque on a geometry.

Parameters
geometry- The geometry you want to know the torque for
Returns
A Vec3 of the torque

◆ getTorque() [2/2]

agx::Vec3 agxModel::WindAndWaterController::getTorque ( agx::RigidBody *  body) const

Get the total hydrodynamic torque on a rigid body.

Parameters
body- The rigid body you want to know the torque for
Returns
A Vec3 of the torque

◆ getTorqueComponent() [1/2]

agx::Vec3 agxModel::WindAndWaterController::getTorqueComponent ( agxCollide::Geometry *  geometry,
WindAndWaterController::ForceType  type 
) const

Get the given part of the hydrodynamic torque for a geometry.

Parameters
geometry- The geometry you want to know the torque for
type- The type of hydrodynamic torque you want to know
Returns
A Vec3 of the torque

◆ getTorqueComponent() [2/2]

agx::Vec3 agxModel::WindAndWaterController::getTorqueComponent ( agx::RigidBody *  body,
WindAndWaterController::ForceType  type 
) const

Get the given part of the hydrodynamic torque for a geometry.

Parameters
body- The rigid body you want to know the torque for
type- The type of hydrodynamic torque you want to know
Returns
A Vec3 of the torque

◆ getWaterFlowGenerator()

agxModel::WindAndWaterController::WaterFlowGenerator* agxModel::WindAndWaterController::getWaterFlowGenerator ( const agxCollide::Geometry *  waterGeometry) const
Parameters
waterGeometry- the water geometry that is affected by the generator.
Returns
The water flow generator that is attached to the given water geometry,-

◆ getWaterWrapper()

agxModel::WaterWrapper* agxModel::WindAndWaterController::getWaterWrapper ( const agxCollide::Geometry *  waterGeometry)
Parameters
waterGeometry- the water geometry.
Returns
The water wrapper that is attached to the given water geometry,-

◆ getWindGenerator()

virtual agxModel::WindAndWaterController::WindGenerator* agxModel::WindAndWaterController::getWindGenerator ( ) const
virtual
Returns
wind generator if present

◆ post() [1/2]

virtual void agxModel::WindAndWaterController::post ( const agx::TimeStamp &  )
overridevirtual

Internal method.

Reimplemented from agxSDK::StepEventListener.

◆ post() [2/2]

virtual void agxModel::WindAndWaterController::post ( agxModel::WindAndWaterController *  )
inlinevirtual

Called during normal post.

Definition at line 1179 of file WindAndWaterController.h.

◆ pre() [1/2]

virtual void agxModel::WindAndWaterController::pre ( const agx::TimeStamp &  )
overridevirtual

Internal method.

Reimplemented from agxSDK::StepEventListener.

◆ pre() [2/2]

virtual void agxModel::WindAndWaterController::pre ( agxModel::WindAndWaterController *  )
inlinevirtual

Called before all data is collected and before updateInteraction is called.

Definition at line 1174 of file WindAndWaterController.h.

◆ preCollide() [1/2]

virtual void agxModel::WindAndWaterController::preCollide ( const agx::TimeStamp &  )
overridevirtual

Internal method.

Reimplemented from agxSDK::StepEventListener.

◆ preCollide() [2/2]

virtual void agxModel::WindAndWaterController::preCollide ( agxModel::WindAndWaterController *  )
inlinevirtual

Called during normal preCollide events.

Definition at line 1169 of file WindAndWaterController.h.

◆ registerPressureFieldRenderer()

virtual agx::Bool agxModel::WindAndWaterController::registerPressureFieldRenderer ( agxModel::PressureFieldRenderer *  pressureFieldRenderer,
const agxCollide::Shape *  shape 
)
virtual

Pressure field renderer for a given shape.

◆ restore()

virtual void agxModel::WindAndWaterController::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agxSDK::StepEventListener.

◆ setAirDensity()

void agxModel::WindAndWaterController::setAirDensity ( agx::Real  airDensity)

Set the density of air.

Parameters
airDensity- The new air density. Default value is 1.2 kg per cubic meter.

◆ setEnableAerodynamics() [1/5]

virtual agx::Bool agxModel::WindAndWaterController::setEnableAerodynamics ( agxCollide::Geometry *  geometry,
agx::Bool  enable 
)
virtual

Enable/disable a geometry for aerodynamics calculations.

Parameters
geometry- geometry to enable/disable for aerodynamics calculations
enable- true to enable, false to disable
Returns
true if the successful

◆ setEnableAerodynamics() [2/5]

virtual void agxModel::WindAndWaterController::setEnableAerodynamics ( agx::Bool  enable)
virtual

Enable/disable aerodynamics for all objects in the simulation.

If disabled, only objects that have aerodynamics enabled explicitly will be used in the aerodynamics calculation.

Parameters
enable- true to enable, false to disable.

◆ setEnableAerodynamics() [3/5]

virtual agx::Bool agxModel::WindAndWaterController::setEnableAerodynamics ( agx::RigidBody *  rb,
agx::Bool  enable 
)
virtual

Enable/disable all geometries in rb for aerodynamics calculations.

Parameters
rb- rigid body to enable/disable for aerodynamics calculations
enable- true to enable, false to disable
Returns
true if the successful

◆ setEnableAerodynamics() [4/5]

virtual agx::Bool agxModel::WindAndWaterController::setEnableAerodynamics ( agxWire::Wire *  wire,
agx::Bool  enable 
)
virtual

Enable/disable a wire for aerodynamics calculations.

Parameters
wire- wire to enable/disable for aerodynamics calculations
enable- true to enable, false to disable
Returns
true if the successful

◆ setEnableAerodynamics() [5/5]

agx::Bool agxModel::WindAndWaterController::setEnableAerodynamics ( agxSDK::LinkedStructure *  linkedStructure,
agx::Bool  enable 
)

Enable/disable a linked structure for aerodynamics calculations.

Only works after the linked structure has been added to a simulation.

Parameters
linkedStructure- linked strucutre to enable/disable for aerodynamics calculations.
enable- true to enable, false to disable
Returns
true if successful

◆ setEnableCenterOfBuoyancy() [1/2]

void agxModel::WindAndWaterController::setEnableCenterOfBuoyancy ( agxCollide::Geometry *  geometry,
bool  enable 
)

Enable or disable the center of buoyancy calculations for a geometry.

Center of buoyancy calculations are per default disabled.

Parameters
geometry- The geometry we want to enable/disable the calculations are for
enable- Set to true to enable center of buoyancy calculations, false to turn them off

◆ setEnableCenterOfBuoyancy() [2/2]

void agxModel::WindAndWaterController::setEnableCenterOfBuoyancy ( agx::RigidBody *  body,
bool  enable 
)

Enable or disable the center of buoyancy calculations for all geometries in a rigid body.

Center of buoyancy calculations are per default disabled.

Parameters
body- The body we want to enable/disable the calculations are for
enable- Set to true to enable center of buoyancy calculations, false to turn them off

◆ setWaterFlowGenerator()

virtual agx::Bool agxModel::WindAndWaterController::setWaterFlowGenerator ( const agxCollide::Geometry *  waterGeometry,
agxModel::WindAndWaterController::WaterFlowGenerator *  flowGenerator 
)
virtual

Assign unique water flow generator to a water geometry.

If flowGenerator is nullptr the previous flow generator will be removed.

Parameters
waterGeometry- the water geometry that is affected by the generator.
flowGenerator- new water flow generator or nullptr to remove the previous one
Returns
true if successfully assigned, otherwise false

◆ setWaterWrapper()

virtual agx::Bool agxModel::WindAndWaterController::setWaterWrapper ( agxCollide::Geometry *  geometry,
agxModel::WaterWrapper *  waterWrapper 
)
virtual

Assign a water wrapper to a water geometry;.

Parameters
geometry- the water geometry associated with the water wrapper
waterWrapper- the wrapper to be attached to the given water geometry.

◆ setWindGenerator()

virtual void agxModel::WindAndWaterController::setWindGenerator ( agxModel::WindAndWaterController::WindGenerator *  windGenerator)
virtual

Assign unique wind generator.

Parameters
windGenerator- new wind generator

◆ store()

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

Reimplemented from agxSDK::StepEventListener.

◆ updateAlgorithms()

virtual void agxModel::WindAndWaterController::updateAlgorithms ( const ObjectDataContainer &  data,
bool  updateRenderers 
)
protectedvirtual

Updates algorithms given current triangle data.

◆ updateInteraction()

virtual void agxModel::WindAndWaterController::updateInteraction ( agxModel::WindAndWaterController::ObjectData &  ,
const GlobalTriangleData::Container &   
)
inlinevirtual

Called when it's time to update interaction.

Definition at line 1184 of file WindAndWaterController.h.

Member Data Documentation

◆ m_addedMassDb

AddedMassDbRef agxModel::WindAndWaterController::m_addedMassDb
protected

Definition at line 1132 of file WindAndWaterController.h.

◆ m_aerodynamicsParameters

AerodynamicsParametersContainer agxModel::WindAndWaterController::m_aerodynamicsParameters
mutableprotected

Definition at line 1134 of file WindAndWaterController.h.

◆ m_aerodynamicsParametersLinkedStructures

AerodynamicsParametersLinkedStructureContainer agxModel::WindAndWaterController::m_aerodynamicsParametersLinkedStructures
mutableprotected

Definition at line 1136 of file WindAndWaterController.h.

◆ m_aerodynamicsParametersWires

AerodynamicsParametersWireContainer agxModel::WindAndWaterController::m_aerodynamicsParametersWires
mutableprotected

Definition at line 1135 of file WindAndWaterController.h.

◆ m_aeroForAll

agx::Bool agxModel::WindAndWaterController::m_aeroForAll
protected

Definition at line 1147 of file WindAndWaterController.h.

◆ m_aeroGeometries

AerodynamicsDataContainer agxModel::WindAndWaterController::m_aeroGeometries
protected

Definition at line 1130 of file WindAndWaterController.h.

◆ m_aeroWires

WireObserverVector agxModel::WindAndWaterController::m_aeroWires
protected

Definition at line 1131 of file WindAndWaterController.h.

◆ m_airDensity

agx::Real agxModel::WindAndWaterController::m_airDensity
protected

Definition at line 1146 of file WindAndWaterController.h.

◆ m_algorithms

AlgorithmContainer agxModel::WindAndWaterController::m_algorithms
protected

Definition at line 1128 of file WindAndWaterController.h.

◆ m_centerOfBuoyancy

CenterOfBuoyancyContainer agxModel::WindAndWaterController::m_centerOfBuoyancy
protected

Definition at line 1151 of file WindAndWaterController.h.

◆ m_enableCenterOfBuoyancy

EnableCbContainer agxModel::WindAndWaterController::m_enableCenterOfBuoyancy
protected

Definition at line 1152 of file WindAndWaterController.h.

◆ m_flowGenerators

WaterFlowGeneratorContainer agxModel::WindAndWaterController::m_flowGenerators
protected

Definition at line 1144 of file WindAndWaterController.h.

◆ m_geomForcesAndTorques

GeometryForceTorqueContainer agxModel::WindAndWaterController::m_geomForcesAndTorques
protected

Definition at line 1150 of file WindAndWaterController.h.

◆ m_globalAerodynamicsParameters

AerodynamicsParametersRef agxModel::WindAndWaterController::m_globalAerodynamicsParameters
protected

Definition at line 1133 of file WindAndWaterController.h.

◆ m_globalHydrodynamicsParameters

HydrodynamicsParametersRef agxModel::WindAndWaterController::m_globalHydrodynamicsParameters
protected

Definition at line 1137 of file WindAndWaterController.h.

◆ m_hydrodynamicsParameters

HydrodynamicsParametersContainer agxModel::WindAndWaterController::m_hydrodynamicsParameters
mutableprotected

Definition at line 1138 of file WindAndWaterController.h.

◆ m_hydrodynamicsParametersLinkedStructures

HydrodynamicsParametersLinkedStructureContainer agxModel::WindAndWaterController::m_hydrodynamicsParametersLinkedStructures
mutableprotected

Definition at line 1140 of file WindAndWaterController.h.

◆ m_hydrodynamicsParametersWires

HydrodynamicsParametersWireContainer agxModel::WindAndWaterController::m_hydrodynamicsParametersWires
mutableprotected

Definition at line 1139 of file WindAndWaterController.h.

◆ m_pressureFieldRenderers

PressureFieldRendererDataContainer agxModel::WindAndWaterController::m_pressureFieldRenderers
protected

Definition at line 1141 of file WindAndWaterController.h.

◆ m_trianglePool

GlobalTriangleData::Container agxModel::WindAndWaterController::m_trianglePool
protected

Definition at line 1148 of file WindAndWaterController.h.

◆ m_unitPrimitiveCache

UnitPrimitiveCache agxModel::WindAndWaterController::m_unitPrimitiveCache
protected

Definition at line 1142 of file WindAndWaterController.h.

◆ m_vertexPool

VertexData::Container agxModel::WindAndWaterController::m_vertexPool
protected

Definition at line 1149 of file WindAndWaterController.h.

◆ m_waterGeometries

GeometryConstObserverVector agxModel::WindAndWaterController::m_waterGeometries
protected

Definition at line 1129 of file WindAndWaterController.h.

◆ m_waterWrappers

WaterWrapperContainer agxModel::WindAndWaterController::m_waterWrappers
protected

Definition at line 1145 of file WindAndWaterController.h.

◆ m_windGenerator

WindGeneratorRef agxModel::WindAndWaterController::m_windGenerator
protected

Definition at line 1143 of file WindAndWaterController.h.


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