PxTypeInfo.h
Go to the documentation of this file.
1 //
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions
4 // are met:
5 // * Redistributions of source code must retain the above copyright
6 // notice, this list of conditions and the following disclaimer.
7 // * Redistributions in binary form must reproduce the above copyright
8 // notice, this list of conditions and the following disclaimer in the
9 // documentation and/or other materials provided with the distribution.
10 // * Neither the name of NVIDIA CORPORATION nor the names of its
11 // contributors may be used to endorse or promote products derived
12 // from this software without specific prior written permission.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
15 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 //
26 // Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
27 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
28 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
29 
30 #ifndef PX_PHYSICS_COMMON_PX_TYPEINFO
31 #define PX_PHYSICS_COMMON_PX_TYPEINFO
32 
38 
39 #if !PX_DOXYGEN
40 namespace physx
41 {
42 #endif
43 
54 {
55  enum Enum
56  {
58 
63 
77 
79  eFIRST_PHYSX_EXTENSION = 256,
80  eFIRST_VEHICLE_EXTENSION = 512,
81  eFIRST_USER_EXTENSION = 1024
82  };
83 };
84 
91 template<typename T> struct PxTypeInfo {};
92 
93 #define PX_DEFINE_TYPEINFO(_name, _fastType) \
94  class _name; \
95  template <> struct PxTypeInfo<_name> { static const char* name() { return #_name; } enum { eFastTypeId = _fastType }; };
96 
97 /* the semantics of the fastType are as follows: an object A can be cast to a type B if B's fastType is defined, and A has the same fastType.
98  * This implies that B has no concrete subclasses or superclasses.
99  */
100 
122 
123 #if !PX_DOXYGEN
124 } // namespace physx
125 #endif
126 
128 #endif
Definition: GuContactBuffer.h:37
a structure containing per-type information for types inheriting from PxBase
Definition: PxTypeInfo.h:91
Definition: PxTypeInfo.h:72
Definition: PxTypeInfo.h:64
Definition: PxTypeInfo.h:66
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK.
Definition: PxRigidDynamic.h:83
a joint between two links in an articulation.
Definition: PxArticulationJoint.h:148
Definition: PxTypeInfo.h:78
PxActor is the base class for the main simulation objects in the physics SDK.
Definition: PxActor.h:154
Definition: PxTypeInfo.h:62
Abstract class for collision shapes.
Definition: PxShape.h:142
Definition: PxTypeInfo.h:70
Definition: PxTypeInfo.h:69
A triangle mesh, also called a &#39;polygon soup&#39;.
Definition: PxTriangleMesh.h:126
Definition: PxTypeInfo.h:59
Definition: PxTypeInfo.h:67
Definition: PxTypeInfo.h:68
A convex mesh.
Definition: PxConvexMesh.h:84
an enumeration of concrete classes inheriting from PxBase
Definition: PxTypeInfo.h:53
A precomputed pruning structure to accelerate scene queries against newly added actors.
Definition: PxPruningStructure.h:62
Definition: PxTypeInfo.h:60
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition: PxRigidActor.h:58
A triangle mesh containing the PxMeshMidPhase::eBVH33 structure.
Definition: PxTriangleMesh.h:286
Definition: PxTypeInfo.h:75
A height field class.
Definition: PxHeightField.h:85
a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver ...
Definition: PxArticulationReducedCoordinate.h:147
A plugin class for implementing constraints.
Definition: PxConstraint.h:108
#define PX_DEFINE_TYPEINFO(_name, _fastType)
Definition: PxTypeInfo.h:93
Definition: PxTypeInfo.h:76
Definition: PxTypeInfo.h:73
Definition: PxTypeInfo.h:65
Material class to represent a set of surface properties.
Definition: PxMaterial.h:143
A triangle mesh containing the PxMeshMidPhase::eBVH34 structure.
Definition: PxTriangleMesh.h:302
Definition: PxTypeInfo.h:61
a tree structure of bodies connected by joints that is treated as a unit by the dynamics solver ...
Definition: PxArticulation.h:76
Class to aggregate actors into a single broad-phase entry.
Definition: PxAggregate.h:70
PxRigidBody is a base class shared between dynamic rigid body objects.
Definition: PxRigidBody.h:195
PxRigidStatic represents a static rigid body simulation object in the physics SDK.
Definition: PxRigidStatic.h:59
Base class for objects that can be members of a PxCollection.
Definition: PxBase.h:73
Definition: PxTypeInfo.h:57
a joint between two links in an articulation.
Definition: PxArticulationJointReducedCoordinate.h:55
Enum
Definition: PxTypeInfo.h:55