 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
17 #ifndef AGXMODEL_WINDANDWATERCONTROLLER_H
18 #define AGXMODEL_WINDANDWATERCONTROLLER_H
214 bool enableCenterOfBuoyancy);
334 const agx::Bool& containsAddedMass()
const;
370 const agx::Vec3& getCenterOfBuoyancy()
const;
380 const agx::Real& getVolumeInWater()
const;
390 bool getEnableCenterOfBuoyancy();
395 void lock()
const { m_mutex.lock(); };
400 void unLock()
const { m_mutex.unlock(); };
421 mutable std::mutex m_mutex;
424 bool m_enableCenterOfBuoyancy;
433 : node1( nullptr ), node2( nullptr ), water( nullptr ), gravity(
agx::
Vec3() )
437 : node1( node1 ), node2( node2 ), water( water ), gravity( gravity )
459 : rb( rb ), point1( point1 ), point2( point2 ), velocity( velocity ), velocityOfFluid( velocityOfFluid ),
460 fluidDensity( fluidDensity ), gravity( gravity ), volume(volume)
497 void addWaterSegment(
const Segment& segment );
502 void addAirSegment(
const Segment& segment );
543 void getAddedMassAndInertiaDiagonalCoefficients(
const agx::RigidBody* rb,
agx::Vec3& addedMassDiagonalCoefficients,
agx::Vec3& addedInertiaDiagonalCoefficients )
const;
558 size_t numWaterSegments{0};
559 size_t numAirSegments{0};
598 virtual void setEnableAerodynamics(
agx::Bool enable );
629 void setAirDensity(
agx::Real airDensity );
881 void setEnableCenterOfBuoyancy(
agx::RigidBody* body,
bool enable);
932 void garbageCollect();
938 : shape( shapeIn ), mesh( meshIn )
942 virtual void checkSize(
agx::Real resolution ) = 0;
948 virtual ~PrimitiveData() {}
951 struct CapsuleData : PrimitiveData
954 : PrimitiveData( shapeIn, meshIn ), radius( radiusIn ), height( heightIn )
958 virtual void checkSize(
agx::Real resolution )
override;
964 virtual ~CapsuleData() {}
967 struct ConeData : PrimitiveData
970 : PrimitiveData( shapeIn, meshIn ), topRadius( topRadiusIn ), bottomRadius( bottomRadiusIn ),
975 virtual void checkSize(
agx::Real resolution )
override;
982 virtual ~ConeData() {}
985 struct HollowConeData : PrimitiveData
990 : PrimitiveData( shapeIn, meshIn ), topOuterRadius( topOuterRadiusIn ),
991 bottomInnerRadius( bottomInnerRadiusIn ), height( heightIn ), thickness( thicknessIn )
995 virtual void checkSize(
agx::Real resolution )
override;
1003 virtual ~HollowConeData() {}
1006 struct HollowCylinderData : PrimitiveData
1009 : PrimitiveData( shapeIn, meshIn ), innerRadius( innerRadiusIn ), height( heightIn ),
1010 thickness( thicknessIn )
1014 virtual void checkSize(
agx::Real resolution )
override;
1021 virtual ~HollowCylinderData() {}
1037 mutable std::mutex meshCreationMutex;
1072 void configureDefaultAlgorithms();
1077 void garbageCollect();
1207 void setVelocity(
const agx::Vec3& velocity );
1246 void setVelocity(
const agx::Vec3& velocity );
1339 void setWaterGeometry(
agxCollide::Geometry* waterGeometry );
1346 return m_aeroParams;
1351 return m_hydroParams;
1365 #endif // AGXMODEL_WINDANDWATERCONTROLLER_H
virtual void preCollide(agxModel::WindAndWaterController *)
Called during normal preCollide events.
AddedMassDbRef m_addedMassDb
Data for different objects.
agxCollide::ShapeConstObserver shape
const agxModel::HydrodynamicsParameters * getHydrodynamicsParameters() const
HydrodynamicsParametersContainer m_hydrodynamicsParameters
Class to generate constant wind in a scene.
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
agx::Vector< Segment > SegmentContainer
GeometryForceTorqueContainer m_geomForcesAndTorques
GeometryConstObserverVector m_waterGeometries
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Derive from this class to implement a listener for simulation step events.
Interface for generating water flow.
The rigid body class, combining a geometric model and a frame of reference.
agx::Vec3 velocityOfFluid
agx::HashVector< const agxWire::Wire *, AerodynamicsParametersRef > AerodynamicsParametersWireContainer
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
UnitPrimitiveCache m_unitPrimitiveCache
agx::Vector< ObjectDataRef > ObjectDataContainer
agx::ref_ptr< WireLinkedStructureData > WireLinkedStructureDataRef
WaterFlowGeneratorContainer m_flowGenerators
const WindAndWaterController::WaterFlowGenerator * m_flowGenerator
PressureFieldRendererDataContainer m_pressureFieldRenderers
agx::Vector< WirePair > WirePairContainer
#define DOXYGEN_END_INTERNAL_BLOCK()
Vertex data for all global vertices in a mesh.
#define DOXYGEN_START_INTERNAL_BLOCK()
virtual void post(agxModel::WindAndWaterController *)
Called during normal post.
HydrodynamicsParametersWireContainer m_hydrodynamicsParametersWires
agx::Vector< WindAndWaterController * > WindAndWaterControllerPtrVector
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
const AerodynamicsParameters * m_aeroParams
Interface and placeholder of controllers/helpers for wires.
agx::HashVector< const agxCollide::Shape *, AerodynamicsParametersRef > AerodynamicsParametersContainer
AerodynamicsDataContainer m_aeroGeometries
Hydro- and aerodynamic results for a linked structure.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
const HydrodynamicsParameters * m_hydroParams
AerodynamicsParametersRef m_globalAerodynamicsParameters
CenterOfBuoyancyContainer m_centerOfBuoyancy
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Data for rigid body with aero/hydro static/dynamic forces and added mass and inertia matrices.
void unLock() const
Perform a mutex unlock for this ObjectData.
const agxCollide::Geometry * water
Data for a wire or a linked structure.
Interface for generating wind effects.
agx::HashVector< const agxCollide::Geometry *, WaterFlowGeneratorRef > WaterFlowGeneratorContainer
VertexData::Container m_vertexPool
EnableCbContainer m_enableCenterOfBuoyancy
agx::HashVector< const agxSDK::LinkedStructure *, AerodynamicsParametersRef > AerodynamicsParametersLinkedStructureContainer
Interface for generating water flow and wind.
Smart pointer for handling referenced counted objects.
WireObserverVector m_aeroWires
AerodynamicsData(const agxCollide::Geometry *geometryIn)
agx::Vector< agxWire::WireObserver > WireObserverVector
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynami...
Class to generate constant water flow in a scene.
Water wrapper that can be inherited to create custom made wrappers.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
agx::Matrix3x3 bodyFrameAddedMass
agx::HashVector< const agxSDK::LinkedStructure *, HydrodynamicsParametersRef > HydrodynamicsParametersLinkedStructureContainer
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
virtual void updateInteraction(agxModel::WindAndWaterController::ObjectData &, const GlobalTriangleData::Container &)
Called when it's time to update interaction.
agx::Vector< WireLinkedStructureDataRef > WireLinkedStructureDataContainer
agx::Vector< agxCollide::GeometryConstObserver > GeometryConstObserverVector
agx::HashVector< const agxCollide::Geometry *, AerodynamicsDataRef > AerodynamicsDataContainer
agx::HashVector< const agxCollide::Shape *, PressureFieldRendererDataRef > PressureFieldRendererDataContainer
Type
Define the type of a Shape.
agx::HashVector< const agxWire::Wire *, HydrodynamicsParametersRef > HydrodynamicsParametersWireContainer
Inheritance with partial specialization due to bug with ref_ptr containers.
The geometry representation used by the collision detection engine.
const WindGenerator * m_windGenerator
AerodynamicsParametersContainer m_aerodynamicsParameters
AerodynamicsParametersLinkedStructureContainer m_aerodynamicsParametersLinkedStructures
Representation of a name string.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
ShapeTessellation
Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder.
const agx::Vec3 & getVelocity() const
agx::HashVector< const agxCollide::Geometry *, WaterWrapperRef > WaterWrapperContainer
agx::ref_ptr< AerodynamicsData > AerodynamicsDataRef
Wraps wind related things.
agxModel::PressureFieldRendererRef pressureField
AlgorithmContainer m_algorithms
const agx::Vec3 & getVelocity() const
agx::AffineMatrix4x4 m_worldToShape
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
agx::HashVector< const agxCollide::Shape *, HydrodynamicsParametersRef > HydrodynamicsParametersContainer
agx::Vector< agxModel::WindAndWaterController::AlgorithmRef > AlgorithmContainer
This namespace consists of a set of classes for handling geometric intersection tests including boole...
HydrodynamicsParametersLinkedStructureContainer m_hydrodynamicsParametersLinkedStructures
virtual void pre(agxModel::WindAndWaterController *)
Called before all data is collected and before updateInteraction is called.
agx::ref_ptr< ObjectData > ObjectDataRef
virtual ~PressureFieldRendererData()
const agxCollide::Shape * m_shape
WirePair(agxWire::Node *node1, agxWire::Node *node2, const agxCollide::Geometry *water, agx::Vec3 gravity)
virtual WindAndWaterController::ForceType getForceType() const
Hydro- and aerodynamic results for a wire.
agx::HashVector< const agxCollide::Geometry *, std::pair< agx::Vec3Vector, agx::Vec3Vector > > GeometryForceTorqueContainer
agxCollide::GeometryConstObserver m_geometry
agx::Matrix3x3 bodyFrameAddedInertia
WaterWrapperContainer m_waterWrappers
agx::ref_ptr< WindAndWaterController > WindAndWaterControllerRef
agxCollide::GeometryConstObserver geometry
void lock() const
Perform a mutex lock for this ObjectData.
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
agx::ref_ptr< PressureFieldRendererData > PressureFieldRendererDataRef
agx::HashVector< const agxCollide::Geometry *, std::pair< bool, agxCollide::GeometryConstObserver > > EnableCbContainer
Class defining a node that is part of a wire.
WindGeneratorRef m_windGenerator
Triangle data for a normal or a clipped triangle.
DynamicsLinkedStructureData()
agx::HashVector< const agxCollide::Geometry *, std::pair< agx::Vec3, agx::Real > > CenterOfBuoyancyContainer
HydrodynamicsParametersRef m_globalHydrodynamicsParameters
agxModel::WindAndWaterController::ObjectData ObjectData
virtual ~AerodynamicsData()
AerodynamicsParametersWireContainer m_aerodynamicsParametersWires
GlobalTriangleData::Container m_trianglePool
Segment(agx::RigidBody *rb, agx::Vec3 point1, agx::Vec3 point2, agx::Vec3 velocity, agx::Vec3 velocityOfFluid, agx::Real fluidDensity, agx::Vec3 gravity, agx::Real volume)