AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
WindAndWaterParameters.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXMODEL_WINDANDWATERPARAMETERS_H
18#define AGXMODEL_WINDANDWATERPARAMETERS_H
19
21
22#include <agx/Referenced.h>
23
24namespace agxModel
25{
26 class WindAndWaterController;
27
29 {
30 public:
36 {
41 DEFAULT_TESSELLATION = MEDIUM
42 };
43
50
55
56 public:
57
63 void setCoefficient( Coefficient type, agx::Real coefficient );
64
69
77 static void setHydrodynamicCoefficient( WindAndWaterController* controller, agx::RigidBody* rb, Coefficient type, agx::Real coefficient );
78
86 static void setAerodynamicCoefficient( WindAndWaterController* controller, agx::RigidBody* rb, Coefficient type, agx::Real coefficient );
87
95
99 agxModel::WindAndWaterParameters::ShapeTessellation getShapeTessellationLevel() const;
100
105
109 virtual void store( agxStream::OutputArchive& out ) const;
110
114 virtual void restore( agxStream::InputArchive& in );
115
116 protected:
119
121 virtual agx::Bool checkParameter( Coefficient type ) const = 0;
123
124 protected:
125 agx::Real m_pressureDragCoefficient;
126 agx::Real m_liftCoefficient;
127 agx::Real m_viscousDragCoefficient;
128 agx::Real m_buoyancyScaling;
129 agxModel::AddedMassStorage::Identifier m_addedMassIdentifier;
130 agxModel::AddedMassDbRef m_addedMassDb;
131 agxCollide::ShapeConstObserver m_shape;
132 ShapeTessellation m_tessellation;
133 };
134
136
138 {
139 protected:
143
145 virtual agx::Bool checkParameter( Coefficient type ) const override;
147 };
148
150
152 {
153 public:
160
165
166 protected:
170
172 virtual agx::Bool checkParameter( Coefficient type ) const override;
174 };
175
177
179 {
180 return m_tessellation;
181 }
182}
183
184#endif // AGXMODEL_WINDANDWATERPARAMETERS_H
#define AGXMODEL_EXPORT
Base class for a shape.
Definition Shape.h:54
Storage that holds data needed for added mass calculations.
AerodynamicsParameters(const agxCollide::Shape *shape, agxModel::AddedMassDbRef addedMassDb)
HydrodynamicsParameters(const agxCollide::Shape *shape, agxModel::AddedMassDbRef addedMassDb)
const agxModel::AddedMassStorage * getAddedMassStorage() const
agx::Bool initializeAddedMassStorage(const agx::String &filename)
Initializes the added mass storage given filename to store and/or restore the data for this given sha...
Controller that collects relevant data and executes algorithms (probably mostly aero- and hydrodynami...
const agxCollide::Shape * getShape() const
static void setAerodynamicCoefficient(WindAndWaterController *controller, agx::RigidBody *rb, Coefficient type, agx::Real coefficient)
Set a aerodynamic coefficient for a rigid body.
ShapeTessellation
Tessellation levels of native, non-mesh shapes, e.g, sphere, capsule and cylinder.
virtual void restore(agxStream::InputArchive &in)
Internal method.
void setCoefficient(Coefficient type, agx::Real coefficient)
Set pressure drag, viscous drag, lift or buoyancy coefficient.
WindAndWaterParameters(const agxCollide::Shape *shape, agxModel::AddedMassDbRef addedMassDb)
static agx::Real shapeTessellationLevelToResolution(agxModel::WindAndWaterParameters::ShapeTessellation tessellationLevel)
Translate from ShapeTessellation to scale of default meshing technique.
static void setHydrodynamicCoefficient(WindAndWaterController *controller, agx::RigidBody *rb, Coefficient type, agx::Real coefficient)
Set a hydrodynamic coefficient for a rigid body.
virtual void store(agxStream::OutputArchive &out) const
Internal method.
void setShapeTessellationLevel(agxModel::WindAndWaterParameters::ShapeTessellation tessellation)
Assign tessellation level for native shapes (sphere, capsule and cylinder) used during aero- and hydr...
agx::Real getCoefficient(Coefficient type) const
Class for reading a binary stream of serialized data.
Class for writing serialized data in binary format to a stream.
Base class providing referencing counted objects.
Definition Referenced.h:120
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition macros.h:96
#define AGX_FORCE_INLINE
Definition macros.h:58
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40
double Real
Definition Real.h:42