15#ifndef MOMENTUM_JOINT_H
16#define MOMENTUM_JOINT_H
18#include "momentum_export.h"
19#include "momentum_namespace.h"
23#include "AffineMatrix4x4.h"
42 class CylindricalJoint;
65 Joint(agx::Constraint* constraint);
80#ifndef AGX_MOMENTUM_ANALYSIS_API
96 std::shared_ptr<RigidBody>
getBody(
int body)
const;
105#ifndef AGX_MOMENTUM_ANALYSIS_API
140#ifndef AGX_MOMENTUM_ANALYSIS_API
158#ifndef AGX_MOMENTUM_ANALYSIS_API
176#ifndef AGX_MOMENTUM_ANALYSIS_API
194#ifndef AGX_MOMENTUM_ANALYSIS_API
230 virtual std::string __str__()
const;
250 agx::Constraint* m_constraint;
Matrix class for rigid transformations (translation, rotation).
Definition: AffineMatrix4x4.h:51
Base class for all joints.
Definition: Joint.h:51
std::shared_ptr< HingeJoint > asHingeJoint()
double getRotationalDamping(DegreeOfFreedom dof) const
Get the rotational damping along the axis of the joint, in newton-meter-seconds per radian.
void setTranslationalElasticity(DegreeOfFreedom dof, double elasticity)
Set the translational elasticity along the axis of the joint, in newton per meter.
double getTranslationalDamping(DegreeOfFreedom dof) const
Get the translational damping along the axis of the joint, in newton-seconds per meter.
void setTranslationalDamping(DegreeOfFreedom dof, double damping)
Set the translational damping along the axis of the joint, in newton-seconds per meter.
bool operator==(const Joint &other) const
virtual int getAgxRotationalDOF(DegreeOfFreedom) const
Definition: Joint.h:243
void setTransformation(int body, const AffineMatrix4x4 &transform)
Set the attachment transformation in the world frame of the specified body.
DegreeOfFreedom
Definition: Joint.h:54
@ X
Definition: Joint.h:55
@ Y
Definition: Joint.h:56
void setRotationalElasticity(DegreeOfFreedom dof, double elasticity)
Set the rotational elasticity along the axis of the joint, in newton per radian.
std::shared_ptr< BallJoint > asBallJoint()
std::shared_ptr< RigidBody > getBody(int body) const
Return the body at position 0 or 1, 1 can be nullptr, if that is the case, it is attached to world.
void setDampingInternal(int agxDOF, double damping)
std::shared_ptr< PrismaticJoint > asPrismaticJoint()
bool getEnabled() const
Is the joint is enabled?
std::string getName() const
Get the name of the Joint.
virtual int getAgxTranslationalDOF(DegreeOfFreedom) const
Definition: Joint.h:242
void setRotationalDamping(DegreeOfFreedom dof, double damping)
Set the rotational damping along the axis of the joint, in newton-meter-seconds per radian.
std::shared_ptr< CylindricalJoint > asCylindricalJoint()
std::shared_ptr< SpringJoint > asSpringJoint()
void setEnabled(bool enabled)
Set to true if the joint should be enabled and should interact with the simulation.
agx::Real getDampingInternal(int agxDOF) const
AffineMatrix4x4 getTransformation(int body) const
Get the transformation in the world frame of the attachment of specified body.
double getTranslationalElasticity(DegreeOfFreedom dof) const
Get the translational elasticity along the axis of the joint.
Vec3 getBodyTorque(int body) const
Get the torque that the joint exerts on the specified body in the frame of the body,...
std::shared_ptr< LockJoint > asLockJoint()
double getRotationalElasticity(DegreeOfFreedom dof) const
Get the rotational elasticity along the axis of the joint, in newton per radian.
Vec3 getBodyForce(int body) const
Get the force that the joint exerts on the specified body in the frame of the body,...
A 3 dimensional vector which can be used to define a point or a vector and contains basic arithmetic.
Definition: Vec3.h:40
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29