PxTypeInfo.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 #ifndef PX_PHYSICS_COMMON_PX_TYPEINFO
14 #define PX_PHYSICS_COMMON_PX_TYPEINFO
15 
21 
22 #ifndef PX_DOXYGEN
23 namespace physx
24 {
25 #endif
26 
37 {
38  enum Enum
39  {
41 
46 
59 
61  eFIRST_PHYSX_EXTENSION = 256,
62  eFIRST_VEHICLE_EXTENSION = 512,
63  eFIRST_USER_EXTENSION = 1024
64  };
65 };
66 
73 template<typename T> struct PxTypeInfo {};
74 
75 #define PX_DEFINE_TYPEINFO(_name, _fastType) \
76  class _name; \
77  template <> struct PxTypeInfo<_name> { static const char* name() { return #_name; } enum { eFastTypeId = _fastType }; };
78 
79 /* 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.
80  * This implies that B has no concrete subclasses or superclasses.
81  */
82 
104 
105 #ifndef PX_DOXYGEN
106 } // namespace physx
107 #endif
108 
110 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com