AGXDynamics  2.35.0.3
WindAndWaterController.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
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:
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
agxModel::WindAndWaterController::ObjectData
Static data for a shape.
Definition: WindAndWaterController.h:189
agxModel::WindAndWaterController::preCollide
virtual void preCollide(agxModel::WindAndWaterController *)
Called during normal preCollide events.
Definition: WindAndWaterController.h:982
agxModel::WindAndWaterController::m_addedMassDb
AddedMassDbRef m_addedMassDb
Definition: WindAndWaterController.h:948
agxModel::WindAndWaterController::WindAndWaterData
Data for different objects.
Definition: WindAndWaterController.h:159
agxModel::WindAndWaterController::PressureFieldRendererData::shape
agxCollide::ShapeConstObserver shape
Definition: WindAndWaterController.h:731
agxModel::WindAndWaterController::WindAndWaterData::getHydrodynamicsParameters
const agxModel::HydrodynamicsParameters * getHydrodynamicsParameters() const
Definition: WindAndWaterController.h:1160
agxModel::WindAndWaterController::m_hydrodynamicsParameters
HydrodynamicsParametersContainer m_hydrodynamicsParameters
Definition: WindAndWaterController.h:954
agxModel::ConstantWindGenerator
Class to generate constant wind in a scene.
Definition: WindAndWaterController.h:1044
agxCollide::Mesh
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
Definition: Mesh.h:69
agxModel::WindAndWaterController::SegmentContainer
agx::Vector< Segment > SegmentContainer
Definition: WindAndWaterController.h:403
LinkedStructure.h
agxModel::WindAndWaterController::WireObserverVector
agx::Vector< agxWire::WireObserver > WireObserverVector
Definition: WindAndWaterController.h:879
agx::Real
double Real
Definition: Real.h:42
agxModel::WaterWrapper::~WaterWrapper
virtual ~WaterWrapper()
Definition: WindAndWaterController.h:1130
agxModel::WindAndWaterController::m_waterGeometries
GeometryConstObserverVector m_waterGeometries
Definition: WindAndWaterController.h:945
agxModel::WindAndWaterController::WindWrapper::m_density
agx::Real m_density
Definition: WindAndWaterController.h:151
agxModel
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
agxSDK::StepEventListener
Derive from this class to implement a listener for simulation step events.
Definition: StepEventListener.h:37
agx::Vector
Templated vector class.
Definition: Vector.h:52
agxModel::WindAndWaterController::WaterFlowGenerator
Interface for generating water flow.
Definition: WindAndWaterController.h:80
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
agxModel::WindAndWaterController::Segment::velocityOfFluid
agx::Vec3 velocityOfFluid
Definition: WindAndWaterController.h:397
agxModel::WindAndWaterController::WirePair::gravity
const agx::Vec3 gravity
Definition: WindAndWaterController.h:373
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
agxModel::WindAndWaterController::m_unitPrimitiveCache
UnitPrimitiveCache m_unitPrimitiveCache
Definition: WindAndWaterController.h:958
agxModel::WindAndWaterController::WireLinkedStructureDataRef
agx::ref_ptr< WireLinkedStructureData > WireLinkedStructureDataRef
Definition: WindAndWaterController.h:454
agxModel::WindAndWaterController::m_flowGenerators
WaterFlowGeneratorContainer m_flowGenerators
Definition: WindAndWaterController.h:960
agxModel::WaterWrapper::m_flowGenerator
const WindAndWaterController::WaterFlowGenerator * m_flowGenerator
Definition: WindAndWaterController.h:1141
agxModel::WindAndWaterController::m_pressureFieldRenderers
PressureFieldRendererDataContainer m_pressureFieldRenderers
Definition: WindAndWaterController.h:957
export.h
agxModel::WindAndWaterController::WirePairContainer
agx::Vector< WirePair > WirePairContainer
Definition: WindAndWaterController.h:383
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
agxModel::WindAndWaterController::DynamicsData::worldForce
agx::Vec3 worldForce
Definition: WindAndWaterController.h:475
Wire.h
Geometry.h
agxModel::WindAndWaterController::AerodynamicsParametersContainer
agx::HashVector< const agxCollide::Shape *, AerodynamicsParametersRef > AerodynamicsParametersContainer
Definition: WindAndWaterController.h:868
agxModel::VertexData
Vertex data for all global vertices in a mesh.
Definition: WindAndWaterUtils.h:34
agx::AffineMatrix4x4T< Real >
agxModel::WindAndWaterController::ObjectDataRef
agx::ref_ptr< ObjectData > ObjectDataRef
Definition: WindAndWaterController.h:357
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxModel::WindAndWaterController::post
virtual void post(agxModel::WindAndWaterController *)
Called during normal post.
Definition: WindAndWaterController.h:992
agxModel::WindAndWaterController::Segment::velocity
agx::Vec3 velocity
Definition: WindAndWaterController.h:396
agxModel::PressureFieldRenderer
Definition: agxModel/PressureFieldRenderer.h:27
agxModel::WindAndWaterController::Segment::point1
agx::Vec3 point1
Definition: WindAndWaterController.h:394
agxModel::WindAndWaterController::m_hydrodynamicsParametersWires
HydrodynamicsParametersWireContainer m_hydrodynamicsParametersWires
Definition: WindAndWaterController.h:955
agxModel::WindAndWaterControllerPtrVector
agx::Vector< WindAndWaterController * > WindAndWaterControllerPtrVector
Definition: WindAndWaterController.h:40
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE
#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
agxModel::WindAndWaterController::DynamicsWireData::airForce
agx::Vec3 airForce
Definition: WindAndWaterController.h:487
agxModel::WindAndWaterController::WindAndWaterData::m_aeroParams
const AerodynamicsParameters * m_aeroParams
Definition: WindAndWaterController.h:182
agxWire::Wire
Interface and placeholder of controllers/helpers for wires.
Definition: Wire.h:61
agxModel::WindAndWaterController::m_aeroGeometries
AerodynamicsDataContainer m_aeroGeometries
Definition: WindAndWaterController.h:946
agxModel::WindAndWaterController::DynamicsLinkedStructureData
Hydro- and aerodynamic results for a linked structure.
Definition: WindAndWaterController.h:497
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agxModel::WindAndWaterController::WindAndWaterData::m_hydroParams
const HydrodynamicsParameters * m_hydroParams
Definition: WindAndWaterController.h:183
agxModel::WindAndWaterController::m_globalAerodynamicsParameters
AerodynamicsParametersRef m_globalAerodynamicsParameters
Definition: WindAndWaterController.h:949
agx::VectorPOD
Vector containing 'raw' data.
Definition: Vector.h:245
agxModel::WindAndWaterController::PressureFieldRendererDataContainer
agx::HashVector< const agxCollide::Shape *, PressureFieldRendererDataRef > PressureFieldRendererDataContainer
Definition: WindAndWaterController.h:874
agxModel::WindAndWaterController::WirePair::WirePair
WirePair()
Definition: WindAndWaterController.h:362
agx::observer_ptr< const Shape >
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agxModel::WindAndWaterController::PressureFieldRendererData
Definition: WindAndWaterController.h:728
agxModel::WindAndWaterController::UnitPrimitiveCache
Definition: WindAndWaterController.h:748
agxModel::WindAndWaterController::DynamicsData
Data for rigid body with aero/hydro static/dynamic forces and added mass and inertia matrices.
Definition: WindAndWaterController.h:462
agxModel::WindAndWaterController::Segment::fluidDensity
agx::Real fluidDensity
Definition: WindAndWaterController.h:398
agxModel::WindAndWaterController::DynamicsWireData::waterForce
agx::Vec3 waterForce
Definition: WindAndWaterController.h:486
agxModel::WindAndWaterController::ObjectData::unLock
void unLock() const
Perform a mutex unlock for this ObjectData.
Definition: WindAndWaterController.h:335
agxModel::WindAndWaterController::DynamicsData::DynamicsData
DynamicsData()
Definition: WindAndWaterController.h:464
agxModel::WindAndWaterController::Segment::rb
agx::RigidBodyRef rb
Definition: WindAndWaterController.h:393
agxModel::WindAndWaterController::WirePair::water
const agxCollide::Geometry * water
Definition: WindAndWaterController.h:372
agxModel::WindAndWaterController::WireLinkedStructureData
Data for a wire or a linked structure.
Definition: WindAndWaterController.h:408
agxModel::WindAndWaterController::WindGenerator
Interface for generating wind effects.
Definition: WindAndWaterController.h:101
agxModel::WindAndWaterController::AerodynamicsParametersLinkedStructureContainer
agx::HashVector< const agxSDK::LinkedStructure *, AerodynamicsParametersRef > AerodynamicsParametersLinkedStructureContainer
Definition: WindAndWaterController.h:872
agxModel::WindAndWaterController::m_vertexPool
VertexData::Container m_vertexPool
Definition: WindAndWaterController.h:965
agxModel::WindAndWaterController::Segment::point2
agx::Vec3 point2
Definition: WindAndWaterController.h:395
agxModel::WindAndWaterController::WindAndWaterFlowGenerator
Interface for generating water flow and wind.
Definition: WindAndWaterController.h:53
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agxModel::WindAndWaterController::m_aeroWires
WireObserverVector m_aeroWires
Definition: WindAndWaterController.h:947
agxModel::WindAndWaterController::GeometryConstObserverVector
agx::Vector< agxCollide::GeometryConstObserver > GeometryConstObserverVector
Definition: WindAndWaterController.h:878
agxModel::WindAndWaterController::AerodynamicsData::AerodynamicsData
AerodynamicsData(const agxCollide::Geometry *geometryIn)
Definition: WindAndWaterController.h:740
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
agxModel::WindAndWaterController
Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynami...
Definition: WindAndWaterController.h:45
agxCollide::Shape
Base class for a shape.
Definition: Shape.h:53
agxModel::WindAndWaterController::WindWrapper::m_enable
agx::Bool m_enable
Definition: WindAndWaterController.h:152
agxModel::ConstantWaterFlowGenerator
Class to generate constant water flow in a scene.
Definition: WindAndWaterController.h:1005
agxModel::WindAndWaterController::ObjectDataContainer
agx::Vector< ObjectDataRef > ObjectDataContainer
Definition: WindAndWaterController.h:358
agxModel::WaterWrapper
Water wrapper that can be inherited to create custom made wrappers.
Definition: WindAndWaterController.h:1081
agxModel::WindAndWaterController::m_aeroForAll
agx::Bool m_aeroForAll
Definition: WindAndWaterController.h:963
agx::Vec3
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3.h:36
agxModel::WindAndWaterController::DynamicsData::worldTorque
agx::Vec3 worldTorque
Definition: WindAndWaterController.h:476
agxModel::WindAndWaterController::DynamicsData::bodyFrameAddedMass
agx::Matrix3x3 bodyFrameAddedMass
Definition: WindAndWaterController.h:477
agxSDK::LinkedStructure
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
Definition: LinkedStructure.h:35
agxModel::WindAndWaterController::updateInteraction
virtual void updateInteraction(agxModel::WindAndWaterController::ObjectData &, const GlobalTriangleData::Container &)
Called when it's time to update interaction.
Definition: WindAndWaterController.h:997
Vec6.h
agxModel::WindAndWaterController::WireLinkedStructureDataContainer
agx::Vector< WireLinkedStructureDataRef > WireLinkedStructureDataContainer
Definition: WindAndWaterController.h:455
agxCollide::Shape::Type
Type
Define the type of a Shape.
Definition: Shape.h:58
agxModel::WindAndWaterController::m_airDensity
agx::Real m_airDensity
Definition: WindAndWaterController.h:962
agxModel::AerodynamicsParameters
Definition: WindAndWaterParameters.h:137
agx::LinearProbingHashTable
Inheritance with partial specialization due to bug with ref_ptr containers.
Definition: LinearProbingHashTable.h:871
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
agxModel::WindAndWaterController::WindWrapper::m_windGenerator
const WindGenerator * m_windGenerator
Definition: WindAndWaterController.h:153
agxModel::WindAndWaterController::m_aerodynamicsParameters
AerodynamicsParametersContainer m_aerodynamicsParameters
Definition: WindAndWaterController.h:950
agxModel::WindAndWaterController::m_aerodynamicsParametersLinkedStructures
AerodynamicsParametersLinkedStructureContainer m_aerodynamicsParametersLinkedStructures
Definition: WindAndWaterController.h:952
agx::Name
Representation of a name string.
Definition: Name.h:32
agxModel::WindAndWaterController::Segment::volume
agx::Real volume
Definition: WindAndWaterController.h:400
agxCollide::Space
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:81
agxModel::WindAndWaterParameters::ShapeTessellation
ShapeTessellation
Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder.
Definition: WindAndWaterParameters.h:35
agxModel::WindAndWaterController::AerodynamicsDataContainer
agx::HashVector< const agxCollide::Geometry *, AerodynamicsDataRef > AerodynamicsDataContainer
Definition: WindAndWaterController.h:875
agxModel::ConstantWindGenerator::getVelocity
const agx::Vec3 & getVelocity() const
agxModel::WindAndWaterController::Segment::gravity
agx::Vec3 gravity
Definition: WindAndWaterController.h:399
agxModel::WindAndWaterController::AerodynamicsDataRef
agx::ref_ptr< AerodynamicsData > AerodynamicsDataRef
Definition: WindAndWaterController.h:746
agxModel::WindAndWaterController::WindWrapper
Wraps wind related things.
Definition: WindAndWaterController.h:127
agxModel::WindAndWaterController::PressureFieldRendererData::pressureField
agxModel::PressureFieldRendererRef pressureField
Definition: WindAndWaterController.h:730
agxModel::WindAndWaterController::m_algorithms
AlgorithmContainer m_algorithms
Definition: WindAndWaterController.h:944
agxModel::ConstantWaterFlowGenerator::getVelocity
const agx::Vec3 & getVelocity() const
agxModel::WindAndWaterController::AerodynamicsParametersWireContainer
agx::HashVector< const agxWire::Wire *, AerodynamicsParametersRef > AerodynamicsParametersWireContainer
Definition: WindAndWaterController.h:870
agxModel::WaterWrapper::m_worldToShape
agx::AffineMatrix4x4 m_worldToShape
Definition: WindAndWaterController.h:1143
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:113
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
agx::UInt
uint32_t UInt
Definition: Integer.h:34
PressureFieldRenderer.h
agxModel::WindAndWaterController::AerodynamicsData
Definition: WindAndWaterController.h:738
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition: ContactForceFilterParticipant.h:22
agx::Bool
bool Bool
Definition: Integer.h:48
agxModel::WindAndWaterController::WaterWrapperContainer
agx::HashVector< const agxCollide::Geometry *, WaterWrapperRef > WaterWrapperContainer
Definition: WindAndWaterController.h:877
agxModel::WindAndWaterController::m_hydrodynamicsParametersLinkedStructures
HydrodynamicsParametersLinkedStructureContainer m_hydrodynamicsParametersLinkedStructures
Definition: WindAndWaterController.h:956
agx::TimeStamp
agx::Real TimeStamp
Definition: TimeStamp.h:26
agxModel::HydrodynamicsParameters
Definition: WindAndWaterParameters.h:151
agxModel::WindAndWaterController::pre
virtual void pre(agxModel::WindAndWaterController *)
Called before all data is collected and before updateInteraction is called.
Definition: WindAndWaterController.h:987
agxModel::WindAndWaterController::AlgorithmContainer
agx::Vector< agxModel::WindAndWaterController::AlgorithmRef > AlgorithmContainer
Definition: WindAndWaterController.h:867
AddedMassDb.h
agxModel::WindAndWaterController::PressureFieldRendererData::~PressureFieldRendererData
virtual ~PressureFieldRendererData()
Definition: WindAndWaterController.h:734
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition: agxModel/export.h:42
agxModel::WaterWrapper::m_shape
const agxCollide::Shape * m_shape
Definition: WindAndWaterController.h:1142
agxModel::WindAndWaterController::WirePair::WirePair
WirePair(agxWire::Node *node1, agxWire::Node *node2, const agxCollide::Geometry *water, agx::Vec3 gravity)
Definition: WindAndWaterController.h:366
agxModel::WindAndWaterController::HydrodynamicsParametersContainer
agx::HashVector< const agxCollide::Shape *, HydrodynamicsParametersRef > HydrodynamicsParametersContainer
Definition: WindAndWaterController.h:869
agxModel::WindAndWaterController::DynamicsWireData
Hydro- and aerodynamic results for a wire.
Definition: WindAndWaterController.h:484
agxModel::WaterWrapper::m_geometry
agxCollide::GeometryConstObserver m_geometry
Definition: WindAndWaterController.h:1140
agxModel::WindAndWaterController::DynamicsData::bodyFrameAddedInertia
agx::Matrix3x3 bodyFrameAddedInertia
Definition: WindAndWaterController.h:478
agxModel::WindAndWaterController::m_waterWrappers
WaterWrapperContainer m_waterWrappers
Definition: WindAndWaterController.h:961
agxModel::WindAndWaterController::WirePair::node1
agxWire::Node * node1
Definition: WindAndWaterController.h:370
agxModel::WindAndWaterControllerRef
agx::ref_ptr< WindAndWaterController > WindAndWaterControllerRef
Definition: WindAndWaterController.h:39
agx::Vec3T< Real >
agxModel::WindAndWaterController::AerodynamicsData::geometry
agxCollide::GeometryConstObserver geometry
Definition: WindAndWaterController.h:741
agxModel::WindAndWaterController::ObjectData::lock
void lock() const
Perform a mutex lock for this ObjectData.
Definition: WindAndWaterController.h:330
agxModel::WindAndWaterController::WirePair::node2
agxWire::Node * node2
Definition: WindAndWaterController.h:371
agx::Uuid
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
Definition: Uuid.h:41
agxModel::WindAndWaterController::PressureFieldRendererDataRef
agx::ref_ptr< PressureFieldRendererData > PressureFieldRendererDataRef
Definition: WindAndWaterController.h:736
agxModel::WindAndWaterController::HydrodynamicsParametersLinkedStructureContainer
agx::HashVector< const agxSDK::LinkedStructure *, HydrodynamicsParametersRef > HydrodynamicsParametersLinkedStructureContainer
Definition: WindAndWaterController.h:873
agx::Matrix3x3T< Real >
agxModel::WindAndWaterController::WirePair
Definition: WindAndWaterController.h:360
agxModel::WindAndWaterController::Segment
Definition: WindAndWaterController.h:385
agxModel::WindAndWaterController::WaterFlowGeneratorContainer
agx::HashVector< const agxCollide::Geometry *, WaterFlowGeneratorRef > WaterFlowGeneratorContainer
Definition: WindAndWaterController.h:876
agxWire::Node
Class defining a node that is part of a wire.
Definition: agxWire/Node.h:511
WindAndWaterParameters.h
agxModel::WindAndWaterController::HydrodynamicsParametersWireContainer
agx::HashVector< const agxWire::Wire *, HydrodynamicsParametersRef > HydrodynamicsParametersWireContainer
Definition: WindAndWaterController.h:871
agxModel::WindAndWaterController::m_windGenerator
WindGeneratorRef m_windGenerator
Definition: WindAndWaterController.h:959
agxModel::TriangleData
Triangle data for a normal or a clipped triangle.
Definition: WindAndWaterUtils.h:54
agx::HashVector< const agxCollide::Shape *, AerodynamicsParametersRef >
agxModel::WindAndWaterController::DynamicsLinkedStructureData::DynamicsLinkedStructureData
DynamicsLinkedStructureData()
Definition: WindAndWaterController.h:499
AGX_FORCE_INLINE
#define AGX_FORCE_INLINE
Definition: macros.h:58
agxModel::WindAndWaterController::m_globalHydrodynamicsParameters
HydrodynamicsParametersRef m_globalHydrodynamicsParameters
Definition: WindAndWaterController.h:953
agxModel::WindAndWaterController::ObjectData
agxModel::WindAndWaterController::ObjectData ObjectData
Definition: WindAndWaterController.h:976
agxModel::WindAndWaterController::AerodynamicsData::~AerodynamicsData
virtual ~AerodynamicsData()
Definition: WindAndWaterController.h:744
agxModel::WindAndWaterController::m_aerodynamicsParametersWires
AerodynamicsParametersWireContainer m_aerodynamicsParametersWires
Definition: WindAndWaterController.h:951
agxModel::WindAndWaterController::m_trianglePool
GlobalTriangleData::Container m_trianglePool
Definition: WindAndWaterController.h:964
agxModel::WindAndWaterController::Segment::Segment
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)
Definition: WindAndWaterController.h:387