AGXDynamics
2.31.1.0
WheelJoint.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2021. 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
#pragma once
18
19
#include <
agx/Constraint.h
>
20
21
22
namespace
agx
23
{
24
25
AGX_DECLARE_POINTER_TYPES
(
WheelJoint
);
26
27
31
class
CALLABLE
AGXPHYSICS_EXPORT
WheelJointFrame
:
public
ConstraintFrame
32
{
33
public
:
34
45
WheelJointFrame
(
agx::Vec3
point,
agx::Vec3
wheelAxle,
agx::Vec3
steeringAxle );
46
47
};
48
49
50
69
class
CALLABLE
AGXPHYSICS_EXPORT
WheelJoint
:
public
Constraint
{
70
public
:
71
78
WheelJoint
(
const
WheelJointFrame
& wjf,
RigidBody
* rb1,
RigidBody
* rb2 );
79
88
WheelJoint
(
RigidBody
* rb1,
RigidBody
* rb2,
const
Vec3
& center,
const
Vec3
& axis);
89
90
103
WheelJoint
(
RigidBody
* rb1,
Frame
* rb1AttachmentFrame,
RigidBody
* rb2 =
nullptr
,
104
Frame
* rb2AttachmentFrame =
nullptr
);
105
106
111
RigidBody
* getWheelRigidBody();
112
117
RigidBody
* getChassisRigidBody();
118
123
enum
DOF
{
124
ALL_DOF = -1,
125
TRANSLATIONAL_1 = 0,
126
TRANSLATIONAL_2 = 1,
127
ROTATIONAL_1 = 3,
128
NUM_DOF = 3
129
};
130
134
enum
SecondaryConstraint
{
135
STEERING = 0,
136
WHEEL = 1,
137
SUSPENSION = 2,
139
STEERINGCONSTRAINT_BOUNDS = 3,
142
NUM_FREEDOF = 3
143
};
144
148
int
getNumDOF()
const override
;
149
153
Motor1D
* getMotor1D(
SecondaryConstraint
sc);
154
158
Lock1D
* getLock1D(
SecondaryConstraint
sc);
159
163
Range1D
* getRange1D(
SecondaryConstraint
sc);
164
165
169
Real
getAngle
(
SecondaryConstraint
sc = STEERING )
const
;
170
171
172
AGXSTREAM_DECLARE_SERIALIZABLE
(
agx::WheelJoint
);
173
174
protected
:
175
WheelJoint
();
176
177
virtual
~
WheelJoint
();
178
182
void
render(
class
agxRender::RenderManager
* mgr,
float
scale)
const override
;
183
184
private
:
185
class
WheelJointImplementation* m_implementation;
186
};
187
188
}
//namespace agx
189
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::Constraint
The base class for a constraint.
Definition:
Constraint.h:86
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:248
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc...
Definition:
RenderManager.h:110
agx::LockController
Elementary secondary constraint to keep constraint angle at a given target position.
Definition:
ElementaryConstraint.h:1106
agx::WheelJoint::SecondaryConstraint
SecondaryConstraint
Enum for specifying which secondary constraint to access.
Definition:
WheelJoint.h:134
agx::RangeController
Elementary secondary constraint to keep constraint angle within two given values. ...
Definition:
ElementaryConstraint.h:1026
agx
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
Definition:
AckermannSteering.h:21
Constraint.h
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:52
CALLABLE
#define CALLABLE
Definition:
Object.h:77
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:206
agx::TargetSpeedController
Elementary secondary constraint to drive something given target speed (translational or rotational)...
Definition:
ElementaryConstraint.h:710
agx::WheelJointFrame
Helper class to define reference frames for WheelJoint.
Definition:
WheelJoint.h:31
agx::Real
double Real
Definition:
Real.h:42
agx::getAngle
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
Definition:
ConstraintImplementation.h:1423
agx::WheelJoint
The wheel constraint is designed to attach two bodies such that one of them is free to rotate about a...
Definition:
WheelJoint.h:69
agx::WheelJoint::DOF
DOF
Enum used for specifying which Degree of Freedom (DOF) that should be accessed in calls to for exampl...
Definition:
WheelJoint.h:123
include
agx
WheelJoint.h
Generated on Thu Jan 13 2022 19:49:42 for AGXDynamics by
1.8.13