17 #ifndef AGX_MATERIAL_H 18 #define AGX_MATERIAL_H 33 # pragma warning(push) 34 # pragma warning(disable: 4251) // warning C4251: class X needs to have dll-interface to be used by clients of class Y 39 class MaterialManager;
47 class GeometryContact;
79 void setDensity(
Real density);
85 Real getDensity()
const;
90 void setYoungsModulus(
Real value);
95 Real getYoungsModulus()
const;
101 void setPoissonsRatio(
Real value);
107 Real getPoissonsRatio()
const;
113 Real getDamping()
const;
135 bool setMinMaxElasticRestLength(
Real minElasticRestLength,
Real maxElasticRestLength);
143 Real getMinElasticRestLength()
const;
151 Real getMaxElasticRestLength()
const;
160 void setViscosity(
Real viscosity );
165 Real getViscosity()
const;
170 bool isDirty()
const;
214 void setRoughness(
Real roughness );
220 Real getRoughness()
const;
231 void setAdhesion(
Real adhesion,
Real adhesiveOverlap );
236 Real getAdhesion()
const;
241 Real getAdhesiveOverlap()
const;
248 void setViscosity(
Real viscosity );
253 Real getViscosity()
const;
259 bool getFrictionEnabled()
const;
266 void setFrictionEnabled(
bool flag );
269 bool isDirty()
const;
288 void setDirty(
bool flag )
const;
313 Real getYoungsModulusStretch()
const;
318 Real getDampingStretch()
const;
323 Real getYoungsModulusBend()
const;
328 Real getDampingBend()
const;
334 void setYoungsModulusStretch(
Real youngsStretch );
340 void setDampingStretch(
Real dampingStretch );
346 void setYoungsModulusBend(
Real youngsBend );
352 void setDampingBend(
Real dampingBend );
359 bool isDirty()
const;
360 void setDirty(
bool flag)
const;
448 m_entity.name() = name;
452 static Material* getDefaultMaterial();
459 bool isDirty()
const;
484 void setDirty(
bool flag )
const;
510 BOTH_PRIMARY_AND_SECONDARY
542 void setRestitution(
Real restitution );
551 void setTangentialRestitution(
Real restitution,
FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
559 void setFrictionCoefficient(
Real friction,
FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
567 void setSurfaceViscosity(
Real viscosity,
FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
578 void setAdhesion(
Real adhesion,
Real adhesiveOverlap );
583 Real getAdhesion()
const;
588 Real getAdhesiveOverlap()
const;
593 Real getRestitution()
const;
613 bool getSurfaceFrictionEnabled()
const;
618 void setEnableSurfaceFriction(
bool flag );
621 void setYoungsModulus(
Real youngsModulus );
624 Real getYoungsModulus()
const ;
646 bool setMinMaxElasticRestLength(
Real minElasticRestLength,
Real maxElasticRestLength);
654 Real getMinElasticRestLength()
const;
662 Real getMaxElasticRestLength()
const;
668 Real getDamping()
const ;
688 const Material* getMaterial1()
const;
693 const Material* getMaterial2()
const;
698 bool isExplicit()
const;
719 void setContactReductionBinResolution(
agx::UInt8 binResolution );
724 agx::UInt8 getContactReductionBinResolution()
const;
731 void setUseContactAreaApproach(
bool useContactAreaApproach );
738 bool getUseContactAreaApproach()
const;
746 void setRollingResistanceCoefficient(
agx::Real rollingCoefficient);
754 void setTwistingResistanceCoefficient(
agx::Real twistingCoefficient);
759 agx::Real getRollingResistanceCoefficient()
const;
764 agx::Real getTwistingResistanceCoefficient()
const;
772 void setRollingResistanceCompliance(
agx::Real compliance);
780 void setTwistingResistanceCompliance(
agx::Real compliance);
785 agx::Real getRollingResistanceCompliance()
const;
790 agx::Real getTwistingResistanceCompliance()
const;
797 void setImpactCompliance(
agx::Real impactCompliance);
812 void setWireFrictionCoefficient(
Real friction,
FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
838 void transfer(
agxData::EntityStorage* storage );
843 Physics::ContactMaterialPtr&
getEntity();
845 const Physics::ContactMaterialPtr& getEntity() const;
852 enum class RestitutionCoefficient
863 virtual ~ContactMaterial();
867 ContactMaterial( const ContactMaterial& m );
869 ContactMaterial& operator = ( const ContactMaterial& );
871 void setDefaultParameters();
876 void setIsExplicit(
bool is_explicit );
894 return m_entity.frictionEnabled();
899 return m_entity.roughness();
904 return m_entity.adhesion();
909 return m_entity.adhesiveOverlap();
914 return m_entity.viscosity();
920 return m_entity.dirty();
925 m_entity.dirty() = flag;
932 return m_entity.dirty();
937 m_entity.dirty() = flag;
943 return m_entity.youngsModulusStretch();
948 return m_entity.dampingStretch();
953 return m_entity.youngsModulusBend();
958 return m_entity.dampingBend();
964 m_entity.youngsModulusStretch() = youngsStretch;
970 m_entity.dampingStretch() = dampingStretch;
976 m_entity.youngsModulusBend() = youngsBend;
982 m_entity.dampingBend() = dampingBend;
988 return m_entity.viscosity();
993 return m_entity.poissonsRatio();
998 return m_entity.damping();
1003 return m_entity.youngsModulus();
1008 return m_entity.density();
1013 return m_entity.dirty();
1019 m_entity.dirty() = flag;
1026 return m_surfaceMaterial;
1031 return m_surfaceMaterial;
1036 return m_bulkMaterial;
1041 return m_bulkMaterial;
1046 return m_wireMaterial;
1051 return m_wireMaterial;
1057 return m_surfaceMaterial->isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1062 m_surfaceMaterial->setDirty(flag);
1063 m_bulkMaterial->setDirty(flag);
1064 m_wireMaterial->setDirty(flag);
1071 return m_entity.name();
1082 return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1087 return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1092 return m_entity.adhesion();
1097 return m_entity.adhesiveOverlap();
1102 return m_entity.surfaceFrictionEnabled();
1107 return m_entity.youngsModulus();
1112 return m_entity.damping();
1117 return m_frictionModel;
1122 return m_frictionModel;
1127 return m_entity.isExplicit();
1147 return m_entity.contactReductionBinResolution();
1207 return m_entity.rollingResistanceCoefficient();
1212 return m_entity.rollingResistanceCompliance();
1217 return m_entity.twistingResistanceCompliance();
1222 return m_entity.impactCompliance();
1227 return m_entity.useContactAreaApproach();
1232 return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1237 # pragma warning(pop)
void AGXPHYSICS_EXPORT init()
Initialize agx.
Physical properties for the bulk of geometries made up by a Material.
The agxIO namespace contains classes for reading, writing and finding files.
Base class for all friction models with interface and some utility/necessary methods implemented...
agxCollide namespace consists of a set of classes for handling geometric intersection tests including...
Pointer to a entity instance of type Physics.Material.
void setName(const agx::Name &name)
Set the name of the material.
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
Physical properties for the contact between a Geometry and an agx::Wire.
Base class providing referencing counted objects.
Pointer to a entity instance of type Physics.WireMaterial.
Pointer to a entity instance of type Physics.BulkMaterial.
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
Physical properties for the surface of a Material.
Contains classes for low level data storage for AGX.
Main material class which acts as a holder of a Surface Material and a Bulk material.
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Simulation unique manager that handles logics around and parameters in contact materials given two ag...
#define AGX_DEPRECATED(since)
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Pointer to a entity instance of type Physics.SurfaceMaterial.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.