AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Material.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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
22#include <agx/FrictionModel.h>
28#include <agx/macros.h>
29#include <agx/SetVector.h>
30
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{
63
64
69 {
70 public:
71
74
82 void setDensity(Real density);
83
88 Real getDensity() const;
89
94
98 Real getYoungsModulus() const;
99
104 Real getDamping() const;
105
111 void setDamping( Real damping );
112
126 bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength);
127
135
143
145 void copy( const BulkMaterial* source );
146
151 void setViscosity( Real viscosity );
152
156 Real getViscosity() const;
157
161 bool isDirty() const;
162
164
165
167
169 Physics::BulkMaterialPtr& getEntity();
170
172 const Physics::BulkMaterialPtr& getEntity() const;
173
174 protected:
175
176 friend class Material;
177
178 AGX_FORCE_INLINE void setDirty( bool flag ) const;
180
182 virtual ~BulkMaterial();
183
184
185
186 private:
187 mutable Physics::BulkMaterialRef m_entity;
188 };
189
190
194 class AGXPHYSICS_EXPORT SurfaceMaterial : public Referenced, public virtual agxStream::Serializable
195 {
196 public:
197
200
205 void setRoughness( Real roughness );
206
211 Real getRoughness() const;
212
222 void setAdhesion( Real adhesion, Real adhesiveOverlap );
223
227 Real getAdhesion() const;
228
232 Real getAdhesiveOverlap() const;
233
239 void setViscosity( Real viscosity );
240
244 Real getViscosity() const;
245
250 bool getFrictionEnabled() const;
251
257 void setFrictionEnabled( bool flag );
258
260 bool isDirty() const;
261
263
265
266
270 void copy( const SurfaceMaterial* source );
271
272 Physics::SurfaceMaterialPtr& getEntity();
273
274 const Physics::SurfaceMaterialPtr& getEntity() const;
275
276 protected:
277
278 friend class Material;
279 void setDirty( bool flag ) const;
280
282
284 virtual ~SurfaceMaterial();
285
286 private:
287 mutable Physics::SurfaceMaterialRef m_entity;
288 };
289
290
294 class AGXPHYSICS_EXPORT WireMaterial : public Referenced, public virtual agxStream::Serializable
295 {
296 public:
297
300
304 Real getYoungsModulusStretch() const;
305
309 Real getDampingStretch() const;
310
314 Real getYoungsModulusBend() const;
315
319 Real getDampingBend() const;
320
325 void setYoungsModulusStretch( Real youngsStretch );
326
331 void setDampingStretch( Real dampingStretch );
332
337 void setYoungsModulusBend( Real youngsBend );
338
343 void setDampingBend( Real dampingBend );
344
346
347
349
350 bool isDirty() const;
351 void setDirty(bool flag) const;
352
354 void copy( const WireMaterial* source );
355
356 Physics::WireMaterialPtr& getEntity();
357
358 const Physics::WireMaterialPtr& getEntity() const;
359
360 protected:
361
362 friend class Material;
364
366 virtual ~WireMaterial();
367
368 private:
369 mutable Physics::WireMaterialRef m_entity;
370 };
371
372
373
375 class AGXPHYSICS_EXPORT Material : public Referenced, public virtual agxStream::Serializable
376 {
377 public:
378
384 Material( const agx::Name& name, const Material* parent = nullptr );
385
393 Material( const agx::Name& name, Real restitution, Real friction );
394
398 Material( const Material& material );
399
403 SurfaceMaterial* getSurfaceMaterial();
404
408 const SurfaceMaterial* getSurfaceMaterial() const;
409
413 BulkMaterial* getBulkMaterial();
414
418 const BulkMaterial* getBulkMaterial() const;
419
423 WireMaterial* getWireMaterial();
424
428 const WireMaterial* getWireMaterial() const;
429
433 const agx::Name& getName() const;
434
438 void setName( const agx::Name& name ) {
439 m_entity.name() = name;
440 }
441
444
446
447
450 bool isDirty() const;
451
452
458 bool loadLibraryMaterial( agx::String name );
459
460
464 static agx::StringVector getAvailableLibraryMaterials();
465
466
471 bool isLibraryMaterial() const;
472
474
475
476 Physics::MaterialPtr& getEntity();
477
478 const Physics::MaterialPtr& getEntity() const;
479
481 void copy(const Material* other);
482
484
485
486 protected:
487
490
492 virtual ~Material();
493
494 private:
495 friend class agxSDK::MaterialManager;
496 void setDirty( bool flag ) const;
497
499 void init(const Name& name);
500
501 private:
502 BulkMaterialRef m_bulkMaterial;
503 SurfaceMaterialRef m_surfaceMaterial;
504 WireMaterialRef m_wireMaterial;
505
506 mutable Physics::MaterialRef m_entity;
507 };
508
509
515 class AGXPHYSICS_EXPORT ContactMaterial : public Referenced, public virtual agxStream::Serializable
516 {
517 public:
522 BOTH_PRIMARY_AND_SECONDARY
523 };
524
531
532 public:
533
540 ContactMaterial( const Material* m1, const Material* m2, bool implicit=false );
541
547 ContactMaterial( const ContactMaterial* other, bool implicit );
548
554 void setRestitution( Real restitution );
555
563 void setTangentialRestitution( Real restitution, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
564
571 void setFrictionCoefficient( Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
572
579 void setSurfaceViscosity( Real viscosity, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
580
590 void setAdhesion( Real adhesion, Real adhesiveOverlap );
591
595 Real getAdhesion() const;
596
600 Real getAdhesiveOverlap() const;
601
605 Real getRestitution() const;
606
610 Real getTangentialRestitution( FrictionDirection direction = PRIMARY_DIRECTION ) const;
611
615 Real getFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION ) const;
616
620 Real getSurfaceViscosity( FrictionDirection direction = PRIMARY_DIRECTION ) const;
621
625 bool getSurfaceFrictionEnabled() const;
626
630 void setEnableSurfaceFriction( bool flag );
631
633 void setYoungsModulus( Real youngsModulus );
634
636 Real getYoungsModulus() const ;
637
643 void setDamping( Real damping );
644
658 bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength);
659
667
675
680 Real getDamping() const ;
681
685 FrictionModel* getFrictionModel() const;
686
690 void setFrictionModel( FrictionModel* frictionModel );
691
695 const Material* getMaterial1() const;
696
700 const Material* getMaterial2() const;
701
705 bool isExplicit() const;
706
712
717 ContactReductionMode getContactReductionMode( ) const;
718
727
731 agx::UInt8 getContactReductionBinResolution() const;
732
738 void setUseContactAreaApproach( bool useContactAreaApproach );
739
745 bool getUseContactAreaApproach() const;
746
754
762
766 agx::Real getRollingResistanceCoefficient() const;
767
772
780
788
792 agx::Real getRollingResistanceCompliance() const;
793
797 agx::Real getTwistingResistanceCompliance() const;
798
804 void setImpactCompliance(agx::Real impactCompliance);
805
809 agx::Real getImpactCompliance() const;
810
819 void setWireFrictionCoefficient( Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
820
824 Real getWireFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION ) const;
825
827
828
837 agx::ContactMaterial* clone( const agx::Material* material1, const agx::Material* material2 ) const;
838
839
843 void copyInto( ContactMaterial& target ) const;
844
845 void transfer( agxData::EntityStorage* storage );
846
847
849
850 Physics::ContactMaterialPtr& getEntity();
851
852 const Physics::ContactMaterialPtr& getEntity() const;
853
859 enum class RestitutionCoefficient
860 {
861 NORMAL,
862 TANGENTIAL_PRIMARY,
863 TANGENTIAL_SECONDARY
864 };
865
867
868 protected:
870 virtual ~ContactMaterial();
871
872 private:
873
875
876 ContactMaterial& operator = ( const ContactMaterial& );
877
878 void setDefaultParameters();
879
880 friend class agxSDK::MaterialManager;
881 friend class agxCollide::GeometryContact;
882 friend class agxIO::SceneExporter;
883 void setIsExplicit( bool is_explicit );
884
885
886 private:
887 ref_ptr<const Material> m_material1;
888 ref_ptr<const Material> m_material2;
889 FrictionModelRef m_frictionModel;
890
891 mutable Physics::ContactMaterialRef m_entity;
892 };
893
894
895 /* Implementation */
896
897
898 // SurfaceMaterial AGX_FORCE_INLINE implementation
899 AGX_FORCE_INLINE bool SurfaceMaterial::getFrictionEnabled() const
900 {
901 return m_entity.frictionEnabled();
902 }
903
904 AGX_FORCE_INLINE Real SurfaceMaterial::getRoughness() const
905 {
906 return m_entity.roughness();
907 }
908
909 AGX_FORCE_INLINE Real SurfaceMaterial::getAdhesion() const
910 {
911 return m_entity.adhesion();
912 }
913
914 AGX_FORCE_INLINE Real SurfaceMaterial::getAdhesiveOverlap() const
915 {
916 return m_entity.adhesiveOverlap();
917 }
918
919 AGX_FORCE_INLINE Real SurfaceMaterial::getViscosity() const
920 {
921 return m_entity.viscosity();
922 }
923
925 AGX_FORCE_INLINE bool SurfaceMaterial::isDirty() const
926 {
927 return m_entity.dirty();
928 }
929
930 AGX_FORCE_INLINE void SurfaceMaterial::setDirty( bool flag ) const
931 {
932 m_entity.dirty() = flag;
933 }
935
937 AGX_FORCE_INLINE bool WireMaterial::isDirty() const
938 {
939 return m_entity.dirty();
940 }
941
942 AGX_FORCE_INLINE void WireMaterial::setDirty( bool flag ) const
943 {
944 m_entity.dirty() = flag;
945 }
947
948 AGX_FORCE_INLINE Real WireMaterial::getYoungsModulusStretch() const
949 {
950 return m_entity.youngsModulusStretch();
951 }
952
953 AGX_FORCE_INLINE Real WireMaterial::getDampingStretch() const
954 {
955 return m_entity.dampingStretch();
956 }
957
958 AGX_FORCE_INLINE Real WireMaterial::getYoungsModulusBend() const
959 {
960 return m_entity.youngsModulusBend();
961 }
962
963 AGX_FORCE_INLINE Real WireMaterial::getDampingBend() const
964 {
965 return m_entity.dampingBend();
966 }
967
968 AGX_FORCE_INLINE void WireMaterial::setYoungsModulusStretch( Real youngsStretch )
969 {
970 setDirty( true );
971 m_entity.youngsModulusStretch() = youngsStretch;
972 }
973
974 AGX_FORCE_INLINE void WireMaterial::setDampingStretch( Real dampingStretch )
975 {
976 setDirty( true );
977 m_entity.dampingStretch() = dampingStretch;
978 }
979
980 AGX_FORCE_INLINE void WireMaterial::setYoungsModulusBend( Real youngsBend )
981 {
982 setDirty( true );
983 m_entity.youngsModulusBend() = youngsBend;
984 }
985
986 AGX_FORCE_INLINE void WireMaterial::setDampingBend( Real dampingBend )
987 {
988 setDirty( true );
989 m_entity.dampingBend() = dampingBend;
990 }
991
992 // BulkMaterial AGX_FORCE_INLINE implementation
993 AGX_FORCE_INLINE Real BulkMaterial::getViscosity() const
994 {
995 return m_entity.viscosity();
996 }
997
998 AGX_FORCE_INLINE Real BulkMaterial::getDamping() const
999 {
1000 return m_entity.damping();
1001 }
1002
1003 AGX_FORCE_INLINE Real BulkMaterial::getYoungsModulus() const
1004 {
1005 return m_entity.youngsModulus();
1006 }
1007
1008 AGX_FORCE_INLINE Real BulkMaterial::getDensity() const
1009 {
1010 return m_entity.density();
1011 }
1012
1013 AGX_FORCE_INLINE bool BulkMaterial::isDirty() const
1014 {
1015 return m_entity.dirty();
1016 }
1017
1019 AGX_FORCE_INLINE void BulkMaterial::setDirty( bool flag ) const
1020 {
1021 m_entity.dirty() = flag;
1022 }
1024
1025 // Material AGX_FORCE_INLINE implementation
1027 {
1028 return m_surfaceMaterial;
1029 }
1030
1031 AGX_FORCE_INLINE const SurfaceMaterial* Material::getSurfaceMaterial() const
1032 {
1033 return m_surfaceMaterial;
1034 }
1035
1036 AGX_FORCE_INLINE BulkMaterial* Material::getBulkMaterial()
1037 {
1038 return m_bulkMaterial;
1039 }
1040
1041 AGX_FORCE_INLINE const BulkMaterial* Material::getBulkMaterial() const
1042 {
1043 return m_bulkMaterial;
1044 }
1045
1046 AGX_FORCE_INLINE WireMaterial* Material::getWireMaterial()
1047 {
1048 return m_wireMaterial;
1049 }
1050
1051 AGX_FORCE_INLINE const WireMaterial* Material::getWireMaterial() const
1052 {
1053 return m_wireMaterial;
1054 }
1055
1057 AGX_FORCE_INLINE bool Material::isDirty() const
1058 {
1059 return m_surfaceMaterial->isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1060 }
1061
1062 AGX_FORCE_INLINE void Material::setDirty( bool flag ) const
1063 {
1064 m_surfaceMaterial->setDirty(flag);
1065 m_bulkMaterial->setDirty(flag);
1066 m_wireMaterial->setDirty(flag);
1067 }
1069
1070
1071 AGX_FORCE_INLINE const agx::Name& Material::getName() const
1072 {
1073 return m_entity.name();
1074 }
1075
1076 // ContactMaterial AGX_FORCE_INLINE implementation
1077 AGX_FORCE_INLINE Real ContactMaterial::getRestitution() const
1078 {
1079 return m_entity.restitution()[ (int)RestitutionCoefficient::NORMAL ];
1080 }
1081
1082 AGX_FORCE_INLINE Real ContactMaterial::getFrictionCoefficient(FrictionDirection direction) const
1083 {
1084 return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1085 }
1086
1087 AGX_FORCE_INLINE Real ContactMaterial::getSurfaceViscosity( FrictionDirection direction /* = PRIMARY_DIRECTION */ ) const
1088 {
1089 return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1090 }
1091
1092 AGX_FORCE_INLINE Real ContactMaterial::getAdhesion() const
1093 {
1094 return m_entity.adhesion();
1095 }
1096
1097 AGX_FORCE_INLINE Real ContactMaterial::getAdhesiveOverlap() const
1098 {
1099 return m_entity.adhesiveOverlap();
1100 }
1101
1102 AGX_FORCE_INLINE bool ContactMaterial::getSurfaceFrictionEnabled() const
1103 {
1104 return m_entity.surfaceFrictionEnabled();
1105 }
1106
1107 AGX_FORCE_INLINE Real ContactMaterial::getYoungsModulus() const
1108 {
1109 return m_entity.youngsModulus();
1110 }
1111
1112 AGX_FORCE_INLINE Real ContactMaterial::getDamping() const
1113 {
1114 return m_entity.damping();
1115 }
1116
1117 AGX_FORCE_INLINE FrictionModel* ContactMaterial::getFrictionModel() const
1118 {
1119 return m_frictionModel;
1120 }
1121
1122 AGX_FORCE_INLINE bool ContactMaterial::isExplicit() const
1123 {
1124 return m_entity.isExplicit();
1125 }
1126
1127 AGX_FORCE_INLINE const Material* ContactMaterial::getMaterial1() const
1128 {
1129 return m_material1;
1130 }
1131
1132 AGX_FORCE_INLINE const Material* ContactMaterial::getMaterial2() const
1133 {
1134 return m_material2;
1135 }
1136
1137 AGX_FORCE_INLINE ContactMaterial::ContactReductionMode ContactMaterial::getContactReductionMode( ) const
1138 {
1139 return (ContactReductionMode)m_entity.contactReductionMode();
1140 }
1141
1142 AGX_FORCE_INLINE agx::UInt8 ContactMaterial::getContactReductionBinResolution() const
1143 {
1144 return m_entity.contactReductionBinResolution();
1145 }
1146
1148
1149 AGX_FORCE_INLINE Physics::BulkMaterialPtr& BulkMaterial::getEntity()
1150 {
1151 return m_entity;
1152 }
1153 AGX_FORCE_INLINE const Physics::BulkMaterialPtr& BulkMaterial::getEntity() const
1154 {
1155 return m_entity;
1156 }
1157
1158 AGX_FORCE_INLINE Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity()
1159 {
1160 return m_entity;
1161 }
1162
1163 AGX_FORCE_INLINE const Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity() const
1164 {
1165 return m_entity;
1166 }
1167
1168
1169 AGX_FORCE_INLINE Physics::WireMaterialPtr& WireMaterial::getEntity()
1170 {
1171 return m_entity;
1172 }
1173
1174 AGX_FORCE_INLINE const Physics::WireMaterialPtr& WireMaterial::getEntity() const
1175 {
1176 return m_entity;
1177 }
1178
1179
1180 AGX_FORCE_INLINE Physics::MaterialPtr& Material::getEntity()
1181 {
1182 return m_entity;
1183 }
1184
1185 AGX_FORCE_INLINE const Physics::MaterialPtr& Material::getEntity() const
1186 {
1187 return m_entity;
1188 }
1189
1190
1191 AGX_FORCE_INLINE Physics::ContactMaterialPtr& ContactMaterial::getEntity()
1192 {
1193 return m_entity;
1194 }
1195
1196 AGX_FORCE_INLINE const Physics::ContactMaterialPtr& ContactMaterial::getEntity() const
1197 {
1198 return m_entity;
1199 }
1201
1202 AGX_FORCE_INLINE agx::Real ContactMaterial::getRollingResistanceCoefficient() const
1203 {
1204 return m_entity.rollingResistanceCoefficient();
1205 }
1206
1207 AGX_FORCE_INLINE agx::Real ContactMaterial::getRollingResistanceCompliance() const
1208 {
1209 return m_entity.rollingResistanceCompliance();
1210 }
1211
1212 AGX_FORCE_INLINE agx::Real ContactMaterial::getTwistingResistanceCompliance() const
1213 {
1214 return m_entity.twistingResistanceCompliance();
1215 }
1216
1218 {
1219 return m_entity.impactCompliance();
1220 }
1221
1223 {
1224 return m_entity.useContactAreaApproach();
1225 }
1226
1227 AGX_FORCE_INLINE Real ContactMaterial::getWireFrictionCoefficient(FrictionDirection direction) const
1228 {
1229 return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1230 }
1231} // namespace agx
1232
1233#ifdef _MSC_VER
1234# pragma warning(pop)
1235#endif
1236
1237
#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...
#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.
Definition Material.h:69
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:516
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:519
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.
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:1222
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:526
@ REDUCE_GEOMETRY
Default: Reduce contacts between geometries.
Definition Material.h:528
@ REDUCE_NONE
No contact reduction enabled.
Definition Material.h:527
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.
Real getMaxElasticRestLength() const
Get the maximum elastic rest length of the contact material.
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:1217
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.
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition Material.h:376
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:438
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
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition SetVector.h:38
Physical properties for the surface of a Material.
Definition Material.h:195
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.
Templated vector class.
Definition agx/Vector.h:53
Physical properties for the contact between a Geometry and an agx::Wire.
Definition Material.h:295
WireMaterial()
Default constructor.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition macros.h:96
#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.
agx::Vector< agx::ref_ptr< agx::ContactMaterial > > ContactMaterialRefVector
Definition Material.h:62
double Real
Definition Real.h:42
uint8_t UInt8
Definition Integer.h:30
agx::SetVector< agx::ref_ptr< agx::ContactMaterial > > ContactMaterialRefSetVector
Definition Material.h:61