Momentum Scripting v1
Loading...
Searching...
No Matches
MaterialPair.h
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 without having a written signed agreement with Algoryx Simulation AB.
9
10Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
11from using this software, unless otherwise stated in written agreements with
12Algoryx Simulation AB.
13*/
14
15#ifndef MOMENTUM_CONTACTMATERIAL_H
16#define MOMENTUM_CONTACTMATERIAL_H
17
18#include "momentum_export.h"
19#include "momentum_namespace.h"
20
21#include "macros.h"
22
23#include "Material.h"
24
25#ifndef SWIG
27namespace agx
28{
29 class ContactMaterial;
30}
32#endif
33
34namespace MOMENTUM_NAMESPACE
35{
39 class MOMENTUM_EXPORT MaterialPair
40 {
41 public:
42#ifndef SWIG
44
47 MaterialPair(agx::ContactMaterial* material);
48
54#endif
55
60 double getRestitution() const;
61
62#ifndef AGX_MOMENTUM_ANALYSIS_API
69 void setRestitution(double restitution);
70#endif
71
76 double getFriction() const;
77
78#ifndef AGX_MOMENTUM_ANALYSIS_API
85 void setFriction(double friction);
86#endif
87
92 double getYoungsModulus() const;
93
94#ifndef AGX_MOMENTUM_ANALYSIS_API
101 void setYoungsModulus(double youngsModulus);
102#endif
103//
104// /**
105// Get the elastic rest length of the material, how deep into the material contacts
106// reacts in meters.
107// \returns the current elastic rest length of the material
108// */
109// double getElasticRestLength() const;
110//
111// #ifndef AGX_MOMENTUM_ANALYSIS_API
112// /**
113// Set the elastic rest length of the material, how deep into the material contacts
114// reacts in meters.
115// \param length the new elastic rest length of the material
116//
117// Only available in simulation mode
118// */
119// void setElasticRestLength(double length);
120// #endif
121
128 double getRollingResistance() const;
129
130#ifndef AGX_MOMENTUM_ANALYSIS_API
138 void setRollingResistance(double rollingResistance);
139#endif
140
147 double getTwistingResistance() const;
148
149#ifndef AGX_MOMENTUM_ANALYSIS_API
157 void setTwistingResistance(double twistingResistance);
158#endif
159
166 double getAdhesion() const;
167
168#ifndef AGX_MOMENTUM_ANALYSIS_API
176 void setAdhesion(double adhesion);
177#endif
178
185 double getAdhesiveOverlap() const;
186
187#ifndef AGX_MOMENTUM_ANALYSIS_API
195 void setAdhesiveOverlap(double adhesiveOverlap);
196#endif
197
205 double getDamping() const;
206
207#ifndef AGX_MOMENTUM_ANALYSIS_API
216 void setDamping(double damping);
217#endif
218
224 std::shared_ptr<Material> getMaterial(int position) const;
225
230 std::shared_ptr<Material> getMaterial1() const;
231
236 std::shared_ptr<Material> getMaterial2() const;
237
239 std::string __str__() const;
241
242 bool operator==(const MaterialPair& other) const;
243 private:
244#ifndef SWIG
246 agx::ContactMaterial* m_material;
248
249#endif
250 };
251
252 V1_DECLARE_CONTAINER_TYPE(MaterialPair);
253
254} // namespace momentum
255
256#endif
A MaterialPair defines the contact behavior between two geometries with specified materials.
Definition: MaterialPair.h:40
void setRestitution(double restitution)
Set the coefficient of restitution of the material.
double getTwistingResistance() const
Get the twisting resistance coefficient of the material.
std::shared_ptr< Material > getMaterial2() const
Get the second material which defines this contact material.
double getDamping() const
Get the damping factor of the material, in seconds.
double getAdhesion() const
Get the adhesion force of the material, in Newton.
std::shared_ptr< Material > getMaterial(int position) const
Get one of the materials which the contact material describes contacts between.
void setFriction(double friction)
Set the coefficient of friction of the material.
void setTwistingResistance(double twistingResistance)
Set the twisting resistance coefficient of the material.
void setAdhesion(double adhesion)
Set the adhesion force of the material, in Newton.
double getRestitution() const
Get the coefficient of restitution of the material.
void setRollingResistance(double rollingResistance)
Set the rolling resistance coefficient of the material.
bool operator==(const MaterialPair &other) const
std::shared_ptr< Material > getMaterial1() const
Get the first material which defines this contact material.
double getYoungsModulus() const
Get the Young's modulus, a measure of the stiffness, of the material, in Pascal.
double getRollingResistance() const
Get the rolling resistance coefficient of the material.
void setDamping(double damping)
Set the damping factor of the material, in seconds.
void setAdhesiveOverlap(double adhesiveOverlap)
Set the adhesive overlap of the material, in meters.
double getAdhesiveOverlap() const
Get the adhesive overlap of the material, in meters.
void setYoungsModulus(double youngsModulus)
Set the Young's modulus, a measure of the stiffness, of the material, in Pascal.
double getFriction() const
Get the coefficient of friction of the material.
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29