AGX Dynamics  2.37.2.0
WindAndWaterController.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXMODEL_WINDANDWATERCONTROLLER_H
18 #define AGXMODEL_WINDANDWATERCONTROLLER_H
19 
20 #include <agxModel/export.h>
21 #include <agxModel/AddedMassDb.h>
24 
25 #include <agx/Vec6.h>
26 
27 #include <agxCollide/Geometry.h>
28 
29 #include <agxSDK/LinkedStructure.h>
30 
31 #include <agxWire/Wire.h>
32 
33 #include <mutex>
34 
35 
36 namespace agxModel {
37  class WaterWrapper;
41 
46  {
47  public:
49 
54  {
55  public:
61 
67  virtual agx::Vec3 getVelocity( const agx::Vec3& worldPoint ) const;
68 
70 
71  protected:
72  virtual ~WindAndWaterFlowGenerator();
73  };
74 
76 
81  {
82  public:
88 
89 #ifndef SWIG
91 #endif
92  protected:
93  virtual ~WaterFlowGenerator();
94  };
95 
97 
102  {
103  public:
108  WindGenerator();
109 
114  virtual void prepare( const agxCollide::Geometry* geometry );
115 
116 #ifndef SWIG
118 #endif
119  protected:
120  virtual ~WindGenerator();
121  };
122 
123 
128  {
129  public:
133  WindWrapper( agx::Bool enable, const agxModel::WindAndWaterController::WindGenerator* windGenerator, agx::Real airDensity );
134 
138  agx::Real getDensity() const;
139 
143  agx::Vec3 getVelocity( const agx::Vec3& worldPoint ) const;
144 
148  agx::Bool getEnable() const;
149 
150  protected:
154  };
155 
160  {
161  public:
162 
167  const agxModel::HydrodynamicsParameters* hydroParams );
168 
172  const agxModel::AerodynamicsParameters* getAerodynamicsParameters() const;
173 
177  const agxModel::HydrodynamicsParameters* getHydrodynamicsParameters() const;
178 
179  protected:
180  virtual ~WindAndWaterData();
181 
184  };
185 
190  {
191  public:
195  ObjectData( const agxCollide::Shape* shape,
196  const agxModel::AerodynamicsParameters* aeroParams,
197  const agxModel::HydrodynamicsParameters* hydroParams,
198  const agxModel::WaterWrapper* water,
200  const agx::Vec3& gravity,
201  agxModel::PressureFieldRenderer* pressureFieldRenderer,
202  const agx::UInt numTriangles,
203  const agx::UInt startIndexT,
204  const agx::UInt startIndexV );
205 
209  agx::UInt getStartIndexT() const;
210 
214  agx::UInt getNumTriangles() const;
215 
219  agx::Real getDensity( agx::Bool belowSurface ) const;
220 
224  agx::Real getDensity( const agxModel::TriangleData& tData ) const;
225 
229  agx::Real getDensity( const agxModel::VertexData& vData ) const;
230 
234  agx::Real getDensityWater() const;
235 
239  agx::Real getDensityAir() const;
240 
244  const agx::Vec3& getGravity() const;
245 
249  const agx::Vec3& getForce() const;
250 
254  agx::Vec3& force();
255 
259  const agx::Vec3& getTorque() const;
260 
264  agx::Vec3& torque();
265 
269  const agx::Matrix3x3& getAddedMass() const;
270 
274  agx::Matrix3x3& addedMass();
275 
279  const agx::Matrix3x3& getAddedInertia() const;
280 
284  agx::Matrix3x3& addedInertia();
285 
289  agx::Bool& containsAddedMass();
290 
294  const agx::Bool& containsAddedMass() const;
295 
299  const agxCollide::Shape* getShape() const;
300 
304  const agxCollide::Geometry* getGeometry() const;
305 
309  const WaterWrapper* getWater() const;
310 
314  const agx::RigidBody* getRigidBody() const;
315 
320  agx::RigidBody* getRigidBodySerial();
321 
325  agxModel::PressureFieldRenderer* getPressureFieldRenderer() const;
326 
330  void lock() const { m_mutex.lock(); };
331 
335  void unLock() const { m_mutex.unlock(); };
336 
337  protected:
338  virtual ~ObjectData();
339 
340  private:
341  agx::Vec3 m_gravity;
342  agx::Real m_densityWater;
343  agx::Real m_densityAir;
344  mutable agx::Vec3 m_force;
345  mutable agx::Vec3 m_torque;
346  agx::Matrix3x3 m_addedMass;
347  agx::Matrix3x3 m_addedInertia;
348  agx::Bool m_containsAddedMass;
349  const agxCollide::Shape* m_shape;
350  PressureFieldRenderer* m_pressureFieldRenderer;
351  WaterWrapperConstRef m_water;
352  const agx::UInt m_numTriangles;
353  const agx::UInt m_startIndexT;
354  mutable std::mutex m_mutex;
355  };
356 
359 
360  struct WirePair
361  {
363  : node1( nullptr ), node2( nullptr ), water( nullptr ), gravity( agx::Vec3() )
364  {
365  }
366  WirePair( agxWire::Node* node1, agxWire::Node* node2, const agxCollide::Geometry* water, agx::Vec3 gravity )
367  : node1( node1 ), node2( node2 ), water( water ), gravity( gravity )
368  {
369  }
374 
375  private:
377  WirePair& operator=( const WirePair& )
378  {
379  return *this;
380  }
381  };
382 
384 
385  struct Segment
386  {
387  Segment( agx::RigidBody* rb, agx::Vec3 point1, agx::Vec3 point2, agx::Vec3 velocity, agx::Vec3 velocityOfFluid,
388  agx::Real fluidDensity, agx::Vec3 gravity, agx::Real volume )
389  : rb( rb ), point1( point1 ), point2( point2 ), velocity( velocity ), velocityOfFluid( velocityOfFluid ),
390  fluidDensity( fluidDensity ), gravity( gravity ), volume(volume)
391  {
392  }
401  };
402 
404 
409  {
410  public:
417  WireLinkedStructureData( agx::Real radius, const AerodynamicsParameters* aeroParams, const HydrodynamicsParameters* hydroParams );
418 
422  agx::Real getRadius();
423 
427  void addWaterSegment( const Segment& segment );
428 
432  void addAirSegment( const Segment& segment );
433 
437  SegmentContainer& getAirSegments();
438 
442  SegmentContainer& getWaterSegments();
443 
444  protected:
445  virtual ~WireLinkedStructureData();
446 
447 
448  private:
449  SegmentContainer m_airSegments;
450  SegmentContainer m_waterSegments;
451  agx::Real m_radius;
452  };
453 
456 
457 
463  {
464  DynamicsData() : worldForce(), worldTorque(), bodyFrameAddedMass( agx::Vec3() ), bodyFrameAddedInertia( agx::Vec3() ) {}
465 
473  void getAddedMassAndInertiaDiagonalCoefficients( const agx::RigidBody* rb, agx::Vec3& addedMassDiagonalCoefficients, agx::Vec3& addedInertiaDiagonalCoefficients ) const;
474 
479  };
480 
485  {
488  size_t numWaterSegments{0};
489  size_t numAirSegments{0};
490  agx::Real lengthWater{0.0};
491  agx::Real lengthAir{0.0};
492  };
493 
498  {
500  };
501 
502  public:
507 
513  virtual agx::Bool addWater( agxCollide::Geometry* geometry );
514 
521  virtual agx::Bool setEnableAerodynamics( agxCollide::Geometry* geometry, agx::Bool enable );
522 
528  virtual void setEnableAerodynamics( agx::Bool enable );
529 
536  virtual agx::Bool setEnableAerodynamics( agx::RigidBody* rb, agx::Bool enable );
537 
544  virtual agx::Bool setEnableAerodynamics( agxWire::Wire* wire, agx::Bool enable );
545 
553  agx::Bool setEnableAerodynamics( agxSDK::LinkedStructure* linkedStructure, agx::Bool enable );
554 
559  void setAirDensity( agx::Real airDensity );
560 
565  virtual agxModel::AerodynamicsParameters* getOrCreateAerodynamicsParameters( const agxCollide::Shape* shape ) const;
566 
571  virtual agxModel::HydrodynamicsParameters* getOrCreateHydrodynamicsParameters( const agxCollide::Shape* shape ) const;
572 
577  agxModel::AerodynamicsParameters* getOrCreateAerodynamicsParameters( const agxWire::Wire* wire ) const;
578 
583  agxModel::HydrodynamicsParameters* getOrCreateHydrodynamicsParameters( const agxWire::Wire* wire ) const;
584 
592  agxModel::AerodynamicsParameters* getOrCreateAerodynamicsParameters( const agxSDK::LinkedStructure* linkedStructure ) const;
593 
601  agxModel::HydrodynamicsParameters* getOrCreateHydrodynamicsParameters( const agxSDK::LinkedStructure* linkedStructure ) const;
602 
606  virtual agx::Bool registerPressureFieldRenderer( agxModel::PressureFieldRenderer* pressureFieldRenderer, const agxCollide::Shape* shape );
607 
612  virtual void setWindGenerator( agxModel::WindAndWaterController::WindGenerator* windGenerator );
613 
617  virtual agxModel::WindAndWaterController::WindGenerator* getWindGenerator() const;
618 
626  virtual agx::Bool setWaterFlowGenerator( const agxCollide::Geometry* waterGeometry,
628 
633  agxModel::WindAndWaterController::WaterFlowGenerator* getWaterFlowGenerator( const agxCollide::Geometry* waterGeometry ) const;
634 
640  virtual agx::Bool setWaterWrapper( agxCollide::Geometry* geometry,
641  agxModel::WaterWrapper* waterWrapper );
646  agxModel::WaterWrapper* getWaterWrapper( const agxCollide::Geometry* waterGeometry );
647 
654  static agxCollide::TrimeshRef createPrimitiveMesh( const agxCollide::Shape* shape,
656 
666  virtual agxModel::WindAndWaterController::DynamicsData calculateDynamicsData(
667  const agxCollide::Geometry* waterGeometry, const agx::RigidBody* rb, const agx::Vec3& gravity,
668  const agxCollide::Space* space = nullptr, agx::Bool updateRenderers = false );
669 
675  agxModel::WindAndWaterController::DynamicsWireData calculateWireDynamicsData(
676  const agxCollide::Geometry* waterGeometry, agxWire::Wire* wire );
677 
683  agxModel::WindAndWaterController::DynamicsLinkedStructureData calculateLinkedStructureDynamicsData(
684  const agxCollide::Geometry* waterGeometry, agxSDK::LinkedStructure* linkedStructure,
685  const agxCollide::Space* space );
686 
693  static agxModel::WindAndWaterController* find( agxSDK::Simulation* simulation, const agx::Uuid& uuid );
694 
701  static agxModel::WindAndWaterControllerPtrVector findAll( const agxSDK::Simulation* simulation, const agx::Name& name );
702 
708  static agxModel::WindAndWaterControllerPtrVector findAll( const agxSDK::Simulation* simulation );
709 
713  virtual void preCollide( const agx::TimeStamp& ) override;
714 
718  virtual void pre( const agx::TimeStamp& ) override;
719 
723  virtual void post( const agx::TimeStamp& ) override;
724 
726 
727  protected:
729  {
732 
733  protected:
735  };
737 
739  {
740  AerodynamicsData( const agxCollide::Geometry* geometryIn ) : geometry( geometryIn ) {}
742 
743  protected:
744  virtual ~AerodynamicsData() {}
745  };
747 
749  {
750  public:
753 
754  const agxCollide::Mesh* getOrCreateMesh( const agxCollide::Shape* shape, agx::Vec3& scale,
755  agxModel::WindAndWaterParameters::ShapeTessellation tessellationLevel ) const;
756 
757  static agx::Vec3 findScale( const agxCollide::Shape* shape );
758 
759  void garbageCollect();
760 
761  private:
762  struct PrimitiveData : public agx::Referenced
763  {
764  PrimitiveData( const agxCollide::Shape* shapeIn, agxCollide::Mesh* meshIn )
765  : shape( shapeIn ), mesh( meshIn )
766  {
767  }
768 
769  virtual void checkSize( agx::Real resolution ) = 0;
770 
772  agxCollide::MeshRef mesh;
773 
774  protected:
775  virtual ~PrimitiveData() {}
776  };
777 
778  struct CapsuleData : PrimitiveData
779  {
780  CapsuleData( const agxCollide::Shape* shapeIn, agxCollide::Mesh* meshIn, agx::Real radiusIn, agx::Real heightIn )
781  : PrimitiveData( shapeIn, meshIn ), radius( radiusIn ), height( heightIn )
782  {
783  }
784 
785  virtual void checkSize( agx::Real resolution ) override;
786 
787  agx::Real radius;
788  agx::Real height;
789 
790  protected:
791  virtual ~CapsuleData() {}
792  };
793 
794  struct ConeData : PrimitiveData
795  {
796  ConeData( const agxCollide::Shape* shapeIn, agxCollide::Mesh* meshIn , agx::Real topRadiusIn, agx::Real bottomRadiusIn, agx::Real heightIn )
797  : PrimitiveData( shapeIn, meshIn ), topRadius( topRadiusIn ), bottomRadius( bottomRadiusIn ),
798  height( heightIn )
799  {
800  }
801 
802  virtual void checkSize( agx::Real resolution ) override;
803 
804  agx::Real topRadius;
805  agx::Real bottomRadius;
806  agx::Real height;
807 
808  protected:
809  virtual ~ConeData() {}
810  };
811 
812  struct HollowConeData : PrimitiveData
813  {
814  HollowConeData( const agxCollide::Shape* shapeIn, agxCollide::Mesh* meshIn, agx::Real topOuterRadiusIn,
815  agx::Real bottomInnerRadiusIn, agx::Real heightIn,
816  agx::Real thicknessIn )
817  : PrimitiveData( shapeIn, meshIn ), topOuterRadius( topOuterRadiusIn ),
818  bottomInnerRadius( bottomInnerRadiusIn ), height( heightIn ), thickness( thicknessIn )
819  {
820  }
821 
822  virtual void checkSize( agx::Real resolution ) override;
823 
824  agx::Real topOuterRadius;
825  agx::Real bottomInnerRadius;
826  agx::Real height;
827  agx::Real thickness;
828 
829  protected:
830  virtual ~HollowConeData() {}
831  };
832 
833  struct HollowCylinderData : PrimitiveData
834  {
835  HollowCylinderData( const agxCollide::Shape* shapeIn, agxCollide::Mesh* meshIn, agx::Real innerRadiusIn, agx::Real heightIn, agx::Real thicknessIn )
836  : PrimitiveData( shapeIn, meshIn ), innerRadius( innerRadiusIn ), height( heightIn ),
837  thickness( thicknessIn )
838  {
839  }
840 
841  virtual void checkSize( agx::Real resolution ) override;
842 
843  agx::Real innerRadius;
844  agx::Real height;
845  agx::Real thickness;
846 
847  protected:
848  virtual ~HollowCylinderData() {}
849  };
850 
852 
855 
856  private:
857  agxCollide::MeshRef createUnitShape( agxCollide::Shape::Type shapeType, agx::Real resolution = agx::Real( 1 ) ) const;
858  const agxCollide::Mesh* getOrCreatePrimitive( const agxCollide::Shape* shape, agx::Real resolution = agx::Real( 1 ) ) const;
859 
860  private:
861  mutable MeshContainer m_cache;
862  mutable PrimitiveContainer m_primitives;
863 
864  mutable std::mutex meshCreationMutex;
865  };
866 
880 
881 
882  protected:
886  virtual ~WindAndWaterController();
887 
888  protected:
892  void configureDefaultAlgorithms();
893 
897  void garbageCollect();
898 
902  agxModel::WindAndWaterController::PressureFieldRendererData* getPressureFieldRenderData( const agxCollide::Shape* shape ) const;
903 
907  agxModel::PressureFieldRenderer* getPressureFieldRender( const agxCollide::Shape* shape ) const;
908 
912  virtual agxModel::WindAndWaterController::ObjectDataContainer calculateObjectData(
913  const agxCollide::Geometry* waterGeometry,
914  const agxCollide::Geometry* geometry,
915  const agx::Vec3& gravity,
916  agx::Bool aeroEnabled,
917  agx::Bool hydroEnabled,
918  agx::Bool updateRenderers,
919  agx::UInt& numProcessedTriangles,
920  const agx::UIntVector startIndexT,
921  const agx::UIntVector startIndexV,
922  const agx::TimeStamp& t = 0 );
923 
928  agxWire::Wire* wire, WirePairContainer wirePairs, WindAndWaterController::WindWrapper wind, agx::Bool aeroEnable,
929  const agx::TimeStamp& t = 0 );
930 
934  agxModel::WindAndWaterController::WireLinkedStructureData* calculateLinkedStructureData(
935  const agxCollide::Geometry* waterGeometry, const agxCollide::Geometry* geometry, const agx::Vec3& gravity,
936  const AerodynamicsParameters* aeroParams, const HydrodynamicsParameters* hydroParams, agx::Bool aeroEnabled,
937  agx::Bool hydroEnabled, const agx::TimeStamp& t = 0 );
938 
939  void getSizeOfGeometry( const agxCollide::Geometry* geometry,
940  agx::UIntVector& numTriangles,
941  agx::UIntVector& numVertices );
942 
943  protected:
944  AlgorithmContainer m_algorithms;
945  GeometryConstObserverVector m_waterGeometries;
946  AerodynamicsDataContainer m_aeroGeometries;
947  WireObserverVector m_aeroWires;
950  mutable AerodynamicsParametersContainer m_aerodynamicsParameters;
951  mutable AerodynamicsParametersWireContainer m_aerodynamicsParametersWires;
952  mutable AerodynamicsParametersLinkedStructureContainer m_aerodynamicsParametersLinkedStructures;
954  mutable HydrodynamicsParametersContainer m_hydrodynamicsParameters;
955  mutable HydrodynamicsParametersWireContainer m_hydrodynamicsParametersWires;
956  mutable HydrodynamicsParametersLinkedStructureContainer m_hydrodynamicsParametersLinkedStructures;
957  PressureFieldRendererDataContainer m_pressureFieldRenderers;
960  WaterFlowGeneratorContainer m_flowGenerators;
961  WaterWrapperContainer m_waterWrappers;
966  };
967 
973  class AGXMODEL_EXPORT WindAndWaterController::Algorithm : public agx::Referenced
974  {
975  public:
977 
978  public:
982  virtual void preCollide( agxModel::WindAndWaterController* /*controller*/ ) {}
983 
987  virtual void pre( agxModel::WindAndWaterController* /*controller*/ ) {}
988 
992  virtual void post( agxModel::WindAndWaterController* /*controller*/ ) {}
993 
998  };
999 
1001 
1006  {
1007  public:
1012  ConstantWaterFlowGenerator( const agx::Vec3& velocity );
1013 
1018  void setVelocity( const agx::Vec3& velocity );
1019 
1023  const agx::Vec3& getVelocity() const;
1024 
1025  public:
1026  virtual agx::Vec3 getVelocity( const agx::Vec3& /*worldPosition*/ ) const override;
1027 
1029 
1030  protected:
1032  virtual ~ConstantWaterFlowGenerator();
1033 
1034  private:
1035  agx::Vec3 m_velocity;
1036  };
1037 
1038 
1040 
1045  {
1046  public:
1051  ConstantWindGenerator( const agx::Vec3& velocity );
1052 
1057  void setVelocity( const agx::Vec3& velocity );
1058 
1062  const agx::Vec3& getVelocity() const;
1063 
1064  public:
1065  virtual agx::Vec3 getVelocity( const agx::Vec3& /*worldPosition*/ ) const override;
1066 
1068 
1069  protected:
1071  virtual ~ConstantWindGenerator();
1072 
1073  private:
1074  agx::Vec3 m_velocity;
1075  };
1076 
1082  {
1084 
1085  public:
1089  WaterWrapper();
1090 
1098  virtual agx::Real findHeightFromSurface( const agx::Vec3& worldPoint, const agx::Vec3& upVector, const agx::TimeStamp& t ) const;
1099 
1103  virtual agx::Bool isValid() const;
1104 
1108  virtual agx::Real getDensity() const;
1109 
1113  virtual agx::Vec3 getVelocity( const agx::Vec3& worldPoint ) const;
1114 
1118  const agxCollide::Geometry* getGeometry() const;
1119 
1123  const agxModel::WindAndWaterController::WaterFlowGenerator* getWaterFlowGenerator() const;
1124 
1125 #ifndef SWIG
1127 #endif
1128 
1129  protected:
1130  virtual ~WaterWrapper() {}
1131 
1137  agx::Vec3 project( const agx::Vec3& localPoint, const agx::Vec3& localUpVector ) const;
1138 
1139  protected:
1144 
1146  private:
1147  // Only used by WindAndWaterController
1148  WaterWrapper( const agxCollide::Geometry* geometry );
1149  void setFlowGenerator( WindAndWaterController::WaterFlowGenerator* flowGenerator );
1150  void setWaterGeometry( agxCollide::Geometry* waterGeometry );
1151  void update();
1153  };
1154 
1156  {
1157  return m_aeroParams;
1158  }
1159 
1161  {
1162  return m_hydroParams;
1163  }
1164 
1166  {
1167  return m_velocity;
1168  }
1169 
1171  {
1172  return m_velocity;
1173  }
1174 }
1175 
1176 #endif // AGXMODEL_WINDANDWATERCONTROLLER_H
Class to generate constant water flow in a scene.
virtual void updateInteraction(agxModel::WindAndWaterController::ObjectData &, const GlobalTriangleData::Container &)
Called when it&#39;s time to update interaction.
AerodynamicsParametersContainer m_aerodynamicsParameters
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3.h:36
Hydro- and aerodynamic results for a linked structure.
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
Definition: Mesh.h:69
Derive from this class to implement a listener for simulation step events.
Interface for generating water flow and wind.
agx::ref_ptr< WindAndWaterController > WindAndWaterControllerRef
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)
agx::ref_ptr< AerodynamicsData > AerodynamicsDataRef
bool Bool
Definition: Integer.h:48
agx::HashVector< const agxWire::Wire *, AerodynamicsParametersRef > AerodynamicsParametersWireContainer
Base class for a shape.
Definition: Shape.h:53
AerodynamicsParametersLinkedStructureContainer m_aerodynamicsParametersLinkedStructures
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::HashVector< const agxCollide::Geometry *, AerodynamicsDataRef > AerodynamicsDataContainer
Class to generate constant wind in a scene.
virtual void pre(agxModel::WindAndWaterController *)
Called before all data is collected and before updateInteraction is called.
const agxModel::HydrodynamicsParameters * getHydrodynamicsParameters() const
agx::HashVector< const agxCollide::Shape *, HydrodynamicsParametersRef > HydrodynamicsParametersContainer
agx::AffineMatrix4x4 m_worldToShape
HydrodynamicsParametersLinkedStructureContainer m_hydrodynamicsParametersLinkedStructures
agx::HashVector< const agxCollide::Geometry *, WaterWrapperRef > WaterWrapperContainer
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynami...
Representation of a name string.
Definition: Name.h:32
agx::Vector< agxModel::WindAndWaterController::AlgorithmRef > AlgorithmContainer
#define AGX_FORCE_INLINE
Definition: Object.h:59
agx::ref_ptr< PressureFieldRendererData > PressureFieldRendererDataRef
agx::Real TimeStamp
Definition: TimeStamp.h:26
agx::HashVector< const agxSDK::LinkedStructure *, HydrodynamicsParametersRef > HydrodynamicsParametersLinkedStructureContainer
agx::HashVector< const agxCollide::Geometry *, WaterFlowGeneratorRef > WaterFlowGeneratorContainer
agx::HashVector< const agxWire::Wire *, HydrodynamicsParametersRef > HydrodynamicsParametersWireContainer
Interface for generating wind effects.
agxCollide::GeometryConstObserver m_geometry
Base class providing referencing counted objects.
Definition: Referenced.h:119
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
HydrodynamicsParametersRef m_globalHydrodynamicsParameters
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
agxModel::WindAndWaterController::ObjectData ObjectData
Templated vector class.
Definition: Vector.h:52
AerodynamicsParametersWireContainer m_aerodynamicsParametersWires
WirePair(agxWire::Node *node1, agxWire::Node *node2, const agxCollide::Geometry *water, agx::Vec3 gravity)
void unLock() const
Perform a mutex unlock for this ObjectData.
virtual void preCollide(agxModel::WindAndWaterController *)
Called during normal preCollide events.
Interface and placeholder of controllers/helpers for wires.
Definition: Wire.h:61
uint32_t UInt
Definition: Integer.h:34
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
void lock() const
Perform a mutex lock for this ObjectData.
Water wrapper that can be inherited to create custom made wrappers.
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:81
HydrodynamicsParametersContainer m_hydrodynamicsParameters
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Hydro- and aerodynamic results for a wire.
const agx::Vec3 & getVelocity() const
GlobalTriangleData::Container m_trianglePool
agx::Vector< agxWire::WireObserver > WireObserverVector
GeometryConstObserverVector m_waterGeometries
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agx::ref_ptr< WireLinkedStructureData > WireLinkedStructureDataRef
agx::Vector< WirePair > WirePairContainer
Data for rigid body with aero/hydro static/dynamic forces and added mass and inertia matrices...
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
virtual void post(agxModel::WindAndWaterController *)
Called during normal post.
WaterFlowGeneratorContainer m_flowGenerators
HydrodynamicsParametersWireContainer m_hydrodynamicsParametersWires
PressureFieldRendererDataContainer m_pressureFieldRenderers
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
Definition: Uuid.h:41
AerodynamicsDataContainer m_aeroGeometries
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
agx::HashVector< const agxCollide::Shape *, AerodynamicsParametersRef > AerodynamicsParametersContainer
agx::Vector< WindAndWaterController *> WindAndWaterControllerPtrVector
Type
Define the type of a Shape.
Definition: Shape.h:58
agx::ref_ptr< ObjectData > ObjectDataRef
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
AerodynamicsParametersRef m_globalAerodynamicsParameters
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
agx::HashVector< const agxCollide::Shape *, PressureFieldRendererDataRef > PressureFieldRendererDataContainer
Vertex data for all global vertices in a mesh.
const WindAndWaterController::WaterFlowGenerator * m_flowGenerator
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
AerodynamicsData(const agxCollide::Geometry *geometryIn)
#define AGXMODEL_EXPORT
Class defining a node that is part of a wire.
Definition: agxWire/Node.h:511
double Real
Definition: Real.h:42
const agxCollide::Shape * m_shape
ShapeTessellation
Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder.
Triangle data for a normal or a clipped triangle.
agx::HashVector< const agxSDK::LinkedStructure *, AerodynamicsParametersRef > AerodynamicsParametersLinkedStructureContainer
Inheritance with partial specialization due to bug with ref_ptr containers.
agx::Vector< agxCollide::GeometryConstObserver > GeometryConstObserverVector
agx::Vector< ObjectDataRef > ObjectDataContainer
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
agx::Vector< WireLinkedStructureDataRef > WireLinkedStructureDataContainer
const agx::Vec3 & getVelocity() const