AGX Dynamics
2.37.2.0
CylindricalJoint.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#ifndef AGX_CYLINDRICAL_JOINT_H
18
#define AGX_CYLINDRICAL_JOINT_H
19
20
#include <
agx/Constraint.h
>
21
22
namespace
agxUtil
23
{
24
class
Spline
;
25
}
26
27
namespace
agx
28
{
32
class
CALLABLE
AGXPHYSICS_EXPORT
CylindricalJointFrame
:
public
ConstraintFrame
33
{
34
public
:
36
CylindricalJointFrame
() {}
37
38
// Constructor providing a point and an axis
39
CylindricalJointFrame
(
const
Vec3
& point,
const
Vec3
& axis );
40
44
void
setAxis(
const
Vec3
& axis );
45
49
void
setPoint(
const
Vec3
& point );
50
55
void
set
(
const
Vec3
& point,
const
Vec3
& axis );
56
57
const
Vec3
& getAxis()
const
;
58
};
59
64
class
CALLABLE
AGXPHYSICS_EXPORT
CylindricalJoint
:
public
Constraint2DOF
65
{
66
public
:
73
CylindricalJoint
(
const
CylindricalJointFrame
& cf,
RigidBody
* rb1,
RigidBody
* rb2 = 0 );
74
82
CylindricalJoint
(
RigidBody
* rb1,
Frame
* rb1AttachmentFrame,
RigidBody
* rb2 =
nullptr
,
Frame
* rb2AttachmentFrame =
nullptr
);
83
88
enum
DOF
89
{
90
ALL_DOF=-1,
91
ROTATIONAL_1=0,
92
ROTATIONAL_2=1,
93
TRANSLATIONAL_1=2,
94
TRANSLATIONAL_2=3,
95
NUM_DOF=4
96
};
97
101
virtual
int
getNumDOF()
const override
;
102
103
AGXSTREAM_DECLARE_SERIALIZABLE
(
agx::CylindricalJoint
);
104
105
protected
:
106
CylindricalJoint
();
107
virtual
~
CylindricalJoint
();
108
112
virtual
void
render(
agxRender::RenderManager
*mgr,
float
scale )
const override
;
113
114
private
:
115
class
CylindricalJointImplementation* m_implementation;
116
};
117
118
typedef
ref_ptr<CylindricalJoint>
CylindricalJointRef
;
119
120
}
// namespace agx
121
#endif
agx::CylindricalJointFrame
Helper function to define the reference frame used by the prismatic constraint.
Definition:
CylindricalJoint.h:32
agx::Constraint2DOF
Specialization for constraints that have two degree of freedom such as Cylindrical.
Definition:
Constraint.h:761
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc...
Definition:
RenderManager.h:106
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agx::Constraint2DOF::DOF
DOF
Specifies a selected degree of freedom.
Definition:
Constraint.h:771
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
Constraint.h
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:54
agx::CylindricalJoint
A cylindrical joint is similar to a prismatic joint but with an extra degree of freedom free (rotatio...
Definition:
CylindricalJoint.h:64
CALLABLE
#define CALLABLE
Definition:
Object.h:73
agx::Vec3T< Real >
agx::Frame
The object defining a frame of reference and providing transformations operations.
Definition:
Frame.h:67
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agx::CylindricalJointRef
ref_ptr< CylindricalJoint > CylindricalJointRef
Definition:
CylindricalJoint.h:118
agxUtil::Spline
Base class for splines.
Definition:
Spline.h:31
agx::CylindricalJointFrame::CylindricalJointFrame
CylindricalJointFrame()
Default constructor.
Definition:
CylindricalJoint.h:36
agxUtil
The agxUtil namespace contain classes and methods for utility functionality.
Definition:
CylindricalJoint.h:22
include
agx
CylindricalJoint.h
Generated on Sun Jan 28 2024 11:19:25 for AGX Dynamics by
1.8.13