14 #ifndef PX_PHYSICS_GEOMETRYHELPERS
15 #define PX_PHYSICS_GEOMETRYHELPERS
58 return *PxUnionCast<PxGeometry*>(&
bytes.geometry);
63 return *PxUnionCast<const PxGeometry*>(&
bytes.geometry);
68 return get<PxSphereGeometry, PxGeometryType::eSPHERE>();
73 return get<const PxSphereGeometry, PxGeometryType::eSPHERE>();
78 return get<PxPlaneGeometry, PxGeometryType::ePLANE>();
83 return get<const PxPlaneGeometry, PxGeometryType::ePLANE>();
89 return get<PxCapsuleGeometry, PxGeometryType::eCAPSULE>();
94 return get<const PxCapsuleGeometry, PxGeometryType::eCAPSULE>();
100 return get<PxBoxGeometry, PxGeometryType::eBOX>();
105 return get<const PxBoxGeometry, PxGeometryType::eBOX>();
110 return get<PxConvexMeshGeometry, PxGeometryType::eCONVEXMESH>();
115 return get<const PxConvexMeshGeometry, PxGeometryType::eCONVEXMESH>();
121 return get<PxTriangleMeshGeometry, PxGeometryType::eTRIANGLEMESH>();
126 return get<const PxTriangleMeshGeometry, PxGeometryType::eTRIANGLEMESH>();
131 return get<PxHeightFieldGeometry, PxGeometryType::eHEIGHTFIELD>();
136 return get<const PxHeightFieldGeometry, PxGeometryType::eHEIGHTFIELD>();
160 static_cast<T&
>(
any()) = static_cast<const T&>(geometry);
164 template<
typename T, PxGeometryType::Enum type> T&
get()
167 return static_cast<T&
>(
any());
170 template<
typename T, PxGeometryType::Enum type> T&
get()
const
173 return static_cast<T&
>(
any());