Momentum Scripting v1
Loading...
Searching...
No Matches
HingeJoint.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_HINGEJOINT_H
16#define MOMENTUM_HINGEJOINT_H
17
18#include "momentum_export.h"
19#include "momentum_namespace.h"
20
21#include "Joint.h"
22#include "AngularMotor.h"
23#include "AngularRange.h"
24#include "AngularSpring.h"
25#include "FrictionController.h"
26
27#ifndef SWIG
29namespace agx
30{
31 class Hinge;
32}
34#endif
35
36namespace MOMENTUM_NAMESPACE
37{
41 class MOMENTUM_EXPORT HingeJoint : public Joint
42 {
43 public:
44#ifndef SWIG
46
49 HingeJoint(agx::Hinge* hinge);
50
54 HingeJoint();
56#endif
57
61 std::shared_ptr<AngularMotor> getMotor() const;
65 std::shared_ptr<AngularSpring> getSpring() const;
69 std::shared_ptr<AngularRange> getRange() const;
70
74 double getAngle() const;
75
80 double getCurrentSpeed() const;
81
85 std::shared_ptr<FrictionController> getFrictionController();
86
89 virtual ~HingeJoint();
90 std::string __str__() const;
92
93
94 protected:
97
98 private:
99#ifndef SWIG
101 agx::Hinge* getHinge() const;
103#endif
104 };
105
106 V1_DECLARE_CONTAINER_TYPE(HingeJoint);
107
108} // namespace momentum
109
110
111#endif
The hinge joint class, a joint where a rotational z-axis is unconstrained.
Definition: HingeJoint.h:42
std::shared_ptr< AngularMotor > getMotor() const
Get the motor of the rotational z-axis.
virtual int getAgxTranslationalDOF(Joint::DegreeOfFreedom dof) const
std::shared_ptr< FrictionController > getFrictionController()
double getAngle() const
Get the current rotation around the z-axis, in radians.
std::shared_ptr< AngularSpring > getSpring() const
Get the spring of the rotational z-axis.
virtual int getAgxRotationalDOF(Joint::DegreeOfFreedom dof) const
double getCurrentSpeed() const
Get the current rotational speed around the z-axis in radians per second.
std::shared_ptr< AngularRange > getRange() const
Get the range of the rotational z-axis.
Base class for all joints.
Definition: Joint.h:51
DegreeOfFreedom
Definition: Joint.h:54
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29