Momentum Scripting v1
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{
37 class MOMENTUM_EXPORT SecondaryJoint
38 {
39 public:
40#ifndef SWIG
42
45 SecondaryJoint(agx::BasicControllerConstraint* constraint);
46
52#endif
53
58 bool getEnabled() const;
59
60#ifndef AGX_MOMENTUM_ANALYSIS_API
67 void setEnabled(bool enabled);
68#endif
69
76 double getElasticity() const;
77
78#ifndef AGX_MOMENTUM_ANALYSIS_API
87 void setElasticity(double elasticity);
88#endif
89
96 double getDamping() const;
97
98#ifndef AGX_MOMENTUM_ANALYSIS_API
107 void setDamping(double damping);
108#endif
109
111 virtual std::string __str__() const;
113
115 bool operator==(const SecondaryJoint& other) const;
116 protected:
117 std::pair<double, double> getForceRange() const;
118 bool setForceRange(std::pair<double, double> range);
119
123 static bool checkRange(std::pair<double, double> range);
124
128 static bool checkRange(double lower, double upper);
129
131#ifndef SWIG
133 agx::BasicControllerConstraint* m_constraint;
135#endif
136 };
137} // namespace momentum
138
139
140#endif
A Base class for a joint which operates on the free DOF specifies by ordinary joints such as HingeJoi...
Definition: SecondaryJoint.h:38
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