AGX Dynamics  2.35.0.1
Material.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 
20 #include <agx/agxPhysics_export.h>
21 #include <agxStream/Serializable.h>
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 
37 namespace agxSDK
38 {
39  class MaterialManager;
40 }
41 namespace agxIO
42 {
43  class SceneExporter;
44 }
45 namespace agxCollide
46 {
47  class GeometryContact;
48 }
49 namespace agxData
50 {
51  class EntityStorage;
52 }
53 
54 namespace agx
55 {
63 
64 
69  {
70  public:
71 
74 
82  void setDensity(Real density);
83 
88  Real getDensity() const;
89 
93  void setYoungsModulus(Real value);
94 
98  Real getYoungsModulus() const;
99 
103  AGX_DEPRECATED(2.27.0.0)
104  void setPoissonsRatio(Real value);
105 
109  AGX_DEPRECATED(2.27.0.0)
110  Real getPoissonsRatio() const;
111 
116  Real getDamping() const;
117 
123  void setDamping( Real damping );
124 
138  bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength);
139 
146  Real getMinElasticRestLength() const;
147 
154  Real getMaxElasticRestLength() const;
155 
157  void copy( const BulkMaterial* source );
158 
163  void setViscosity( Real viscosity );
164 
168  Real getViscosity() const;
169 
173  bool isDirty() const;
174 
176 
177 
179 
181  Physics::BulkMaterialPtr& getEntity();
182 
184  const Physics::BulkMaterialPtr& getEntity() const;
185 
186  protected:
187 
188  friend class Material;
189 
190  AGX_FORCE_INLINE void setDirty( bool flag ) const;
192 
194  virtual ~BulkMaterial();
195 
196 
197 
198  private:
199  mutable Physics::BulkMaterialRef m_entity;
200  };
201 
202 
206  class AGXPHYSICS_EXPORT SurfaceMaterial : public Referenced, public virtual agxStream::Serializable
207  {
208  public:
209 
212 
217  void setRoughness( Real roughness );
218 
223  Real getRoughness() const;
224 
234  void setAdhesion( Real adhesion, Real adhesiveOverlap );
235 
239  Real getAdhesion() const;
240 
244  Real getAdhesiveOverlap() const;
245 
251  void setViscosity( Real viscosity );
252 
256  Real getViscosity() const;
257 
262  bool getFrictionEnabled() const;
263 
269  void setFrictionEnabled( bool flag );
270 
272  bool isDirty() const;
273 
275 
277 
278 
282  void copy( const SurfaceMaterial* source );
283 
284  Physics::SurfaceMaterialPtr& getEntity();
285 
286  const Physics::SurfaceMaterialPtr& getEntity() const;
287 
288  protected:
289 
290  friend class Material;
291  void setDirty( bool flag ) const;
292 
294 
296  virtual ~SurfaceMaterial();
297 
298  private:
299  mutable Physics::SurfaceMaterialRef m_entity;
300  };
301 
302 
306  class AGXPHYSICS_EXPORT WireMaterial : public Referenced, public virtual agxStream::Serializable
307  {
308  public:
309 
312 
316  Real getYoungsModulusStretch() const;
317 
321  Real getDampingStretch() const;
322 
326  Real getYoungsModulusBend() const;
327 
331  Real getDampingBend() const;
332 
337  void setYoungsModulusStretch( Real youngsStretch );
338 
343  void setDampingStretch( Real dampingStretch );
344 
349  void setYoungsModulusBend( Real youngsBend );
350 
355  void setDampingBend( Real dampingBend );
356 
358 
359 
361 
362  bool isDirty() const;
363  void setDirty(bool flag) const;
364 
366  void copy( const WireMaterial* source );
367 
368  Physics::WireMaterialPtr& getEntity();
369 
370  const Physics::WireMaterialPtr& getEntity() const;
371 
372  protected:
373 
374  friend class Material;
376 
378  virtual ~WireMaterial();
379 
380  private:
381  mutable Physics::WireMaterialRef m_entity;
382  };
383 
384 
385 
387  class AGXPHYSICS_EXPORT Material : public Referenced, public virtual agxStream::Serializable
388  {
389  public:
390 
396  Material( const agx::Name& name, const Material* parent = nullptr );
397 
405  Material( const agx::Name& name, Real restitution, Real friction );
406 
410  Material( const Material& material );
411 
415  SurfaceMaterial* getSurfaceMaterial();
416 
420  const SurfaceMaterial* getSurfaceMaterial() const;
421 
425  BulkMaterial* getBulkMaterial();
426 
430  const BulkMaterial* getBulkMaterial() const;
431 
435  WireMaterial* getWireMaterial();
436 
440  const WireMaterial* getWireMaterial() const;
441 
445  const agx::Name& getName() const;
446 
450  void setName( const agx::Name& name ) {
451  m_entity.name() = name;
452  }
453 
456 
458 
459 
462  bool isDirty() const;
463 
464 
470  bool loadLibraryMaterial( agx::String name );
471 
472 
476  static agx::StringVector getAvailableLibraryMaterials();
477 
478 
483  bool isLibraryMaterial() const;
484 
486 
487 
488  Physics::MaterialPtr& getEntity();
489 
490  const Physics::MaterialPtr& getEntity() const;
491 
493  void copy(const Material* other);
494 
496 
497 
498  protected:
499 
502 
504  virtual ~Material();
505 
506  private:
507  friend class agxSDK::MaterialManager;
508  void setDirty( bool flag ) const;
509 
511  void init(const Name& name);
512 
513  private:
514  BulkMaterialRef m_bulkMaterial;
515  SurfaceMaterialRef m_surfaceMaterial;
516  WireMaterialRef m_wireMaterial;
517 
518  mutable Physics::MaterialRef m_entity;
519  };
520 
521 
527  class AGXPHYSICS_EXPORT ContactMaterial : public Referenced, public virtual agxStream::Serializable
528  {
529  public:
534  BOTH_PRIMARY_AND_SECONDARY
535  };
536 
541  REDUCE_ALL
542  };
543 
544  public:
545 
552  ContactMaterial( const Material* m1, const Material* m2, bool implicit=false );
553 
559  ContactMaterial( const ContactMaterial* other, bool implicit );
560 
566  void setRestitution( Real restitution );
567 
575  void setTangentialRestitution( Real restitution, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
576 
583  void setFrictionCoefficient( Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
584 
591  void setSurfaceViscosity( Real viscosity, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
592 
602  void setAdhesion( Real adhesion, Real adhesiveOverlap );
603 
607  Real getAdhesion() const;
608 
612  Real getAdhesiveOverlap() const;
613 
617  Real getRestitution() const;
618 
622  Real getTangentialRestitution( FrictionDirection direction = PRIMARY_DIRECTION ) const;
623 
627  Real getFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION ) const;
628 
632  Real getSurfaceViscosity( FrictionDirection direction = PRIMARY_DIRECTION ) const;
633 
637  bool getSurfaceFrictionEnabled() const;
638 
642  void setEnableSurfaceFriction( bool flag );
643 
645  void setYoungsModulus( Real youngsModulus );
646 
648  Real getYoungsModulus() const ;
649 
655  void setDamping( Real damping );
656 
670  bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength);
671 
679 
687 
692  Real getDamping() const ;
693 
697  FrictionModel* getFrictionModel() const;
698 
702  void setFrictionModel( FrictionModel* frictionModel );
703 
707  const Material* getMaterial1() const;
708 
712  const Material* getMaterial2() const;
713 
717  bool isExplicit() const;
718 
724 
729  ContactReductionMode getContactReductionMode( ) const;
730 
739 
743  agx::UInt8 getContactReductionBinResolution() const;
744 
750  void setUseContactAreaApproach( bool useContactAreaApproach );
751 
757  bool getUseContactAreaApproach() const;
758 
765  void setRollingResistanceCoefficient(agx::Real rollingCoefficient);
766 
773  void setTwistingResistanceCoefficient(agx::Real twistingCoefficient);
774 
778  agx::Real getRollingResistanceCoefficient() const;
779 
784 
792 
800 
804  agx::Real getRollingResistanceCompliance() const;
805 
809  agx::Real getTwistingResistanceCompliance() const;
810 
816  void setImpactCompliance(agx::Real impactCompliance);
817 
821  agx::Real getImpactCompliance() const;
822 
831  void setWireFrictionCoefficient( Real friction, FrictionDirection direction = BOTH_PRIMARY_AND_SECONDARY );
832 
836  Real getWireFrictionCoefficient( FrictionDirection direction = PRIMARY_DIRECTION ) const;
837 
839 
840 
849  agx::ContactMaterial* clone( const agx::Material* material1, const agx::Material* material2 ) const;
850 
851 
855  void copyInto( ContactMaterial& target ) const;
856 
857  void transfer( agxData::EntityStorage* storage );
858 
859 
861 
862  Physics::ContactMaterialPtr& getEntity();
863 
864  const Physics::ContactMaterialPtr& getEntity() const;
865 
871  enum class RestitutionCoefficient
872  {
873  NORMAL,
874  TANGENTIAL_PRIMARY,
875  TANGENTIAL_SECONDARY
876  };
877 
879 
880  protected:
882  virtual ~ContactMaterial();
883 
884  private:
885 
886  ContactMaterial( const ContactMaterial& m );
887 
888  ContactMaterial& operator = ( const ContactMaterial& );
889 
890  void setDefaultParameters();
891 
892  friend class agxSDK::MaterialManager;
893  friend class agxCollide::GeometryContact;
894  friend class agxIO::SceneExporter;
895  void setIsExplicit( bool is_explicit );
896 
897 
898  private:
899  ref_ptr<const Material> m_material1;
900  ref_ptr<const Material> m_material2;
901  FrictionModelRef m_frictionModel;
902 
903  mutable Physics::ContactMaterialRef m_entity;
904  };
905 
906 
907  /* Implementation */
908 
909 
910  // SurfaceMaterial AGX_FORCE_INLINE implementation
911  AGX_FORCE_INLINE bool SurfaceMaterial::getFrictionEnabled() const
912  {
913  return m_entity.frictionEnabled();
914  }
915 
917  {
918  return m_entity.roughness();
919  }
920 
922  {
923  return m_entity.adhesion();
924  }
925 
927  {
928  return m_entity.adhesiveOverlap();
929  }
930 
932  {
933  return m_entity.viscosity();
934  }
935 
937  AGX_FORCE_INLINE bool SurfaceMaterial::isDirty() const
938  {
939  return m_entity.dirty();
940  }
941 
942  AGX_FORCE_INLINE void SurfaceMaterial::setDirty( bool flag ) const
943  {
944  m_entity.dirty() = flag;
945  }
947 
949  AGX_FORCE_INLINE bool WireMaterial::isDirty() const
950  {
951  return m_entity.dirty();
952  }
953 
954  AGX_FORCE_INLINE void WireMaterial::setDirty( bool flag ) const
955  {
956  m_entity.dirty() = flag;
957  }
959 
960  AGX_FORCE_INLINE Real WireMaterial::getYoungsModulusStretch() const
961  {
962  return m_entity.youngsModulusStretch();
963  }
964 
966  {
967  return m_entity.dampingStretch();
968  }
969 
971  {
972  return m_entity.youngsModulusBend();
973  }
974 
976  {
977  return m_entity.dampingBend();
978  }
979 
981  {
982  setDirty( true );
983  m_entity.youngsModulusStretch() = youngsStretch;
984  }
985 
987  {
988  setDirty( true );
989  m_entity.dampingStretch() = dampingStretch;
990  }
991 
993  {
994  setDirty( true );
995  m_entity.youngsModulusBend() = youngsBend;
996  }
997 
999  {
1000  setDirty( true );
1001  m_entity.dampingBend() = dampingBend;
1002  }
1003 
1004  // BulkMaterial AGX_FORCE_INLINE implementation
1006  {
1007  return m_entity.viscosity();
1008  }
1009 
1011  {
1012  return m_entity.poissonsRatio();
1013  }
1014 
1016  {
1017  return m_entity.damping();
1018  }
1019 
1021  {
1022  return m_entity.youngsModulus();
1023  }
1024 
1026  {
1027  return m_entity.density();
1028  }
1029 
1031  {
1032  return m_entity.dirty();
1033  }
1034 
1036  AGX_FORCE_INLINE void BulkMaterial::setDirty( bool flag ) const
1037  {
1038  m_entity.dirty() = flag;
1039  }
1041 
1042  // Material AGX_FORCE_INLINE implementation
1044  {
1045  return m_surfaceMaterial;
1046  }
1047 
1049  {
1050  return m_surfaceMaterial;
1051  }
1052 
1054  {
1055  return m_bulkMaterial;
1056  }
1057 
1059  {
1060  return m_bulkMaterial;
1061  }
1062 
1064  {
1065  return m_wireMaterial;
1066  }
1067 
1069  {
1070  return m_wireMaterial;
1071  }
1072 
1074  AGX_FORCE_INLINE bool Material::isDirty() const
1075  {
1076  return m_surfaceMaterial->isDirty() || m_bulkMaterial->isDirty() || m_wireMaterial->isDirty();
1077  }
1078 
1079  AGX_FORCE_INLINE void Material::setDirty( bool flag ) const
1080  {
1081  m_surfaceMaterial->setDirty(flag);
1082  m_bulkMaterial->setDirty(flag);
1083  m_wireMaterial->setDirty(flag);
1084  }
1086 
1087 
1088  AGX_FORCE_INLINE const agx::Name& Material::getName() const
1089  {
1090  return m_entity.name();
1091  }
1092 
1093  // ContactMaterial AGX_FORCE_INLINE implementation
1095  {
1096  return m_entity.restitution()[ (int)RestitutionCoefficient::NORMAL ];
1097  }
1098 
1100  {
1101  return m_entity.friction()[ agx::clamp< int >( direction, 0, 1 ) ];
1102  }
1103 
1105  {
1106  return m_entity.viscosity()[ agx::clamp< int >( direction, 0, 1 ) ];
1107  }
1108 
1110  {
1111  return m_entity.adhesion();
1112  }
1113 
1115  {
1116  return m_entity.adhesiveOverlap();
1117  }
1118 
1120  {
1121  return m_entity.surfaceFrictionEnabled();
1122  }
1123 
1125  {
1126  return m_entity.youngsModulus();
1127  }
1128 
1130  {
1131  return m_entity.damping();
1132  }
1133 
1135  {
1136  return m_frictionModel;
1137  }
1138 
1140  {
1141  return m_entity.isExplicit();
1142  }
1143 
1145  {
1146  return m_material1;
1147  }
1148 
1150  {
1151  return m_material2;
1152  }
1153 
1155  {
1156  return (ContactReductionMode)m_entity.contactReductionMode();
1157  }
1158 
1160  {
1161  return m_entity.contactReductionBinResolution();
1162  }
1163 
1165 
1166  AGX_FORCE_INLINE Physics::BulkMaterialPtr& BulkMaterial::getEntity()
1167  {
1168  return m_entity;
1169  }
1170  AGX_FORCE_INLINE const Physics::BulkMaterialPtr& BulkMaterial::getEntity() const
1171  {
1172  return m_entity;
1173  }
1174 
1175  AGX_FORCE_INLINE Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity()
1176  {
1177  return m_entity;
1178  }
1179 
1180  AGX_FORCE_INLINE const Physics::SurfaceMaterialPtr& SurfaceMaterial::getEntity() const
1181  {
1182  return m_entity;
1183  }
1184 
1185 
1186  AGX_FORCE_INLINE Physics::WireMaterialPtr& WireMaterial::getEntity()
1187  {
1188  return m_entity;
1189  }
1190 
1191  AGX_FORCE_INLINE const Physics::WireMaterialPtr& WireMaterial::getEntity() const
1192  {
1193  return m_entity;
1194  }
1195 
1196 
1197  AGX_FORCE_INLINE Physics::MaterialPtr& Material::getEntity()
1198  {
1199  return m_entity;
1200  }
1201 
1202  AGX_FORCE_INLINE const Physics::MaterialPtr& Material::getEntity() const
1203  {
1204  return m_entity;
1205  }
1206 
1207 
1208  AGX_FORCE_INLINE Physics::ContactMaterialPtr& ContactMaterial::getEntity()
1209  {
1210  return m_entity;
1211  }
1212 
1213  AGX_FORCE_INLINE const Physics::ContactMaterialPtr& ContactMaterial::getEntity() const
1214  {
1215  return m_entity;
1216  }
1218 
1219  AGX_FORCE_INLINE agx::Real ContactMaterial::getRollingResistanceCoefficient() const
1220  {
1221  return m_entity.rollingResistanceCoefficient();
1222  }
1223 
1225  {
1226  return m_entity.rollingResistanceCompliance();
1227  }
1228 
1230  {
1231  return m_entity.twistingResistanceCompliance();
1232  }
1233 
1235  {
1236  return m_entity.impactCompliance();
1237  }
1238 
1240  {
1241  return m_entity.useContactAreaApproach();
1242  }
1243 
1245  {
1246  return m_entity.wireFriction()[ agx::clamp< int >( direction, 0, 1 ) ];
1247  }
1248 } // namespace agx
1249 
1250 #ifdef _MSC_VER
1251 # pragma warning(pop)
1252 #endif
1253 
1254 
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#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:207
#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:69
void setYoungsModulus(Real value)
Set the Young's modulus of the material, same as spring coefficient k.
Real getYoungsModulus() const
Definition: Material.h:1020
BulkMaterial()
Default constructor.
Real getDensity() const
Get the density of a material.
Definition: Material.h:1025
void setDensity(Real density)
Set the density of a material.
Real getDamping() const
This is the damping factor that is used by the contact constraint.
Definition: Material.h:1015
Real getPoissonsRatio() const
Definition: Material.h:1010
Real getViscosity() const
Definition: Material.h:1005
bool isDirty() const
Definition: Material.h:1030
This class store the combine material properties between two agx::Material's.
Definition: Material.h:528
Real getAdhesion() const
Definition: Material.h:1109
Real getTangentialRestitution(FrictionDirection direction=PRIMARY_DIRECTION) const
const Material * getMaterial2() const
Definition: Material.h:1149
void setYoungsModulus(Real youngsModulus)
Set the YoungsModulus of the material, same as spring coefficient k.
FrictionDirection
Specifies the direction of friction.
Definition: Material.h:531
void setTwistingResistanceCoefficient(agx::Real twistingCoefficient)
Sets the twisting resistance coefficient of the contact material.
bool isExplicit() const
Definition: Material.h:1139
Real getRestitution() const
Definition: Material.h:1094
agx::Real getRollingResistanceCompliance() const
Definition: Material.h:1224
void setAdhesion(Real adhesion, Real adhesiveOverlap)
Set the adhesive force and allowed overlap between two colliding objects.
Real getWireFrictionCoefficient(FrictionDirection direction=PRIMARY_DIRECTION) const
Definition: Material.h:1244
FrictionModel * getFrictionModel() const
Definition: Material.h:1134
bool setMinMaxElasticRestLength(Real minElasticRestLength, Real maxElasticRestLength)
Set the minimum and maximum elastic rest length of the contact material.
Real getAdhesiveOverlap() const
Definition: Material.h:1114
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:1239
agx::Real getTwistingResistanceCoefficient() const
void setContactReductionBinResolution(agx::UInt8 binResolution)
Specify the resolution used when evaluating contacts for reduction between geometry contacts.
Real getYoungsModulus() const
Definition: Material.h:1124
Real getDamping() const
The value is the time the contact constraint has to fulfill its violation.
Definition: Material.h:1129
void setEnableSurfaceFriction(bool flag)
Specify if surface friction should be calculated in the solver for this contact material.
const Material * getMaterial1() const
Definition: Material.h:1144
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.
agx::Real getTwistingResistanceCompliance() const
Definition: Material.h:1229
ContactReductionMode
Specifies the mode for contact reduction.
Definition: Material.h:538
@ REDUCE_GEOMETRY
Default: Reduce contacts between geometries.
Definition: Material.h:540
@ REDUCE_NONE
No contact reduction enabled.
Definition: Material.h:539
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.
ContactReductionMode getContactReductionMode() const
Returns whether contact reduction is enabled for this surface material.
Definition: Material.h:1154
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.
bool getSurfaceFrictionEnabled() const
Definition: Material.h:1119
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.
Real getFrictionCoefficient(FrictionDirection direction=PRIMARY_DIRECTION) const
Definition: Material.h:1099
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::UInt8 getContactReductionBinResolution() const
Definition: Material.h:1159
agx::Real getImpactCompliance() const
Definition: Material.h:1234
Real getSurfaceViscosity(FrictionDirection direction=PRIMARY_DIRECTION) const
Definition: Material.h:1104
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:51
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:388
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:450
static Material * getDefaultMaterial()
WireMaterial * getWireMaterial()
Definition: Material.h:1063
Material(const Material &material)
Copy constructor.
SurfaceMaterial * getSurfaceMaterial()
Definition: Material.h:1043
BulkMaterial * getBulkMaterial()
Definition: Material.h:1053
Representation of a name string.
Definition: Name.h:33
Base class providing referencing counted objects.
Definition: Referenced.h:114
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:207
void setViscosity(Real viscosity)
Set the viscosity parameter of this surface.
Real getAdhesiveOverlap() const
Definition: Material.h:926
Real getAdhesion() const
Definition: Material.h:921
void setAdhesion(Real adhesion, Real adhesiveOverlap)
Set the adhesive force and allowed overlap between two colliding objects.
SurfaceMaterial()
Default constructor.
Real getViscosity() const
Definition: Material.h:931
bool isDirty() const
Real getRoughness() const
Definition: Material.h:916
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:307
void setYoungsModulusBend(Real youngsBend)
Set the Young's modulus controlling the bend resistance of a wire.
Definition: Material.h:992
void setDampingStretch(Real dampingStretch)
Set the damping in wire stretch constraints.
Definition: Material.h:986
Real getDampingBend() const
Definition: Material.h:975
WireMaterial()
Default constructor.
Real getDampingStretch() const
Definition: Material.h:965
Real getYoungsModulusBend() const
Definition: Material.h:970
void setYoungsModulusStretch(Real youngsStretch)
Set the Young's modulus controlling the stretchiness of a wire.
Definition: Material.h:980
void setDampingBend(Real dampingBend)
Assign damping in wire bend constraints.
Definition: Material.h:998
#define AGX_DEPRECATED(since)
Definition: macros.h:89
#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
AGXCORE_EXPORT EntityModel * getEntity(const agx::Path &path)
Get a entity with a specified path.
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
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:38
void AGXPHYSICS_EXPORT init()
Initialize agx.
agx::SetVector< agx::ref_ptr< agx::ContactMaterial > > ContactMaterialRefSetVector
Definition: Material.h:61