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;
82 void setDensity(
Real density);
88 Real getDensity()
const;
93 void setYoungsModulus(
Real value);
98 Real getYoungsModulus()
const;
104 Real getDamping()
const;
126 bool setMinMaxElasticRestLength(
Real minElasticRestLength,
Real maxElasticRestLength);
134 Real getMinElasticRestLength()
const;
142 Real getMaxElasticRestLength()
const;
151 void setViscosity(
Real viscosity );
156 Real getViscosity()
const;
161 bool isDirty()
const;
205 void setRoughness(
Real roughness );
211 Real getRoughness()
const;
222 void setAdhesion(
Real adhesion,
Real adhesiveOverlap );
227 Real getAdhesion()
const;
232 Real getAdhesiveOverlap()
const;
239 void setViscosity(
Real viscosity );
244 Real getViscosity()
const;
250 bool getFrictionEnabled()
const;
257 void setFrictionEnabled(
bool flag );
260 bool isDirty()
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;
439 m_entity.name() = name;
443 static Material* getDefaultMaterial();
450 bool isDirty() const;
458 bool loadLibraryMaterial(
agx::
String name );
471 bool isLibraryMaterial() const;
478 const Physics::MaterialPtr&
getEntity() const;
496 void setDirty(
bool flag ) const;
522 BOTH_PRIMARY_AND_SECONDARY
554 void setRestitution(
Real restitution );
563 void setTangentialRestitution(
Real restitution, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
571 void setFrictionCoefficient(
Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
579 void setSurfaceViscosity(
Real viscosity, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
590 void setAdhesion(
Real adhesion,
Real adhesiveOverlap );
595 Real getAdhesion()
const;
600 Real getAdhesiveOverlap()
const;
605 Real getRestitution()
const;
610 Real getTangentialRestitution( FrictionDirection direction = PRIMARY_DIRECTION )
const;
615 Real getFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION )
const;
620 Real getSurfaceViscosity( FrictionDirection direction = PRIMARY_DIRECTION )
const;
625 bool getSurfaceFrictionEnabled()
const;
630 void setEnableSurfaceFriction(
bool flag );
633 void setYoungsModulus(
Real youngsModulus );
636 Real getYoungsModulus()
const ;
658 bool setMinMaxElasticRestLength(
Real minElasticRestLength,
Real maxElasticRestLength);
666 Real getMinElasticRestLength()
const;
674 Real getMaxElasticRestLength()
const;
680 Real getDamping()
const ;
695 const Material* getMaterial1()
const;
700 const Material* getMaterial2()
const;
705 bool isExplicit()
const;
711 void setContactReductionMode( ContactReductionMode mode );
717 ContactReductionMode getContactReductionMode( )
const;
726 void setContactReductionBinResolution(
agx::UInt8 binResolution );
731 agx::UInt8 getContactReductionBinResolution()
const;
738 void setUseContactAreaApproach(
bool useContactAreaApproach );
745 bool getUseContactAreaApproach()
const;
753 void setRollingResistanceCoefficient(
agx::Real rollingCoefficient);
761 void setTwistingResistanceCoefficient(
agx::Real twistingCoefficient);
766 agx::Real getRollingResistanceCoefficient()
const;
771 agx::Real getTwistingResistanceCoefficient()
const;
779 void setRollingResistanceCompliance(
agx::Real compliance);
787 void setTwistingResistanceCompliance(
agx::Real compliance);
792 agx::Real getRollingResistanceCompliance()
const;
797 agx::Real getTwistingResistanceCompliance()
const;
804 void setImpactCompliance(
agx::Real impactCompliance);
819 void setWireFrictionCoefficient(
Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
824 Real getWireFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION )
const;
845 void transfer(
agxData::EntityStorage* storage );
850 Physics::ContactMaterialPtr&
getEntity();
852 const Physics::ContactMaterialPtr&
getEntity() const;
859 enum class RestitutionCoefficient
870 virtual ~ContactMaterial();
874 ContactMaterial( const ContactMaterial& m );
876 ContactMaterial& operator = ( const ContactMaterial& );
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();
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();
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)