Momentum Scripting v1
Deprecated API version. Use Momentum.v2 for new scripts.
Loading...
Searching...
No Matches
SecondaryJoint.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_SecondaryJoint_H
16#define MOMENTUM_SecondaryJoint_H
17
18#include "momentum_export.h"
19#include "momentum_namespace.h"
20
21#include <string>
22
23#ifndef SWIG
25namespace agx
26{
27 class BasicControllerConstraint;
28}
30#endif
31
32namespace MOMENTUM_NAMESPACE
33{
38 class MOMENTUM_EXPORT SecondaryJoint
39 {
40 public:
41#ifndef SWIG
43
46 SecondaryJoint(agx::BasicControllerConstraint* constraint);
47
53#endif
54
59 bool getEnabled() const;
60
61#ifndef AGX_MOMENTUM_ANALYSIS_API
68 void setEnabled(bool enabled);
69#endif
70
77 double getElasticity() const;
78
79#ifndef AGX_MOMENTUM_ANALYSIS_API
88 void setElasticity(double elasticity);
89#endif
90
97 double getDamping() const;
98
99#ifndef AGX_MOMENTUM_ANALYSIS_API
108 void setDamping(double damping);
109#endif
110
112 virtual std::string __str__() const;
114
116 bool operator==(const SecondaryJoint& other) const;
117 protected:
118 std::pair<double, double> getForceRange() const;
119 bool setForceRange(std::pair<double, double> range);
120
124 static bool checkRange(std::pair<double, double> range);
125
129 static bool checkRange(double lower, double upper);
130
132#ifndef SWIG
134 agx::BasicControllerConstraint* m_constraint;
136#endif
137 };
138} // namespace momentum
139
140
141#endif
A Base class for a joint which operates on the free DOF specifies by ordinary joints such as HingeJoi...
Definition: SecondaryJoint.h:39
void setEnabled(bool enabled)
Set if the secondary constraint is enabled on its parent joint.
void setElasticity(double elasticity)
Set the elasticity of the secondary constraint, depending if it is linear or rotational it is in diff...
double getElasticity() const
Get the elasticity of the secondary constraint, depending if it is linear or rotational it is in diff...
void setDamping(double damping)
Set the damping of the secondary constraint, depending if it is linear or rotational it is in differe...
double getDamping() const
Get the damping of the secondary constraint, depending if it is linear or rotational it is in differe...
bool getEnabled() const
Get if the secondary constraint is enabled on its parent joint.
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29