AGX Dynamics
2.38.0.2
Prismatic.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
#pragma once
17
18
#include <
agx/Constraint.h
>
19
20
namespace
agx
21
{
25
class
CALLABLE
AGXPHYSICS_EXPORT
PrismaticFrame
:
public
ConstraintFrame
26
{
27
public
:
31
PrismaticFrame
();
32
34
~
PrismaticFrame
();
35
41
PrismaticFrame
(
const
Vec3
& point,
const
Vec3
& axis );
42
44
void
setAxis(
const
Vec3
& axis );
45
47
void
setPoint(
const
Vec3
& point );
48
54
void
set(
const
Vec3
& point,
const
Vec3
& axis );
55
57
const
Vec3
& getAxis()
const
;
58
};
59
60
AGX_DECLARE_POINTER_TYPES
(
Prismatic
);
66
class
CALLABLE
AGXPHYSICS_EXPORT
Prismatic
:
public
Constraint1DOF
67
{
68
public
:
76
Prismatic
(
const
PrismaticFrame
& pf,
RigidBody
* rb1,
RigidBody
* rb2 = 0 );
77
86
Prismatic
(
RigidBody
* rb1,
Frame
* rb1AttachmentFrame,
RigidBody
* rb2 =
nullptr
,
Frame
* rb2AttachmentFrame =
nullptr
);
87
94
Prismatic
(
const
Vec3
& axis,
RigidBody
* rb1,
RigidBody
* rb2 =
nullptr
);
95
100
enum
DOF
{
101
ALL_DOF = -1,
102
ROTATIONAL_1 = 0,
103
ROTATIONAL_2 = 1,
104
ROTATIONAL_3 = 2,
105
TRANSLATIONAL_1 = 3,
106
TRANSLATIONAL_2 = 4,
107
NUM_DOF = 5
108
};
109
113
virtual
int
getNumDOF()
const override
;
114
115
AGXSTREAM_DECLARE_SERIALIZABLE
(
agx::Prismatic
);
116
117
protected
:
118
Prismatic
();
119
virtual
~
Prismatic
();
120
124
virtual
void
render(
agxRender::RenderManager
* mgr,
float
scale )
const override
;
125
126
private
:
127
class
PrismaticImplementation* m_implementation;
128
};
129
130
131
}
// namespace agx
agx::Constraint1DOF
Specialization for constraints that have only one degree of freedom such as Hinge and Prismatic.
Definition:
Constraint.h:673
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:51
CALLABLE
#define CALLABLE
Definition:
macros.h:72
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Definition:
RenderManager.h:106
agx::Prismatic
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
Definition:
Prismatic.h:66
Constraint.h
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
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:254
agx::Prismatic::DOF
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
Definition:
Prismatic.h:100
agx::PrismaticFrame
Helper function to define the reference frame used by the prismatic constraint.
Definition:
Prismatic.h:25
agx::Vec3T< Real >
agx::Frame
The object defining a frame of reference and providing transformations operations.
Definition:
Frame.h:67
include
agx
Prismatic.h
Generated on Sun Sep 1 2024 11:18:52 for AGX Dynamics by
1.8.17