Momentum Scripting v1
Deprecated API version. Use Momentum.v2 for new scripts.
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{
40 class MOMENTUM_EXPORT MaterialPair
41 {
42 public:
43#ifndef SWIG
45
48 MaterialPair(agx::ContactMaterial* material);
49
55#endif
56
61 double getRestitution() const;
62
63#ifndef AGX_MOMENTUM_ANALYSIS_API
70 void setRestitution(double restitution);
71#endif
72
77 double getFriction() const;
78
79#ifndef AGX_MOMENTUM_ANALYSIS_API
86 void setFriction(double friction);
87#endif
88
93 double getYoungsModulus() const;
94
95#ifndef AGX_MOMENTUM_ANALYSIS_API
102 void setYoungsModulus(double youngsModulus);
103#endif
104//
105// /**
106// Get the elastic rest length of the material, how deep into the material contacts
107// reacts in meters.
108// \returns the current elastic rest length of the material
109// */
110// double getElasticRestLength() const;
111//
112// #ifndef AGX_MOMENTUM_ANALYSIS_API
113// /**
114// Set the elastic rest length of the material, how deep into the material contacts
115// reacts in meters.
116// \param length the new elastic rest length of the material
117//
118// Only available in simulation mode
119// */
120// void setElasticRestLength(double length);
121// #endif
122
129 double getRollingResistance() const;
130
131#ifndef AGX_MOMENTUM_ANALYSIS_API
139 void setRollingResistance(double rollingResistance);
140#endif
141
148 double getTwistingResistance() const;
149
150#ifndef AGX_MOMENTUM_ANALYSIS_API
158 void setTwistingResistance(double twistingResistance);
159#endif
160
167 double getAdhesion() const;
168
169#ifndef AGX_MOMENTUM_ANALYSIS_API
177 void setAdhesion(double adhesion);
178#endif
179
186 double getAdhesiveOverlap() const;
187
188#ifndef AGX_MOMENTUM_ANALYSIS_API
196 void setAdhesiveOverlap(double adhesiveOverlap);
197#endif
198
211 double getDamping() const;
212
213#ifndef AGX_MOMENTUM_ANALYSIS_API
225 void setDamping(double damping);
226#endif
227
233 std::shared_ptr<Material> getMaterial(int position) const;
234
239 std::shared_ptr<Material> getMaterial1() const;
240
245 std::shared_ptr<Material> getMaterial2() const;
246
248 std::string __str__() const;
250
251 bool operator==(const MaterialPair& other) const;
252 private:
253#ifndef SWIG
255 agx::ContactMaterial* m_material;
257
258#endif
259 };
260
261 V1_DECLARE_CONTAINER_TYPE(MaterialPair);
262
263} // namespace momentum
264
265#endif
A MaterialPair defines the contact behavior between two geometries with specified materials.
Definition: MaterialPair.h:41
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