AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
SlackLockJoint.h
Go to the documentation of this file.
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 unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agx/Constraint.h>
20
21namespace agx
22{
23
30 {
31 public:
38 SlackLockJoint( agx::RigidBody* rb1, RigidBody* rb2 = nullptr );
39
48 SlackLockJoint( agx::RigidBody* rb1, agx::Frame* rb1AttachmentFrame, agx::RigidBody* rb2 = nullptr, agx::Frame* rb2AttachmentFrame = nullptr );
49
56 SlackLockJoint( agx::RigidBody* rb1, agx::RigidBody* rb2, const agx::Vec3& worldAnchorPoint );
57
63 SlackLockJoint( agx::RigidBody* rb1, const agx::Vec3& localAnchorPoint );
64
72 enum DOF
73 {
74 ALL_DOF = -1,
75 TRANSLATIONAL_1A = 0,
76 TRANSLATIONAL_1B = 1,
77 TRANSLATIONAL_2A = 2,
78 TRANSLATIONAL_2B = 3,
79 TRANSLATIONAL_3A = 4,
80 TRANSLATIONAL_3B = 5,
81 ROTATIONAL_1A = 6,
82 ROTATIONAL_1B = 7,
83 ROTATIONAL_2A = 8,
84 ROTATIONAL_2B = 9,
85 ROTATIONAL_3A = 10,
86 ROTATIONAL_3B = 11,
87 NUM_DOF = 12
88 };
89
93 virtual int getNumDOF() const override;
94
95
110
111
116 bool getSlackParameters( agx::Vec3& pos_uvn, agx::Real& rot ) const;
117
119
120 protected:
123
127 virtual void render( agxRender::RenderManager *mgr, float scale ) const override;
128
129 private:
130
131 class SlackLockJointImplementation *m_implementation;
132
133 };
134
136
137}
138
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXPHYSICS_EXPORT
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
The base class for a constraint.
Definition: Constraint.h:89
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:49
A constraint that is equal to the.
virtual void render(agxRender::RenderManager *mgr, float scale) const override
Internal method used for debug rendering.
bool setSlackParameters(agx::Vec3 pos_uvn, agx::Real rot)
Set slack range parameters.
SlackLockJoint(agx::RigidBody *rb1, RigidBody *rb2=nullptr)
Create Lock joint given one or two rigid bodies.
virtual int getNumDOF() const override
SlackLockJoint(agx::RigidBody *rb1, agx::RigidBody *rb2, const agx::Vec3 &worldAnchorPoint)
Create Lock joint given two rigid bodies and one attachment point (in world coordinates).
virtual ~SlackLockJoint()
SlackLockJoint(agx::RigidBody *rb1, agx::Frame *rb1AttachmentFrame, agx::RigidBody *rb2=nullptr, agx::Frame *rb2AttachmentFrame=nullptr)
Create Lock joint given one or two rigid bodies with corresponding attachment frames.
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
SlackLockJoint(agx::RigidBody *rb1, const agx::Vec3 &localAnchorPoint)
Create Lock joint given one rigid body and a local anchor point.
bool getSlackParameters(agx::Vec3 &pos_uvn, agx::Real &rot) const
Read the current slack parameters.
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30
#define CALLABLE
Definition: macros.h:72
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:41
ref_ptr< SlackLockJoint > SlackLockJointRef