34# pragma warning(disable: 4251)
39 class MaterialManager;
47 class GeometryContact;
88 Real getDensity()
const;
98 Real getYoungsModulus()
const;
104 Real getDamping()
const;
156 Real getViscosity()
const;
161 bool isDirty()
const;
169 Physics::BulkMaterialPtr& getEntity();
172 const Physics::BulkMaterialPtr& getEntity() const;
211 Real getRoughness()
const;
227 Real getAdhesion()
const;
232 Real getAdhesiveOverlap()
const;
244 Real getViscosity()
const;
250 bool getFrictionEnabled()
const;
272 Physics::SurfaceMaterialPtr& getEntity();
274 const Physics::SurfaceMaterialPtr& getEntity() const;
279 void setDirty(
bool flag ) const;
304 Real getYoungsModulusStretch()
const;
309 Real getDampingStretch()
const;
314 Real getYoungsModulusBend()
const;
319 Real getDampingBend()
const;
325 void setYoungsModulusStretch(
Real youngsStretch );
331 void setDampingStretch(
Real dampingStretch );
337 void setYoungsModulusBend(
Real youngsBend );
343 void setDampingBend(
Real dampingBend );
350 bool isDirty() const;
351 void setDirty(
bool flag) const;
356 Physics::WireMaterialPtr& getEntity();
358 const Physics::WireMaterialPtr& getEntity() const;
439 m_entity.name() = name;
450 bool isDirty() const;
458 bool loadLibraryMaterial(
agx::
String name );
471 bool isLibraryMaterial() const;
476 Physics::MaterialPtr& getEntity();
478 const Physics::MaterialPtr& getEntity() const;
496 void setDirty(
bool flag ) const;
499 void init(const
Name& name);
522 BOTH_PRIMARY_AND_SECONDARY
603 Real getAdhesion()
const;
608 Real getAdhesiveOverlap()
const;
613 Real getRestitution()
const;
638 bool getSurfaceFrictionEnabled()
const;
649 Real getYoungsModulus()
const ;
693 Real getDamping()
const ;
708 const Material* getMaterial1()
const;
713 const Material* getMaterial2()
const;
718 bool isExplicit()
const;
744 agx::UInt8 getContactReductionBinResolution()
const;
758 bool getUseContactAreaApproach()
const;
779 agx::Real getRollingResistanceCoefficient()
const;
805 agx::Real getRollingResistanceCompliance()
const;
810 agx::Real getTwistingResistanceCompliance()
const;
858 void transfer(
agxData::EntityStorage* storage );
863 Physics::ContactMaterialPtr& getEntity();
865 const Physics::ContactMaterialPtr& getEntity() const;
872 enum class RestitutionCoefficient
891 void setDefaultParameters();
896 void setIsExplicit(
bool is_explicit );
914 return m_entity.frictionEnabled();
919 return m_entity.roughness();
924 return m_entity.adhesion();
929 return m_entity.adhesiveOverlap();
934 return m_entity.viscosity();
940 return m_entity.dirty();
945 m_entity.dirty() = flag;
952 return m_entity.dirty();
957 m_entity.dirty() = flag;
963 return m_entity.youngsModulusStretch();
968 return m_entity.dampingStretch();
973 return m_entity.youngsModulusBend();
978 return m_entity.dampingBend();
984 m_entity.youngsModulusStretch() = youngsStretch;
990 m_entity.dampingStretch() = dampingStretch;
996 m_entity.youngsModulusBend() = youngsBend;
1002 m_entity.dampingBend() = dampingBend;
1008 return m_entity.viscosity();
1013 return m_entity.damping();
1018 return m_entity.youngsModulus();
1023 return m_entity.density();
1028 return m_entity.dirty();
1034 m_entity.dirty() = flag;
1041 return m_surfaceMaterial;
1046 return m_surfaceMaterial;
1051 return m_bulkMaterial;
1056 return m_bulkMaterial;
1061 return m_wireMaterial;
1066 return m_wireMaterial;
1072 return m_surfaceMaterial->
isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1077 m_surfaceMaterial->setDirty(flag);
1078 m_bulkMaterial->setDirty(flag);
1079 m_wireMaterial->setDirty(flag);
1086 return m_entity.name();
1092 return m_entity.restitution()[ (int)RestitutionCoefficient::NORMAL ];
1097 return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1102 return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1107 return m_entity.adhesion();
1112 return m_entity.adhesiveOverlap();
1117 return m_entity.surfaceFrictionEnabled();
1122 return m_entity.youngsModulus();
1127 return m_entity.damping();
1132 return m_frictionModel;
1137 return m_entity.isExplicit();
1157 return m_entity.contactReductionBinResolution();
1166 AGX_FORCE_INLINE const Physics::BulkMaterialPtr& BulkMaterial::getEntity()
const
1176 AGX_FORCE_INLINE const Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity()
const
1187 AGX_FORCE_INLINE const Physics::WireMaterialPtr& WireMaterial::getEntity()
const
1209 AGX_FORCE_INLINE const Physics::ContactMaterialPtr& ContactMaterial::getEntity()
const
1217 return m_entity.rollingResistanceCoefficient();
1222 return m_entity.rollingResistanceCompliance();
1227 return m_entity.twistingResistanceCompliance();
1232 return m_entity.impactCompliance();
1237 return m_entity.useContactAreaApproach();
1242 return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1247# 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.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
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.
agx::Vector< agx::ref_ptr< agx::ContactMaterial > > ContactMaterialRefVector
agx::SetVector< agx::ref_ptr< agx::ContactMaterial > > ContactMaterialRefSetVector