AGXDynamics
2.35.0.2
castUtils.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. 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 AGXLUA_CAST_UTILS_H
18
#define AGXLUA_CAST_UTILS_H
19
20
#include <
agx/Hinge.h
>
21
#include <
agx/CylindricalJoint.h
>
22
#include <
agx/Prismatic.h
>
23
24
namespace
agxLua
25
{
26
27
// Dynamic cast is not available in tolua so we need this to do downward cast, specially for classes with multiple inheritance
28
29
inline
30
agx::Hinge
*
castSerializableToHinge
(
agxStream::Serializable
* obj )
31
{
32
return
dynamic_cast<
agx::Hinge
*
>
(obj);
33
}
34
35
inline
36
agx::Prismatic
*
castSerializableToPrismatic
(
agxStream::Serializable
* obj )
37
{
38
return
dynamic_cast<
agx::Prismatic
*
>
(obj);
39
}
40
41
inline
42
agx::CylindricalJoint
*
castSerializableToCylindricalJoint
(
agxStream::Serializable
* obj )
43
{
44
return
dynamic_cast<
agx::CylindricalJoint
*
>
(obj);
45
}
46
47
}
48
49
50
#endif // AGXLUA_CAST_UTILS_H
Hinge.h
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition:
Serializable.h:44
agx::Prismatic
A prismatic joint keeps a fixed relative orientation between the attached bodies but allows them to s...
Definition:
Prismatic.h:67
agx::CylindricalJoint
A cylindrical joint is similar to a prismatic joint but with an extra degree of freedom free (rotatio...
Definition:
CylindricalJoint.h:64
agxLua::castSerializableToPrismatic
agx::Prismatic * castSerializableToPrismatic(agxStream::Serializable *obj)
Definition:
castUtils.h:36
Prismatic.h
CylindricalJoint.h
agxLua
Definition:
castUtils.h:24
agxLua::castSerializableToHinge
agx::Hinge * castSerializableToHinge(agxStream::Serializable *obj)
Definition:
castUtils.h:30
agx::Hinge
The hinge constraint between two rigid bodies or one rigid body and the world.
Definition:
Hinge.h:103
agxLua::castSerializableToCylindricalJoint
agx::CylindricalJoint * castSerializableToCylindricalJoint(agxStream::Serializable *obj)
Definition:
castUtils.h:42
include
agxLua
castUtils.h
Generated on Mon Jan 30 2023 15:44:11 for AGXDynamics by
1.8.17