29#ifndef NP_PHYSICS_INSERTION_CALLBACK_H
30#define NP_PHYSICS_INSERTION_CALLBACK_H
32#include "common/PxInsertionCallback.h"
33#include "GuTriangleMesh.h"
34#include "GuHeightField.h"
35#include "GuConvexMesh.h"
37#include "GuTetrahedronMesh.h"
48 if(type == PxConcreteType::eTRIANGLE_MESH_BVH33 || type == PxConcreteType::eTRIANGLE_MESH_BVH34)
49 return NpFactory::getInstance().createTriangleMesh(data);
51 if (type == PxConcreteType::eCONVEX_MESH)
52 return NpFactory::getInstance().createConvexMesh(data);
54 if (type == PxConcreteType::eHEIGHTFIELD)
55 return NpFactory::getInstance().createHeightField(data);
57 if (type == PxConcreteType::eBVH)
58 return NpFactory::getInstance().createBVH(data);
60 if (type == PxConcreteType::eTETRAHEDRON_MESH)
61 return NpFactory::getInstance().createTetrahedronMesh(data);
63 if (type == PxConcreteType::eSOFTBODY_MESH)
64 return NpFactory::getInstance().createSoftBodyMesh(data);
67 "Object type not supported for buildObjectFromData.");
Definition NpPhysicsInsertionCallback.h:42
virtual PxBase * buildObjectFromData(PxConcreteType::Enum type, void *data)
Builds object (TriangleMesh, Heightfield, ConvexMesh or BVH) from given data in PxPhysics.
Definition NpPhysicsInsertionCallback.h:46
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
Callback interface that permits TriangleMesh, Heightfield, ConvexMesh or BVH to be used directly with...
Definition PxInsertionCallback.h:57
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation &PX_CALL_CONV PxGetFoundation()
Retrieves the Foundation SDK after it has been created.
Definition FdFoundation.cpp:279
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
@ eINTERNAL_ERROR
The library failed for some reason. Possibly you have passed invalid values like NaNs,...
Definition PxErrors.h:73