AGX Dynamics 2.41.0.0
Loading...
Searching...
No Matches
Material.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19
21
27#include <agx/macros.h>
28#include <agx/SetVector.h>
29
31
32#ifdef _MSC_VER
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
35#endif
36
37namespace agxSDK
38{
39 class MaterialManager;
40}
41namespace agxIO
42{
43 class SceneExporter;
44}
45namespace agxCollide
46{
47 class GeometryContact;
48}
49namespace agxData
50{
51 class EntityStorage;
52}
53
54namespace agx
55{
56 class FrictionModel;
57
63
66
71 {
72 public:
73
76
84 void setDensity(Real density);
85
90 Real getDensity() const;
91
96
100 Real getYoungsModulus() const;
101
106 Real getDamping() const;
107
113 void setDamping( Real damping );
114
128 bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength);
129
137
145
147 void copy( const BulkMaterial* source );
148
153 void setViscosity( Real viscosity );
154
158 Real getViscosity() const;
159
163 bool isDirty() const;
164
166
167
169
171 Physics::BulkMaterialPtr& getEntity();
172
174 const Physics::BulkMaterialPtr& getEntity() const;
175
176 protected:
177
178 friend class Material;
179
180 AGX_FORCE_INLINE void setDirty( bool flag ) const;
182
184 virtual ~BulkMaterial();
185
186
187
188 private:
189 mutable Physics::BulkMaterialRef m_entity;
190 };
191
192
196 class AGXPHYSICS_EXPORT SurfaceMaterial : public Referenced, public virtual agxStream::Serializable
197 {
198 public:
199
202
207 void setRoughness( Real roughness );
208
213 Real getRoughness() const;
214
224 void setAdhesion( Real adhesion, Real adhesiveOverlap );
225
229 Real getAdhesion() const;
230
234 Real getAdhesiveOverlap() const;
235
241 void setViscosity( Real viscosity );
242
246 Real getViscosity() const;
247
252 bool getFrictionEnabled() const;
253
259 void setFrictionEnabled( bool flag );
260
262 bool isDirty() const;
263
265
267
268
272 void copy( const SurfaceMaterial* source );
273
274 Physics::SurfaceMaterialPtr& getEntity();
275
276 const Physics::SurfaceMaterialPtr& getEntity() const;
277
278 protected:
279
280 friend class Material;
281 void setDirty( bool flag ) const;
282
284
286 virtual ~SurfaceMaterial();
287
288 private:
289 mutable Physics::SurfaceMaterialRef m_entity;
290 };
291
292
296 class AGXPHYSICS_EXPORT WireMaterial : public Referenced, public virtual agxStream::Serializable
297 {
298 public:
299
302
306 Real getYoungsModulusStretch() const;
307
311 Real getDampingStretch() const;
312
316 Real getYoungsModulusBend() const;
317
321 Real getDampingBend() const;
322
327 void setYoungsModulusStretch( Real youngsStretch );
328
333 void setDampingStretch( Real dampingStretch );
334
339 void setYoungsModulusBend( Real youngsBend );
340
345 void setDampingBend( Real dampingBend );
346
348
349
351
352 bool isDirty() const;
353 void setDirty(bool flag) const;
354
356 void copy( const WireMaterial* source );
357
358 Physics::WireMaterialPtr& getEntity();
359
360 const Physics::WireMaterialPtr& getEntity() const;
361
362 protected:
363
364 friend class Material;
366
368 virtual ~WireMaterial();
369
370 private:
371 mutable Physics::WireMaterialRef m_entity;
372 };
373
374
375
377 class AGXPHYSICS_EXPORT Material : public Referenced, public virtual agxStream::Serializable
378 {
379 public:
380
386 Material( const agx::Name& name, const Material* parent = nullptr );
387
395 Material( const agx::Name& name, Real restitution, Real friction );
396
400 Material( const Material& material );
401
405 SurfaceMaterial* getSurfaceMaterial();
406
410 const SurfaceMaterial* getSurfaceMaterial() const;
411
415 BulkMaterial* getBulkMaterial();
416
420 const BulkMaterial* getBulkMaterial() const;
421
425 WireMaterial* getWireMaterial();
426
430 const WireMaterial* getWireMaterial() const;
431
435 const agx::Name& getName() const;
436
440 void setName( const agx::Name& name ) {
441 m_entity.name() = name;
442 }
443
446
448
449
452 bool isDirty() const;
453
454
460 bool loadLibraryMaterial( agx::String name );
461
462
466 static agx::StringVector getAvailableLibraryMaterials();
467
468
473 bool isLibraryMaterial() const;
474
476
477
478 Physics::MaterialPtr& getEntity();
479
480 const Physics::MaterialPtr& getEntity() const;
481
483 void copy(const Material* other);
484
486
487
488 protected:
489
492
494 virtual ~Material();
495
496 private:
497 friend class agxSDK::MaterialManager;
498 void setDirty( bool flag ) const;
499
501 void init(const Name& name);
502
503 private:
504 BulkMaterialRef m_bulkMaterial;
505 SurfaceMaterialRef m_surfaceMaterial;
506 WireMaterialRef m_wireMaterial;
507
508 mutable Physics::MaterialRef m_entity;
509 };
510
511
517 class AGXPHYSICS_EXPORT ContactMaterial : public Referenced, public virtual agxStream::Serializable
518 {
519 public:
524 BOTH_PRIMARY_AND_SECONDARY
525 };
526
531 REDUCE_ALL
532 };
533
534 public:
535
542 ContactMaterial( const Material* m1, const Material* m2, bool implicit=false );
543
549 ContactMaterial( const ContactMaterial* other, bool implicit );
550
556 void setRestitution( Real restitution );
557
565 void setTangentialRestitution( Real restitution, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
566
573 void setTangentialCohesion( Real cohesion, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
574
581 void setFrictionCoefficient( Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
582
589 void setSurfaceViscosity( Real viscosity, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
590
600 void setAdhesion( Real adhesion, Real adhesiveOverlap );
601
605 Real getAdhesion() const;
606
610 Real getAdhesiveOverlap() const;
611
615 Real getRestitution() const;
616
620 Real getTangentialRestitution( FrictionDirection direction = PRIMARY_DIRECTION ) const;
621
625 Real getFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION ) const;
626
630 Real getTangentialCohesion( FrictionDirection direction = PRIMARY_DIRECTION ) const;
631
635 Real getSurfaceViscosity( FrictionDirection direction = PRIMARY_DIRECTION ) const;
636
640 bool getSurfaceFrictionEnabled() const;
641
645 void setEnableSurfaceFriction( bool flag );
646
648 void setYoungsModulus( Real youngsModulus );
649
651 Real getYoungsModulus() const ;
652
658 void setDamping( Real damping );
659
673 bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength);
674
682
690
695 Real getDamping() const ;
696
701
705 void setFrictionModel( FrictionModel* frictionModel );
706
710 const Material* getMaterial1() const;
711
715 const Material* getMaterial2() const;
716
720 bool isExplicit() const;
721
727
732 ContactReductionMode getContactReductionMode() const;
733
742
746 agx::UInt8 getContactReductionBinResolution() const;
747
753 void setUseContactAreaApproach( bool useContactAreaApproach );
754
760 bool getUseContactAreaApproach() const;
761
769
777
781 agx::Real getRollingResistanceCoefficient() const;
782
787
795
803
807 agx::Real getRollingResistanceCompliance() const;
808
812 agx::Real getTwistingResistanceCompliance() const;
813
819 void setImpactCompliance(agx::Real impactCompliance);
820
824 agx::Real getImpactCompliance() const;
825
834 void setWireFrictionCoefficient( Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
835
839 Real getWireFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION ) const;
840
842
843
852 agx::ContactMaterial* clone( const agx::Material* material1, const agx::Material* material2 ) const;
853
854
858 void copyInto( ContactMaterial& target ) const;
859
860 void transfer( agxData::EntityStorage* storage );
861
862
864
865 Physics::ContactMaterialPtr& getEntity();
866
867 const Physics::ContactMaterialPtr& getEntity() const;
868
874 enum class RestitutionCoefficient
875 {
876 NORMAL,
877 TANGENTIAL_PRIMARY,
878 TANGENTIAL_SECONDARY
879 };
880
882
883 protected:
885 virtual ~ContactMaterial();
886
887 private:
888
890
891 ContactMaterial& operator = ( const ContactMaterial& );
892
893 void setDefaultParameters();
894
895 friend class agxSDK::MaterialManager;
896 friend class agxCollide::GeometryContact;
897 friend class agxIO::SceneExporter;
898 void setIsExplicit( bool is_explicit );
899
900
901 private:
902 ref_ptr<const Material> m_material1;
903 ref_ptr<const Material> m_material2;
904 ref_ptr<Referenced> m_frictionModel;
905
906 mutable Physics::ContactMaterialRef m_entity;
907 };
908
909
910 /* Implementation */
911
912
913 // SurfaceMaterial AGX_FORCE_INLINE implementation
914 AGX_FORCE_INLINE bool SurfaceMaterial::getFrictionEnabled() const
915 {
916 return m_entity.frictionEnabled();
917 }
918
919 AGX_FORCE_INLINE Real SurfaceMaterial::getRoughness() const
920 {
921 return m_entity.roughness();
922 }
923
924 AGX_FORCE_INLINE Real SurfaceMaterial::getAdhesion() const
925 {
926 return m_entity.adhesion();
927 }
928
929 AGX_FORCE_INLINE Real SurfaceMaterial::getAdhesiveOverlap() const
930 {
931 return m_entity.adhesiveOverlap();
932 }
933
934 AGX_FORCE_INLINE Real SurfaceMaterial::getViscosity() const
935 {
936 return m_entity.viscosity();
937 }
938
940 AGX_FORCE_INLINE bool SurfaceMaterial::isDirty() const
941 {
942 return m_entity.dirty();
943 }
944
945 AGX_FORCE_INLINE void SurfaceMaterial::setDirty( bool flag ) const
946 {
947 m_entity.dirty() = flag;
948 }
950
952 AGX_FORCE_INLINE bool WireMaterial::isDirty() const
953 {
954 return m_entity.dirty();
955 }
956
957 AGX_FORCE_INLINE void WireMaterial::setDirty( bool flag ) const
958 {
959 m_entity.dirty() = flag;
960 }
962
963 AGX_FORCE_INLINE Real WireMaterial::getYoungsModulusStretch() const
964 {
965 return m_entity.youngsModulusStretch();
966 }
967
968 AGX_FORCE_INLINE Real WireMaterial::getDampingStretch() const
969 {
970 return m_entity.dampingStretch();
971 }
972
973 AGX_FORCE_INLINE Real WireMaterial::getYoungsModulusBend() const
974 {
975 return m_entity.youngsModulusBend();
976 }
977
978 AGX_FORCE_INLINE Real WireMaterial::getDampingBend() const
979 {
980 return m_entity.dampingBend();
981 }
982
983 AGX_FORCE_INLINE void WireMaterial::setYoungsModulusStretch( Real youngsStretch )
984 {
985 setDirty( true );
986 m_entity.youngsModulusStretch() = youngsStretch;
987 }
988
989 AGX_FORCE_INLINE void WireMaterial::setDampingStretch( Real dampingStretch )
990 {
991 setDirty( true );
992 m_entity.dampingStretch() = dampingStretch;
993 }
994
995 AGX_FORCE_INLINE void WireMaterial::setYoungsModulusBend( Real youngsBend )
996 {
997 setDirty( true );
998 m_entity.youngsModulusBend() = youngsBend;
999 }
1000
1001 AGX_FORCE_INLINE void WireMaterial::setDampingBend( Real dampingBend )
1002 {
1003 setDirty( true );
1004 m_entity.dampingBend() = dampingBend;
1005 }
1006
1007 // BulkMaterial AGX_FORCE_INLINE implementation
1008 AGX_FORCE_INLINE Real BulkMaterial::getViscosity() const
1009 {
1010 return m_entity.viscosity();
1011 }
1012
1013 AGX_FORCE_INLINE Real BulkMaterial::getDamping() const
1014 {
1015 return m_entity.damping();
1016 }
1017
1018 AGX_FORCE_INLINE Real BulkMaterial::getYoungsModulus() const
1019 {
1020 return m_entity.youngsModulus();
1021 }
1022
1023 AGX_FORCE_INLINE Real BulkMaterial::getDensity() const
1024 {
1025 return m_entity.density();
1026 }
1027
1028 AGX_FORCE_INLINE bool BulkMaterial::isDirty() const
1029 {
1030 return m_entity.dirty();
1031 }
1032
1034 AGX_FORCE_INLINE void BulkMaterial::setDirty( bool flag ) const
1035 {
1036 m_entity.dirty() = flag;
1037 }
1039
1040 // Material AGX_FORCE_INLINE implementation
1042 {
1043 return m_surfaceMaterial;
1044 }
1045
1046 AGX_FORCE_INLINE const SurfaceMaterial* Material::getSurfaceMaterial() const
1047 {
1048 return m_surfaceMaterial;
1049 }
1050
1051 AGX_FORCE_INLINE BulkMaterial* Material::getBulkMaterial()
1052 {
1053 return m_bulkMaterial;
1054 }
1055
1056 AGX_FORCE_INLINE const BulkMaterial* Material::getBulkMaterial() const
1057 {
1058 return m_bulkMaterial;
1059 }
1060
1061 AGX_FORCE_INLINE WireMaterial* Material::getWireMaterial()
1062 {
1063 return m_wireMaterial;
1064 }
1065
1066 AGX_FORCE_INLINE const WireMaterial* Material::getWireMaterial() const
1067 {
1068 return m_wireMaterial;
1069 }
1070
1072 AGX_FORCE_INLINE bool Material::isDirty() const
1073 {
1074 return m_surfaceMaterial->isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1075 }
1076
1077 AGX_FORCE_INLINE void Material::setDirty( bool flag ) const
1078 {
1079 m_surfaceMaterial->setDirty(flag);
1080 m_bulkMaterial->setDirty(flag);
1081 m_wireMaterial->setDirty(flag);
1082 }
1084
1085
1086 AGX_FORCE_INLINE const agx::Name& Material::getName() const
1087 {
1088 return m_entity.name();
1089 }
1090
1091 // ContactMaterial AGX_FORCE_INLINE implementation
1092 AGX_FORCE_INLINE Real ContactMaterial::getRestitution() const
1093 {
1094 return m_entity.restitution()[ (int)RestitutionCoefficient::NORMAL ];
1095 }
1096
1097 AGX_FORCE_INLINE Real ContactMaterial::getFrictionCoefficient(FrictionDirection direction) const
1098 {
1099 return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1100 }
1101
1102 AGX_FORCE_INLINE Real ContactMaterial::getSurfaceViscosity( FrictionDirection direction /* = PRIMARY_DIRECTION */ ) const
1103 {
1104 return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1105 }
1106
1107 AGX_FORCE_INLINE Real ContactMaterial::getAdhesion() const
1108 {
1109 return m_entity.adhesion();
1110 }
1111
1112 AGX_FORCE_INLINE Real ContactMaterial::getAdhesiveOverlap() const
1113 {
1114 return m_entity.adhesiveOverlap();
1115 }
1116
1117 AGX_FORCE_INLINE bool ContactMaterial::getSurfaceFrictionEnabled() const
1118 {
1119 return m_entity.surfaceFrictionEnabled();
1120 }
1121
1122 AGX_FORCE_INLINE Real ContactMaterial::getYoungsModulus() const
1123 {
1124 return m_entity.youngsModulus();
1125 }
1126
1127 AGX_FORCE_INLINE Real ContactMaterial::getDamping() const
1128 {
1129 return m_entity.damping();
1130 }
1131
1132 AGX_FORCE_INLINE bool ContactMaterial::isExplicit() const
1133 {
1134 return m_entity.isExplicit();
1135 }
1136
1137 AGX_FORCE_INLINE const Material* ContactMaterial::getMaterial1() const
1138 {
1139 return m_material1;
1140 }
1141
1142 AGX_FORCE_INLINE const Material* ContactMaterial::getMaterial2() const
1143 {
1144 return m_material2;
1145 }
1146
1147 AGX_FORCE_INLINE ContactMaterial::ContactReductionMode ContactMaterial::getContactReductionMode( ) const
1148 {
1149 return (ContactReductionMode)m_entity.contactReductionMode();
1150 }
1151
1152 AGX_FORCE_INLINE agx::UInt8 ContactMaterial::getContactReductionBinResolution() const
1153 {
1154 return m_entity.contactReductionBinResolution();
1155 }
1156
1158
1159 AGX_FORCE_INLINE Physics::BulkMaterialPtr& BulkMaterial::getEntity()
1160 {
1161 return m_entity;
1162 }
1163 AGX_FORCE_INLINE const Physics::BulkMaterialPtr& BulkMaterial::getEntity() const
1164 {
1165 return m_entity;
1166 }
1167
1168 AGX_FORCE_INLINE Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity()
1169 {
1170 return m_entity;
1171 }
1172
1173 AGX_FORCE_INLINE const Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity() const
1174 {
1175 return m_entity;
1176 }
1177
1178
1179 AGX_FORCE_INLINE Physics::WireMaterialPtr& WireMaterial::getEntity()
1180 {
1181 return m_entity;
1182 }
1183
1184 AGX_FORCE_INLINE const Physics::WireMaterialPtr& WireMaterial::getEntity() const
1185 {
1186 return m_entity;
1187 }
1188
1189
1190 AGX_FORCE_INLINE Physics::MaterialPtr& Material::getEntity()
1191 {
1192 return m_entity;
1193 }
1194
1195 AGX_FORCE_INLINE const Physics::MaterialPtr& Material::getEntity() const
1196 {
1197 return m_entity;
1198 }
1199
1200
1201 AGX_FORCE_INLINE Physics::ContactMaterialPtr& ContactMaterial::getEntity()
1202 {
1203 return m_entity;
1204 }
1205
1206 AGX_FORCE_INLINE const Physics::ContactMaterialPtr& ContactMaterial::getEntity() const
1207 {
1208 return m_entity;
1209 }
1211
1212 AGX_FORCE_INLINE agx::Real ContactMaterial::getRollingResistanceCoefficient() const
1213 {
1214 return m_entity.rollingResistanceCoefficient();
1215 }
1216
1217 AGX_FORCE_INLINE agx::Real ContactMaterial::getRollingResistanceCompliance() const
1218 {
1219 return m_entity.rollingResistanceCompliance();
1220 }
1221
1222 AGX_FORCE_INLINE agx::Real ContactMaterial::getTwistingResistanceCompliance() const
1223 {
1224 return m_entity.twistingResistanceCompliance();
1225 }
1226
1228 {
1229 return m_entity.impactCompliance();
1230 }
1231
1233 {
1234 return m_entity.useContactAreaApproach();
1235 }
1236
1237 AGX_FORCE_INLINE Real ContactMaterial::getWireFrictionCoefficient(FrictionDirection direction) const
1238 {
1239 return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1240 }
1241} // namespace agx
1242
1243#ifdef _MSC_VER
1244# pragma warning(pop)
1245#endif
1246
1247
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:208
#define AGXPHYSICS_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:45
Physical properties for the bulk of geometries made up by a Material.
Definition: Material.h:71
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.
This class store the combine material properties between two agx::Material's.
Definition: Material.h:518
Real getTangentialRestitution(FrictionDirection direction=PRIMARY_DIRECTION) const
void setYoungsModulus(Real youngsModulus)
Set the YoungsModulus of the material, same as spring coefficient k.
FrictionDirection
Specifies the direction of friction.
Definition: Material.h:521
void setTwistingResistanceCoefficient(agx::Real twistingCoefficient)
Sets the twisting resistance coefficient of the contact material.
void setAdhesion(Real adhesion, Real adhesiveOverlap)
Set the adhesive force and allowed overlap between two colliding objects.
FrictionModel * getFrictionModel() const
bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength)
Set the minimum and maximum elastic rest length of the contact material.
void setTwistingResistanceCompliance(agx::Real compliance)
Sets the twisting resistance compliance in the contact material.
bool getUseContactAreaApproach() const
Should contacts using this contact material use the new approach for computing contact area?...
Definition: Material.h:1232
agx::Real getTwistingResistanceCoefficient() const
void setContactReductionBinResolution(agx::UInt8 binResolution)
Specify the resolution used when evaluating contacts for reduction between geometry contacts.
void setEnableSurfaceFriction(bool flag)
Specify if surface friction should be calculated in the solver for this contact material.
void setTangentialRestitution(Real restitution, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY)
Set the tangential restitution coefficient for a given tangential direction, or both.
void setRollingResistanceCompliance(agx::Real compliance)
Sets the rolling resistance compliance in the contact material.
void setContactReductionMode(ContactReductionMode mode)
Specify if contact reduction should be enabled.
ContactMaterial(const Material *m1, const Material *m2, bool implicit=false)
Constructor which associates this ContactMaterial to the two given materials m1 and m2.
ContactReductionMode
Specifies the mode for contact reduction.
Definition: Material.h:528
@ REDUCE_GEOMETRY
Default: Reduce contacts between geometries.
Definition: Material.h:530
@ REDUCE_NONE
No contact reduction enabled.
Definition: Material.h:529
void setSurfaceViscosity(Real viscosity, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY)
Assign the surface viscosity, i.e., how wet the friction is between the colliding materials.
void setDamping(Real damping)
Set the damping of the material.
void setImpactCompliance(agx::Real impactCompliance)
Sets the compliance used for calculating impact forces.
void setFrictionCoefficient(Real friction, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY)
Set the friction coefficient.
ContactMaterial(const ContactMaterial *other, bool implicit)
Create a ContactMaterial copying attributes from other.
Real getMinElasticRestLength() const
Get the minimum elastic rest length of the contact material.
void setTangentialCohesion(Real cohesion, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY)
Set the tangential cohesion (Pa) of the contact material.
Real getMaxElasticRestLength() const
Get the maximum elastic rest length of the contact material.
Real getTangentialCohesion(FrictionDirection direction=PRIMARY_DIRECTION) const
void setFrictionModel(FrictionModel *frictionModel)
Set friction model for this contact material.
void setRestitution(Real restitution)
Set the restitution parameter.
void setUseContactAreaApproach(bool useContactAreaApproach)
Should contacts using this contact material use the new approach for computing contact area?...
void setRollingResistanceCoefficient(agx::Real rollingCoefficient)
Sets the rolling resistance coefficient of the contact material.
agx::Real getImpactCompliance() const
Definition: Material.h:1227
void setWireFrictionCoefficient(Real friction, FrictionDirection direction=BOTH_PRIMARY_AND_SECONDARY)
Set the friction coefficient used by the contact nodes in the wires.
Base class for all friction models with interface and some utility/necessary methods implemented.
Definition: FrictionModel.h:53
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:378
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.
Definition: Material.h:440
static Material * getDefaultMaterial()
Material(const Material &material)
Copy constructor.
Representation of a name string.
Definition: Name.h:33
Base class providing referencing counted objects.
Definition: Referenced.h:120
Physical properties for the surface of a Material.
Definition: Material.h:197
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.
bool isDirty() const
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.
Definition: Material.h:297
WireMaterial()
Default constructor.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
#define AGX_FORCE_INLINE
Definition: macros.h:58
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contains classes for low level data storage for AGX.
Definition: Container.h:23
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:42
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
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.
double Real
Definition: Real.h:42
uint8_t UInt8
Definition: Integer.h:30