AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
SlackCylindricalJoint.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
20
21namespace agx
22{
23
30 {
31 public:
39
47 SlackCylindricalJoint( RigidBody* rb1, Frame* rb1AttachmentFrame, RigidBody* rb2 = nullptr, Frame* rb2AttachmentFrame = nullptr );
48
56 enum DOF
57 {
58 ALL_DOF = -1,
59 ROTATIONAL_1A = 0,
60 ROTATIONAL_1B = 1,
61 ROTATIONAL_2A = 2,
62 ROTATIONAL_2B = 3,
63 TRANSLATIONAL_1A = 4,
64 TRANSLATIONAL_1B = 5,
65 TRANSLATIONAL_2A = 6,
66 TRANSLATIONAL_2B = 7,
67 NUM_DOF = 8
68 };
69
73 virtual int getNumDOF() const override;
74
75
90
91
96 bool getSlackParameters( agx::Vec2& pos_uv, agx::Real& rot ) const;
97
98
100
101 protected:
104
108 virtual void render( agxRender::RenderManager *mgr, float scale ) const override;
109
110 private:
111 class SlackCylindricalJointImplementation* m_implementation;
112 };
113
115
116
117} // namespace agx
118
#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.
Specialization for constraints that have two degree of freedom such as Cylindrical.
Definition: Constraint.h:798
Helper function to define the reference frame used by the prismatic constraint.
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.
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
virtual void render(agxRender::RenderManager *mgr, float scale) const override
Internal method used for debug rendering.
SlackCylindricalJoint(RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2=nullptr, Frame *rb2AttachmentFrame=nullptr)
Create Cylindrical joint given one or two rigid bodies with corresponding attachment frames.
SlackCylindricalJoint(const CylindricalJointFrame &cf, RigidBody *rb1, RigidBody *rb2=0)
Create Cylindrical joint given a cylindrical joint frame (line defined in world coordinates)
bool setSlackParameters(agx::Vec2 pos_uv, agx::Real rot)
Set slack range parameters.
virtual int getNumDOF() const override
bool getSlackParameters(agx::Vec2 &pos_uv, agx::Real &rot) const
Read the current slack range.
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.
ref_ptr< SlackCylindricalJoint > SlackCylindricalJointRef
double Real
Definition: Real.h:41