34# pragma warning(disable: 4251)
39 class MaterialManager;
47 class GeometryContact;
90 Real getDensity()
const;
100 Real getYoungsModulus()
const;
106 Real getDamping()
const;
158 Real getViscosity()
const;
163 bool isDirty()
const;
171 Physics::BulkMaterialPtr& getEntity();
174 const Physics::BulkMaterialPtr& getEntity() const;
213 Real getRoughness()
const;
229 Real getAdhesion()
const;
234 Real getAdhesiveOverlap()
const;
246 Real getViscosity()
const;
252 bool getFrictionEnabled()
const;
274 Physics::SurfaceMaterialPtr& getEntity();
276 const Physics::SurfaceMaterialPtr& getEntity() const;
281 void setDirty(
bool flag ) const;
306 Real getYoungsModulusStretch()
const;
311 Real getDampingStretch()
const;
316 Real getYoungsModulusBend()
const;
321 Real getDampingBend()
const;
327 void setYoungsModulusStretch(
Real youngsStretch );
333 void setDampingStretch(
Real dampingStretch );
339 void setYoungsModulusBend(
Real youngsBend );
345 void setDampingBend(
Real dampingBend );
352 bool isDirty() const;
353 void setDirty(
bool flag) const;
358 Physics::WireMaterialPtr& getEntity();
360 const Physics::WireMaterialPtr& getEntity() const;
441 m_entity.name() = name;
452 bool isDirty() const;
460 bool loadLibraryMaterial(
agx::
String name );
473 bool isLibraryMaterial() const;
478 Physics::MaterialPtr& getEntity();
480 const Physics::MaterialPtr& getEntity() const;
498 void setDirty(
bool flag ) const;
501 void init(const
Name& name);
524 BOTH_PRIMARY_AND_SECONDARY
605 Real getAdhesion()
const;
610 Real getAdhesiveOverlap()
const;
615 Real getRestitution()
const;
640 bool getSurfaceFrictionEnabled()
const;
651 Real getYoungsModulus()
const ;
695 Real getDamping()
const ;
710 const Material* getMaterial1()
const;
715 const Material* getMaterial2()
const;
720 bool isExplicit()
const;
746 agx::UInt8 getContactReductionBinResolution()
const;
760 bool getUseContactAreaApproach()
const;
781 agx::Real getRollingResistanceCoefficient()
const;
807 agx::Real getRollingResistanceCompliance()
const;
812 agx::Real getTwistingResistanceCompliance()
const;
860 void transfer(
agxData::EntityStorage* storage );
865 Physics::ContactMaterialPtr& getEntity();
867 const Physics::ContactMaterialPtr& getEntity() const;
874 enum class RestitutionCoefficient
893 void setDefaultParameters();
898 void setIsExplicit(
bool is_explicit );
916 return m_entity.frictionEnabled();
921 return m_entity.roughness();
926 return m_entity.adhesion();
931 return m_entity.adhesiveOverlap();
936 return m_entity.viscosity();
942 return m_entity.dirty();
947 m_entity.dirty() = flag;
954 return m_entity.dirty();
959 m_entity.dirty() = flag;
965 return m_entity.youngsModulusStretch();
970 return m_entity.dampingStretch();
975 return m_entity.youngsModulusBend();
980 return m_entity.dampingBend();
986 m_entity.youngsModulusStretch() = youngsStretch;
992 m_entity.dampingStretch() = dampingStretch;
998 m_entity.youngsModulusBend() = youngsBend;
1004 m_entity.dampingBend() = dampingBend;
1010 return m_entity.viscosity();
1015 return m_entity.damping();
1020 return m_entity.youngsModulus();
1025 return m_entity.density();
1030 return m_entity.dirty();
1036 m_entity.dirty() = flag;
1043 return m_surfaceMaterial;
1048 return m_surfaceMaterial;
1053 return m_bulkMaterial;
1058 return m_bulkMaterial;
1063 return m_wireMaterial;
1068 return m_wireMaterial;
1074 return m_surfaceMaterial->
isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1079 m_surfaceMaterial->setDirty(flag);
1080 m_bulkMaterial->setDirty(flag);
1081 m_wireMaterial->setDirty(flag);
1088 return m_entity.name();
1094 return m_entity.restitution()[ (int)RestitutionCoefficient::NORMAL ];
1099 return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1104 return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1109 return m_entity.adhesion();
1114 return m_entity.adhesiveOverlap();
1119 return m_entity.surfaceFrictionEnabled();
1124 return m_entity.youngsModulus();
1129 return m_entity.damping();
1134 return m_entity.isExplicit();
1154 return m_entity.contactReductionBinResolution();
1163 AGX_FORCE_INLINE const Physics::BulkMaterialPtr& BulkMaterial::getEntity()
const
1173 AGX_FORCE_INLINE const Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity()
const
1184 AGX_FORCE_INLINE const Physics::WireMaterialPtr& WireMaterial::getEntity()
const
1206 AGX_FORCE_INLINE const Physics::ContactMaterialPtr& ContactMaterial::getEntity()
const
1214 return m_entity.rollingResistanceCoefficient();
1219 return m_entity.rollingResistanceCompliance();
1224 return m_entity.twistingResistanceCompliance();
1229 return m_entity.impactCompliance();
1234 return m_entity.useContactAreaApproach();
1239 return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1244# pragma warning(pop)
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Physical properties for the bulk of geometries made up by a Material.
void setYoungsModulus(Real value)
Set the Young's modulus of the material, same as spring coefficient k.
BulkMaterial()
Default constructor.
void setDamping(Real damping)
Set the damping factor used by the contact constraint.
Real getMinElasticRestLength() const
Get the minimum elastic rest length of the bulk material.
void setDensity(Real density)
Set the density of a material.
Real getMaxElasticRestLength() const
Get the maximum elastic rest length of the bulk material.
void setViscosity(Real viscosity)
Set the bulk viscosity coefficient of the material (1 - restitution coefficient).
void copy(const BulkMaterial *source)
Copy all the attributes of copy_material to this.
bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength)
Set the minimum and maximum elastic rest length of the bulk material.
Base class for all friction models with interface and some utility/necessary methods implemented.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Material(const agx::Name &name, Real restitution, Real friction)
Construct a material from friction and restitution values.
Material(const agx::Name &name, const Material *parent=nullptr)
Constructor.
void setName(const agx::Name &name)
Set the name of the material.
static Material * getDefaultMaterial()
Material(const Material &material)
Copy constructor.
Representation of a name string.
Base class providing referencing counted objects.
Physical properties for the surface of a Material.
void setViscosity(Real viscosity)
Set the viscosity parameter of this surface.
void setAdhesion(Real adhesion, Real adhesiveOverlap)
Set the adhesive force and allowed overlap between two colliding objects.
SurfaceMaterial()
Default constructor.
void setRoughness(Real roughness)
Set the roughness parameter.
void setFrictionEnabled(bool flag)
Specify if the friction should be used when solving contacts for this Material.
Physical properties for the contact between a Geometry and an agx::Wire.
WireMaterial()
Default constructor.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contains classes for low level data storage for AGX.
The agxIO namespace contains classes for reading, writing and finding files.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.