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
595 Real getAdhesion()
const;
600 Real getAdhesiveOverlap()
const;
605 Real getRestitution()
const;
625 bool getSurfaceFrictionEnabled()
const;
636 Real getYoungsModulus()
const ;
680 Real getDamping()
const ;
695 const Material* getMaterial1()
const;
700 const Material* getMaterial2()
const;
705 bool isExplicit()
const;
731 agx::UInt8 getContactReductionBinResolution()
const;
745 bool getUseContactAreaApproach()
const;
766 agx::Real getRollingResistanceCoefficient()
const;
792 agx::Real getRollingResistanceCompliance()
const;
797 agx::Real getTwistingResistanceCompliance()
const;
845 void transfer(
agxData::EntityStorage* storage );
850 Physics::ContactMaterialPtr& getEntity();
852 const Physics::ContactMaterialPtr& getEntity() const;
859 enum class RestitutionCoefficient
878 void setDefaultParameters();
883 void setIsExplicit(
bool is_explicit );
901 return m_entity.frictionEnabled();
906 return m_entity.roughness();
911 return m_entity.adhesion();
916 return m_entity.adhesiveOverlap();
921 return m_entity.viscosity();
927 return m_entity.dirty();
932 m_entity.dirty() = flag;
939 return m_entity.dirty();
944 m_entity.dirty() = flag;
950 return m_entity.youngsModulusStretch();
955 return m_entity.dampingStretch();
960 return m_entity.youngsModulusBend();
965 return m_entity.dampingBend();
971 m_entity.youngsModulusStretch() = youngsStretch;
977 m_entity.dampingStretch() = dampingStretch;
983 m_entity.youngsModulusBend() = youngsBend;
989 m_entity.dampingBend() = dampingBend;
995 return m_entity.viscosity();
1000 return m_entity.damping();
1005 return m_entity.youngsModulus();
1010 return m_entity.density();
1015 return m_entity.dirty();
1021 m_entity.dirty() = flag;
1028 return m_surfaceMaterial;
1033 return m_surfaceMaterial;
1038 return m_bulkMaterial;
1043 return m_bulkMaterial;
1048 return m_wireMaterial;
1053 return m_wireMaterial;
1059 return m_surfaceMaterial->
isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1064 m_surfaceMaterial->setDirty(flag);
1065 m_bulkMaterial->setDirty(flag);
1066 m_wireMaterial->setDirty(flag);
1073 return m_entity.name();
1079 return m_entity.restitution()[ (int)RestitutionCoefficient::NORMAL ];
1084 return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1089 return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1094 return m_entity.adhesion();
1099 return m_entity.adhesiveOverlap();
1104 return m_entity.surfaceFrictionEnabled();
1109 return m_entity.youngsModulus();
1114 return m_entity.damping();
1119 return m_frictionModel;
1124 return m_entity.isExplicit();
1144 return m_entity.contactReductionBinResolution();
1153 AGX_FORCE_INLINE const Physics::BulkMaterialPtr& BulkMaterial::getEntity()
const
1163 AGX_FORCE_INLINE const Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity()
const
1174 AGX_FORCE_INLINE const Physics::WireMaterialPtr& WireMaterial::getEntity()
const
1196 AGX_FORCE_INLINE const Physics::ContactMaterialPtr& ContactMaterial::getEntity()
const
1204 return m_entity.rollingResistanceCoefficient();
1209 return m_entity.rollingResistanceCompliance();
1214 return m_entity.twistingResistanceCompliance();
1219 return m_entity.impactCompliance();
1224 return m_entity.useContactAreaApproach();
1229 return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1234# 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