Momentum Scripting v1
Loading...
Searching...
No Matches
CylindricalJoint.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_CYLINDRICALJOINT_H
16#define MOMENTUM_CYLINDRICALJOINT_H
17
18#include "momentum_export.h"
19#include "momentum_namespace.h"
20
21#include "Joint.h"
22
23#include "LinearMotor.h"
24#include "LinearRange.h"
25#include "LinearSpring.h"
26
27#include "AngularMotor.h"
28#include "AngularRange.h"
29#include "AngularSpring.h"
30#include "FrictionController.h"
31#include "Screw1D.h"
32
33#ifndef SWIG
35namespace agx
36{
37 class CylindricalJoint;
38}
40#endif
41
42namespace MOMENTUM_NAMESPACE
43{
47 class MOMENTUM_EXPORT CylindricalJoint : public Joint
48 {
49 public:
50#ifndef SWIG
52
55 CylindricalJoint(agx::CylindricalJoint* cylindrical);
56
62#endif
63
67 std::shared_ptr<LinearMotor> getLinearMotor() const;
68
72 std::shared_ptr<LinearSpring> getLinearSpring() const;
76 std::shared_ptr<LinearRange> getLinearRange() const;
77
81 std::shared_ptr<AngularMotor> getAngularMotor() const;
82
86 std::shared_ptr<AngularSpring> getAngularSpring() const;
87
91 std::shared_ptr<AngularRange> getAngularRange() const;
92
96 double getPosition() const;
97
102 double getCurrentLinearSpeed() const;
103
107 double getAngle() const;
108
114
122 std::shared_ptr<FrictionController> getAngularFrictionController();
123
127 std::shared_ptr<FrictionController> getLinearFrictionController();
128
133 std::shared_ptr<Screw1D> getScrew1D() const;
134
136 virtual ~CylindricalJoint();
137 std::string __str__() const;
138
140
141 protected:
144
145 private:
146#ifndef SWIG
148 agx::CylindricalJoint* getCylindrical() const;
150#endif
151 };
152
153 V1_DECLARE_CONTAINER_TYPE(CylindricalJoint);
154
155} // namespace momentum
156
157#endif
The cylindrical joint class, a joint where the translational and rotational z-axis is unconstrained.
Definition: CylindricalJoint.h:48
double getPosition() const
Get the current displacement along the z-axis, in meters.
virtual int getAgxTranslationalDOF(Joint::DegreeOfFreedom dof) const
std::shared_ptr< AngularMotor > getAngularMotor() const
Get the motor of the rotational z-axis.
std::shared_ptr< LinearMotor > getLinearMotor() const
Get the motor of the translational z-axis.
double getAngle() const
Get the current rotation around the z-axis, in radians.
virtual int getAgxRotationalDOF(Joint::DegreeOfFreedom dof) const
std::shared_ptr< FrictionController > getAngularFrictionController()
Since this friction controller is rotational the radius of the axle should be included in the frictio...
std::shared_ptr< AngularSpring > getAngularSpring() const
Get the spring of the rotational z-axis.
double getCurrentLinearSpeed() const
Get the current speed along the z-axis in meters per second.
double getCurrentAngularSpeed() const
Get the current rotational speed around the z-axis in radians per second.
std::shared_ptr< AngularRange > getAngularRange() const
Get the range of the rotational z-axis.
std::shared_ptr< LinearRange > getLinearRange() const
Get the range of the translational z-axis.
std::shared_ptr< Screw1D > getScrew1D() const
Screw controller connects rotation and translation.
std::shared_ptr< FrictionController > getLinearFrictionController()
std::shared_ptr< LinearSpring > getLinearSpring() const
Get the spring of the translational 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