修改平台宏定义 dll导出符号表
This commit is contained in:
parent
e67a8a7f35
commit
c965f86652
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,26 +1,13 @@
|
||||
#define WINDOWS
|
||||
#define EXPORT
|
||||
#ifdef _WIN32
|
||||
#define EXPORT_API __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
//#ifdef WINDOWS
|
||||
//#ifdef EXPORT
|
||||
//#define EXPORT_API __declspec(dllexport)
|
||||
//#else
|
||||
//#define EXPORT_API __declspec(dllimport)
|
||||
//#endif
|
||||
//#else
|
||||
//#include <stdlib.h>
|
||||
//
|
||||
//#ifdef EXPORT
|
||||
//#define EXPORT_API __attribute__((visibility ("default")))
|
||||
//#else
|
||||
//#endif
|
||||
//
|
||||
//#endif
|
||||
//¸øc# ʹÓà ²»ÐèÒª¶¨Òådllimport
|
||||
|
||||
#ifdef __linux__
|
||||
#define EXPORT_API __attribute__((visibility ("default")))
|
||||
#endif
|
||||
|
||||
//ÁÙʱΪÁ˱àÒëͨ¹ý
|
||||
//#define EXPORT_API const
|
||||
|
||||
|
||||
#define CALL _cdecl
|
||||
@ -29,10 +16,9 @@
|
||||
physx::PxDefaultAllocator gAllocator;
|
||||
physx::PxDefaultErrorCallback gErrorCallback;
|
||||
|
||||
//#pragma comment(lib, "D:\\work\\physxCDLL\\lib\\PhysXFoundation_static_64.lib")
|
||||
extern "C"
|
||||
{
|
||||
physx::PxFoundation* CALL physx_create_foundation()
|
||||
EXPORT_API physx::PxFoundation* CALL physx_create_foundation()
|
||||
{
|
||||
return PxCreateFoundation(PX_PHYSICS_VERSION, gAllocator, gErrorCallback);
|
||||
}
|
||||
@ -44,14 +30,14 @@ extern "C"
|
||||
// return &gAllocator;
|
||||
//}
|
||||
|
||||
physx_PxPvd_Pod* CALL phys_PxCreatePvd(physx_PxFoundation_Pod* foundation_pod) {
|
||||
EXPORT_API physx_PxPvd_Pod* CALL phys_PxCreatePvd(physx_PxFoundation_Pod* foundation_pod) {
|
||||
physx::PxFoundation& foundation = reinterpret_cast<physx::PxFoundation&>(*foundation_pod);
|
||||
physx::PxPvd* return_val = PxCreatePvd(foundation);
|
||||
auto return_val_pod = reinterpret_cast<physx_PxPvd_Pod*>(return_val);
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxPhysics_Pod* CALL phys_PxCreatePhysics(uint32_t version, physx_PxFoundation_Pod* foundation_pod, physx_PxTolerancesScale_Pod const* scale_pod, bool trackOutstandingAllocations, physx_PxPvd_Pod* pvd_pod, physx_PxOmniPvd_Pod* omniPvd_pod) {
|
||||
EXPORT_API physx_PxPhysics_Pod* CALL phys_PxCreatePhysics(uint32_t version, physx_PxFoundation_Pod* foundation_pod, physx_PxTolerancesScale_Pod const* scale_pod, bool trackOutstandingAllocations, physx_PxPvd_Pod* pvd_pod, physx_PxOmniPvd_Pod* omniPvd_pod) {
|
||||
physx::PxFoundation& foundation = reinterpret_cast<physx::PxFoundation&>(*foundation_pod);
|
||||
physx::PxTolerancesScale const& scale = reinterpret_cast<physx::PxTolerancesScale const&>(*scale_pod);
|
||||
physx::PxPvd* pvd = reinterpret_cast<physx::PxPvd*>(pvd_pod);
|
||||
@ -62,27 +48,27 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
physx_PxDefaultCpuDispatcher_Pod* CALL phys_PxDefaultCpuDispatcherCreate(uint32_t numThreads, uint32_t* affinityMasks, int32_t mode_pod, uint32_t yieldProcessorCount) {
|
||||
EXPORT_API physx_PxDefaultCpuDispatcher_Pod* CALL phys_PxDefaultCpuDispatcherCreate(uint32_t numThreads, uint32_t* affinityMasks, int32_t mode_pod, uint32_t yieldProcessorCount) {
|
||||
auto mode = static_cast<physx::PxDefaultCpuDispatcherWaitForWorkMode::Enum>(mode_pod);
|
||||
physx::PxDefaultCpuDispatcher* return_val = PxDefaultCpuDispatcherCreate(numThreads, affinityMasks, mode, yieldProcessorCount);
|
||||
auto return_val_pod = reinterpret_cast<physx_PxDefaultCpuDispatcher_Pod*>(return_val);
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxMaterial_Pod* CALL PxPhysics_createMaterial_mut(physx_PxPhysics_Pod* self__pod, float staticFriction, float dynamicFriction, float restitution) {
|
||||
EXPORT_API physx_PxMaterial_Pod* CALL PxPhysics_createMaterial_mut(physx_PxPhysics_Pod* self__pod, float staticFriction, float dynamicFriction, float restitution) {
|
||||
physx::PxPhysics* self_ = reinterpret_cast<physx::PxPhysics*>(self__pod);
|
||||
physx::PxMaterial* return_val = self_->createMaterial(staticFriction, dynamicFriction, restitution);
|
||||
auto return_val_pod = reinterpret_cast<physx_PxMaterial_Pod*>(return_val);
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxPvdTransport_Pod* CALL phys_PxDefaultPvdSocketTransportCreate(char const* host, int32_t port, uint32_t timeoutInMilliseconds) {
|
||||
EXPORT_API physx_PxPvdTransport_Pod* CALL phys_PxDefaultPvdSocketTransportCreate(char const* host, int32_t port, uint32_t timeoutInMilliseconds) {
|
||||
physx::PxPvdTransport* return_val = physx::PxDefaultPvdSocketTransportCreate(host, port, timeoutInMilliseconds);
|
||||
auto return_val_pod = reinterpret_cast<physx_PxPvdTransport_Pod*>(return_val);
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
bool CALL PxPvd_connect_mut(physx_PxPvd_Pod* self__pod, physx_PxPvdTransport_Pod* transport_pod, uint8_t flags_pod) {
|
||||
EXPORT_API bool CALL PxPvd_connect_mut(physx_PxPvd_Pod* self__pod, physx_PxPvdTransport_Pod* transport_pod, uint8_t flags_pod) {
|
||||
physx::PxPvd* self_ = reinterpret_cast<physx::PxPvd*>(self__pod);
|
||||
physx::PxPvdTransport& transport = reinterpret_cast<physx::PxPvdTransport&>(*transport_pod);
|
||||
auto flags = physx::PxPvdInstrumentationFlags(flags_pod);
|
||||
@ -90,7 +76,7 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
physx_PxTolerancesScale_Pod const* CALL PxPhysics_getTolerancesScale(physx_PxPhysics_Pod const* self__pod) {
|
||||
EXPORT_API physx_PxTolerancesScale_Pod const* CALL PxPhysics_getTolerancesScale(physx_PxPhysics_Pod const* self__pod) {
|
||||
physx::PxPhysics const* self_ = reinterpret_cast<physx::PxPhysics const*>(self__pod);
|
||||
physx::PxTolerancesScale const& return_val = self_->getTolerancesScale();
|
||||
auto return_val_pod = reinterpret_cast<physx_PxTolerancesScale_Pod const*>(&return_val);
|
||||
@ -98,7 +84,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
physx_PxSceneDesc_Pod CALL PxSceneDesc_new(physx_PxTolerancesScale_Pod const* scale_pod) {
|
||||
EXPORT_API physx_PxSceneDesc_Pod CALL PxSceneDesc_new(physx_PxTolerancesScale_Pod const* scale_pod) {
|
||||
physx::PxTolerancesScale const& scale = reinterpret_cast<physx::PxTolerancesScale const&>(*scale_pod);
|
||||
physx::PxSceneDesc return_val(scale);
|
||||
physx_PxSceneDesc_Pod return_val_pod;
|
||||
@ -107,7 +93,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
physx_PxScene_Pod* CALL PxPhysics_createScene_mut(physx_PxPhysics_Pod* self__pod, physx_PxSceneDesc_Pod const* sceneDesc_pod) {
|
||||
EXPORT_API physx_PxScene_Pod* CALL PxPhysics_createScene_mut(physx_PxPhysics_Pod* self__pod, physx_PxSceneDesc_Pod const* sceneDesc_pod) {
|
||||
physx::PxPhysics* self_ = reinterpret_cast<physx::PxPhysics*>(self__pod);
|
||||
physx::PxSceneDesc const& sceneDesc = reinterpret_cast<physx::PxSceneDesc const&>(*sceneDesc_pod);
|
||||
physx::PxScene* return_val = self_->createScene(sceneDesc);
|
||||
@ -116,7 +102,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
bool CALL PxScene_addActor_mut(physx_PxScene_Pod* self__pod, physx_PxActor_Pod* actor_pod, physx_PxBVH_Pod const* bvh_pod) {
|
||||
EXPORT_API bool CALL PxScene_addActor_mut(physx_PxScene_Pod* self__pod, physx_PxActor_Pod* actor_pod, physx_PxBVH_Pod const* bvh_pod) {
|
||||
physx::PxScene* self_ = reinterpret_cast<physx::PxScene*>(self__pod);
|
||||
physx::PxActor& actor = reinterpret_cast<physx::PxActor&>(*actor_pod);
|
||||
physx::PxBVH const* bvh = reinterpret_cast<physx::PxBVH const*>(bvh_pod);
|
||||
@ -124,32 +110,32 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
physx_PxSphereGeometry_Pod CALL PxSphereGeometry_new(float ir) {
|
||||
EXPORT_API physx_PxSphereGeometry_Pod CALL PxSphereGeometry_new(float ir) {
|
||||
physx::PxSphereGeometry return_val(ir);
|
||||
physx_PxSphereGeometry_Pod return_val_pod;
|
||||
memcpy(&return_val_pod, &return_val, sizeof(return_val_pod));
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
bool CALL PxSphereGeometry_isValid(physx_PxSphereGeometry_Pod const* self__pod) {
|
||||
EXPORT_API bool CALL PxSphereGeometry_isValid(physx_PxSphereGeometry_Pod const* self__pod) {
|
||||
physx::PxSphereGeometry const* self_ = reinterpret_cast<physx::PxSphereGeometry const*>(self__pod);
|
||||
bool return_val = self_->isValid();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
|
||||
void CALL PxScene_lockWrite_mut(physx_PxScene_Pod* self__pod, char const* file, uint32_t line) {
|
||||
EXPORT_API void CALL PxScene_lockWrite_mut(physx_PxScene_Pod* self__pod, char const* file, uint32_t line) {
|
||||
physx::PxScene* self_ = reinterpret_cast<physx::PxScene*>(self__pod);
|
||||
self_->lockWrite(file, line);
|
||||
}
|
||||
|
||||
void CALL PxScene_unlockWrite_mut(physx_PxScene_Pod* self__pod) {
|
||||
EXPORT_API void CALL PxScene_unlockWrite_mut(physx_PxScene_Pod* self__pod) {
|
||||
physx::PxScene* self_ = reinterpret_cast<physx::PxScene*>(self__pod);
|
||||
self_->unlockWrite();
|
||||
}
|
||||
|
||||
|
||||
physx_PxTransform_Pod CALL PxTransform_new_2(int32_t anon_param0_pod) {
|
||||
EXPORT_API physx_PxTransform_Pod CALL PxTransform_new_2(int32_t anon_param0_pod) {
|
||||
auto anon_param0 = static_cast<physx::PxIDENTITY>(anon_param0_pod);
|
||||
physx::PxTransform return_val(anon_param0);
|
||||
physx_PxTransform_Pod return_val_pod;
|
||||
@ -158,7 +144,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
physx_PxRigidDynamic_Pod* CALL phys_PxCreateDynamic(physx_PxPhysics_Pod* sdk_pod, physx_PxTransform_Pod const* transform_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxMaterial_Pod* material_pod, float density, physx_PxTransform_Pod const* shapeOffset_pod) {
|
||||
EXPORT_API physx_PxRigidDynamic_Pod* CALL phys_PxCreateDynamic(physx_PxPhysics_Pod* sdk_pod, physx_PxTransform_Pod const* transform_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxMaterial_Pod* material_pod, float density, physx_PxTransform_Pod const* shapeOffset_pod) {
|
||||
physx::PxPhysics& sdk = reinterpret_cast<physx::PxPhysics&>(*sdk_pod);
|
||||
physx::PxTransform const& transform = reinterpret_cast<physx::PxTransform const&>(*transform_pod);
|
||||
physx::PxGeometry const& geometry = reinterpret_cast<physx::PxGeometry const&>(*geometry_pod);
|
||||
@ -169,7 +155,7 @@ extern "C"
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxRigidDynamic_Pod* CALL phys_PxCreateDynamic_1(physx_PxPhysics_Pod* sdk_pod, physx_PxTransform_Pod const* transform_pod, physx_PxShape_Pod* shape_pod, float density) {
|
||||
EXPORT_API physx_PxRigidDynamic_Pod* CALL phys_PxCreateDynamic_1(physx_PxPhysics_Pod* sdk_pod, physx_PxTransform_Pod const* transform_pod, physx_PxShape_Pod* shape_pod, float density) {
|
||||
physx::PxPhysics& sdk = reinterpret_cast<physx::PxPhysics&>(*sdk_pod);
|
||||
physx::PxTransform const& transform = reinterpret_cast<physx::PxTransform const&>(*transform_pod);
|
||||
physx::PxShape& shape = reinterpret_cast<physx::PxShape&>(*shape_pod);
|
||||
@ -179,7 +165,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
void CALL PxActor_setActorFlag_mut(physx_PxActor_Pod* self__pod, int32_t flag_pod, bool value) {
|
||||
EXPORT_API void CALL PxActor_setActorFlag_mut(physx_PxActor_Pod* self__pod, int32_t flag_pod, bool value) {
|
||||
physx::PxActor* self_ = reinterpret_cast<physx::PxActor*>(self__pod);
|
||||
auto flag = static_cast<physx::PxActorFlag::Enum>(flag_pod);
|
||||
self_->setActorFlag(flag, value);
|
||||
@ -187,7 +173,7 @@ extern "C"
|
||||
|
||||
|
||||
|
||||
bool CALL PxRigidBodyExt_updateMassAndInertia_1(physx_PxRigidBody_Pod* body_pod, float density, physx_PxVec3_Pod const* massLocalPose_pod, bool includeNonSimShapes) {
|
||||
EXPORT_API bool CALL PxRigidBodyExt_updateMassAndInertia_1(physx_PxRigidBody_Pod* body_pod, float density, physx_PxVec3_Pod const* massLocalPose_pod, bool includeNonSimShapes) {
|
||||
physx::PxRigidBody& body = reinterpret_cast<physx::PxRigidBody&>(*body_pod);
|
||||
physx::PxVec3 const* massLocalPose = reinterpret_cast<physx::PxVec3 const*>(massLocalPose_pod);
|
||||
bool return_val = physx::PxRigidBodyExt::updateMassAndInertia(body, density, massLocalPose, includeNonSimShapes);
|
||||
@ -195,20 +181,20 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
void CALL PxRigidBody_setRigidBodyFlag_mut(physx_PxRigidBody_Pod* self__pod, int32_t flag_pod, bool value) {
|
||||
EXPORT_API void CALL PxRigidBody_setRigidBodyFlag_mut(physx_PxRigidBody_Pod* self__pod, int32_t flag_pod, bool value) {
|
||||
physx::PxRigidBody* self_ = reinterpret_cast<physx::PxRigidBody*>(self__pod);
|
||||
auto flag = static_cast<physx::PxRigidBodyFlag::Enum>(flag_pod);
|
||||
self_->setRigidBodyFlag(flag, value);
|
||||
}
|
||||
|
||||
|
||||
void CALL PxShape_setName_mut(physx_PxShape_Pod* self__pod, char const* name) {
|
||||
EXPORT_API void CALL PxShape_setName_mut(physx_PxShape_Pod* self__pod, char const* name) {
|
||||
physx::PxShape* self_ = reinterpret_cast<physx::PxShape*>(self__pod);
|
||||
self_->setName(name);
|
||||
}
|
||||
|
||||
|
||||
bool CALL PxRigidActor_attachShape_mut(physx_PxRigidActor_Pod* self__pod, physx_PxShape_Pod* shape_pod) {
|
||||
EXPORT_API bool CALL PxRigidActor_attachShape_mut(physx_PxRigidActor_Pod* self__pod, physx_PxShape_Pod* shape_pod) {
|
||||
physx::PxRigidActor* self_ = reinterpret_cast<physx::PxRigidActor*>(self__pod);
|
||||
physx::PxShape& shape = reinterpret_cast<physx::PxShape&>(*shape_pod);
|
||||
bool return_val = self_->attachShape(shape);
|
||||
@ -216,38 +202,38 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
void CALL PxRigidActor_detachShape_mut(physx_PxRigidActor_Pod* self__pod, physx_PxShape_Pod* shape_pod, bool wakeOnLostTouch) {
|
||||
EXPORT_API void CALL PxRigidActor_detachShape_mut(physx_PxRigidActor_Pod* self__pod, physx_PxShape_Pod* shape_pod, bool wakeOnLostTouch) {
|
||||
physx::PxRigidActor* self_ = reinterpret_cast<physx::PxRigidActor*>(self__pod);
|
||||
physx::PxShape& shape = reinterpret_cast<physx::PxShape&>(*shape_pod);
|
||||
self_->detachShape(shape, wakeOnLostTouch);
|
||||
}
|
||||
|
||||
uint32_t CALL PxRigidActor_getShapes(physx_PxRigidActor_Pod const* self__pod, physx_PxShape_Pod** userBuffer_pod, uint32_t bufferSize, uint32_t startIndex) {
|
||||
EXPORT_API uint32_t CALL PxRigidActor_getShapes(physx_PxRigidActor_Pod const* self__pod, physx_PxShape_Pod** userBuffer_pod, uint32_t bufferSize, uint32_t startIndex) {
|
||||
physx::PxRigidActor const* self_ = reinterpret_cast<physx::PxRigidActor const*>(self__pod);
|
||||
physx::PxShape** userBuffer = reinterpret_cast<physx::PxShape**>(userBuffer_pod);
|
||||
uint32_t return_val = self_->getShapes(userBuffer, bufferSize, startIndex);
|
||||
return return_val;
|
||||
}
|
||||
|
||||
void CALL PxShape_setSimulationFilterData_mut(physx_PxShape_Pod* self__pod, physx_PxFilterData_Pod const* data_pod) {
|
||||
EXPORT_API void CALL PxShape_setSimulationFilterData_mut(physx_PxShape_Pod* self__pod, physx_PxFilterData_Pod const* data_pod) {
|
||||
physx::PxShape* self_ = reinterpret_cast<physx::PxShape*>(self__pod);
|
||||
physx::PxFilterData const& data = reinterpret_cast<physx::PxFilterData const&>(*data_pod);
|
||||
self_->setSimulationFilterData(data);
|
||||
}
|
||||
|
||||
|
||||
uint32_t CALL PxRigidActor_getNbShapes(physx_PxRigidActor_Pod const* self__pod) {
|
||||
EXPORT_API uint32_t CALL PxRigidActor_getNbShapes(physx_PxRigidActor_Pod const* self__pod) {
|
||||
physx::PxRigidActor const* self_ = reinterpret_cast<physx::PxRigidActor const*>(self__pod);
|
||||
uint32_t return_val = self_->getNbShapes();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
void CALL PxRigidActor_release_mut(physx_PxRigidActor_Pod* self__pod) {
|
||||
EXPORT_API void CALL PxRigidActor_release_mut(physx_PxRigidActor_Pod* self__pod) {
|
||||
physx::PxRigidActor* self_ = reinterpret_cast<physx::PxRigidActor*>(self__pod);
|
||||
self_->release();
|
||||
}
|
||||
|
||||
char const* CALL PxShape_getName(physx_PxShape_Pod const* self__pod) {
|
||||
EXPORT_API char const* CALL PxShape_getName(physx_PxShape_Pod const* self__pod) {
|
||||
physx::PxShape const* self_ = reinterpret_cast<physx::PxShape const*>(self__pod);
|
||||
char const* return_val = self_->getName();
|
||||
return return_val;
|
||||
@ -255,53 +241,53 @@ extern "C"
|
||||
|
||||
|
||||
|
||||
void CALL PxRigidDynamic_setLinearVelocity_mut(physx_PxRigidDynamic_Pod* self__pod, physx_PxVec3_Pod const* linVel_pod, bool autowake) {
|
||||
EXPORT_API void CALL PxRigidDynamic_setLinearVelocity_mut(physx_PxRigidDynamic_Pod* self__pod, physx_PxVec3_Pod const* linVel_pod, bool autowake) {
|
||||
physx::PxRigidDynamic* self_ = reinterpret_cast<physx::PxRigidDynamic*>(self__pod);
|
||||
physx::PxVec3 const& linVel = reinterpret_cast<physx::PxVec3 const&>(*linVel_pod);
|
||||
self_->setLinearVelocity(linVel, autowake);
|
||||
}
|
||||
|
||||
void CALL PxRigidBody_setLinearDamping_mut(physx_PxRigidBody_Pod* self__pod, float linDamp) {
|
||||
EXPORT_API void CALL PxRigidBody_setLinearDamping_mut(physx_PxRigidBody_Pod* self__pod, float linDamp) {
|
||||
physx::PxRigidBody* self_ = reinterpret_cast<physx::PxRigidBody*>(self__pod);
|
||||
self_->setLinearDamping(linDamp);
|
||||
}
|
||||
|
||||
void CALL PxRigidDynamic_setContactReportThreshold_mut(physx_PxRigidDynamic_Pod* self__pod, float threshold) {
|
||||
EXPORT_API void CALL PxRigidDynamic_setContactReportThreshold_mut(physx_PxRigidDynamic_Pod* self__pod, float threshold) {
|
||||
physx::PxRigidDynamic* self_ = reinterpret_cast<physx::PxRigidDynamic*>(self__pod);
|
||||
self_->setContactReportThreshold(threshold);
|
||||
}
|
||||
|
||||
float CALL PxRigidBody_getLinearDamping(physx_PxRigidBody_Pod const* self__pod) {
|
||||
EXPORT_API float CALL PxRigidBody_getLinearDamping(physx_PxRigidBody_Pod const* self__pod) {
|
||||
physx::PxRigidBody const* self_ = reinterpret_cast<physx::PxRigidBody const*>(self__pod);
|
||||
float return_val = self_->getLinearDamping();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
void CALL PxRigidBody_setAngularDamping_mut(physx_PxRigidBody_Pod* self__pod, float angDamp) {
|
||||
EXPORT_API void CALL PxRigidBody_setAngularDamping_mut(physx_PxRigidBody_Pod* self__pod, float angDamp) {
|
||||
physx::PxRigidBody* self_ = reinterpret_cast<physx::PxRigidBody*>(self__pod);
|
||||
self_->setAngularDamping(angDamp);
|
||||
}
|
||||
|
||||
float CALL PxRigidBody_getAngularDamping(physx_PxRigidBody_Pod const* self__pod) {
|
||||
EXPORT_API float CALL PxRigidBody_getAngularDamping(physx_PxRigidBody_Pod const* self__pod) {
|
||||
physx::PxRigidBody const* self_ = reinterpret_cast<physx::PxRigidBody const*>(self__pod);
|
||||
float return_val = self_->getAngularDamping();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
void CALL PxShape_setFlag_mut(physx_PxShape_Pod* self__pod, int32_t flag_pod, bool value) {
|
||||
EXPORT_API void CALL PxShape_setFlag_mut(physx_PxShape_Pod* self__pod, int32_t flag_pod, bool value) {
|
||||
physx::PxShape* self_ = reinterpret_cast<physx::PxShape*>(self__pod);
|
||||
auto flag = static_cast<physx::PxShapeFlag::Enum>(flag_pod);
|
||||
self_->setFlag(flag, value);
|
||||
}
|
||||
|
||||
void CALL PxShape_setFlags_mut(physx_PxShape_Pod* self__pod, uint8_t inFlags_pod) {
|
||||
EXPORT_API void CALL PxShape_setFlags_mut(physx_PxShape_Pod* self__pod, uint8_t inFlags_pod) {
|
||||
physx::PxShape* self_ = reinterpret_cast<physx::PxShape*>(self__pod);
|
||||
auto inFlags = physx::PxShapeFlags(inFlags_pod);
|
||||
self_->setFlags(inFlags);
|
||||
}
|
||||
|
||||
|
||||
physx_PxVec3_Pod CALL PxVec3_getNormalized(physx_PxVec3_Pod const* self__pod) {
|
||||
EXPORT_API physx_PxVec3_Pod CALL PxVec3_getNormalized(physx_PxVec3_Pod const* self__pod) {
|
||||
physx::PxVec3 const* self_ = reinterpret_cast<physx::PxVec3 const*>(self__pod);
|
||||
physx::PxVec3 return_val = self_->getNormalized();
|
||||
physx_PxVec3_Pod return_val_pod;
|
||||
@ -311,7 +297,7 @@ extern "C"
|
||||
|
||||
|
||||
|
||||
bool CALL PxSceneQueryExt_raycastAny(physx_PxScene_Pod const* scene_pod, physx_PxVec3_Pod const* origin_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, physx_PxQueryHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod) {
|
||||
EXPORT_API bool CALL PxSceneQueryExt_raycastAny(physx_PxScene_Pod const* scene_pod, physx_PxVec3_Pod const* origin_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, physx_PxQueryHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod) {
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxVec3 const& origin = reinterpret_cast<physx::PxVec3 const&>(*origin_pod);
|
||||
physx::PxVec3 const& unitDir = reinterpret_cast<physx::PxVec3 const&>(*unitDir_pod);
|
||||
@ -324,7 +310,9 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
bool CALL PxSceneQueryExt_raycastSingle(physx_PxScene_Pod const* scene_pod, physx_PxVec3_Pod const* origin_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod, physx_PxRaycastHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod) {
|
||||
EXPORT_API bool CALL PxSceneQueryExt_raycastSingle(physx_PxScene_Pod const* scene_pod, physx_PxVec3_Pod const* origin_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod,
|
||||
physx_PxRaycastHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxVec3 const& origin = reinterpret_cast<physx::PxVec3 const&>(*origin_pod);
|
||||
physx::PxVec3 const& unitDir = reinterpret_cast<physx::PxVec3 const&>(*unitDir_pod);
|
||||
@ -339,7 +327,10 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
int32_t CALL PxSceneQueryExt_raycastMultiple(physx_PxScene_Pod const* scene_pod, physx_PxVec3_Pod const* origin_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod, physx_PxRaycastHit_Pod* hitBuffer_pod, uint32_t hitBufferSize, bool* blockingHit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod) {
|
||||
EXPORT_API int32_t CALL PxSceneQueryExt_raycastMultiple(physx_PxScene_Pod const* scene_pod, physx_PxVec3_Pod const* origin_pod, physx_PxVec3_Pod const* unitDir_pod,
|
||||
float distance, uint16_t outputFlags_pod, physx_PxRaycastHit_Pod* hitBuffer_pod, uint32_t hitBufferSize, bool* blockingHit_pod,
|
||||
physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxVec3 const& origin = reinterpret_cast<physx::PxVec3 const&>(*origin_pod);
|
||||
physx::PxVec3 const& unitDir = reinterpret_cast<physx::PxVec3 const&>(*unitDir_pod);
|
||||
@ -353,7 +344,10 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
bool CALL PxSceneQueryExt_sweepAny(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t queryFlags_pod, physx_PxQueryHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod, float inflation) {
|
||||
EXPORT_API bool CALL PxSceneQueryExt_sweepAny(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod,
|
||||
physx_PxTransform_Pod const* pose_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t queryFlags_pod, physx_PxQueryHit_Pod* hit_pod,
|
||||
physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod, float inflation)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxGeometry const& geometry = reinterpret_cast<physx::PxGeometry const&>(*geometry_pod);
|
||||
physx::PxTransform const& pose = reinterpret_cast<physx::PxTransform const&>(*pose_pod);
|
||||
@ -367,7 +361,10 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
bool CALL PxSceneQueryExt_sweepSingle(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod, physx_PxSweepHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod, float inflation) {
|
||||
EXPORT_API bool CALL PxSceneQueryExt_sweepSingle(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod,
|
||||
physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod, physx_PxSweepHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod,
|
||||
physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod, float inflation)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxGeometry const& geometry = reinterpret_cast<physx::PxGeometry const&>(*geometry_pod);
|
||||
physx::PxTransform const& pose = reinterpret_cast<physx::PxTransform const&>(*pose_pod);
|
||||
@ -381,7 +378,10 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
int32_t CALL PxSceneQueryExt_sweepMultiple(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod, physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod, physx_PxSweepHit_Pod* hitBuffer_pod, uint32_t hitBufferSize, bool* blockingHit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod, float inflation) {
|
||||
EXPORT_API int32_t CALL PxSceneQueryExt_sweepMultiple(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod,
|
||||
physx_PxVec3_Pod const* unitDir_pod, float distance, uint16_t outputFlags_pod, physx_PxSweepHit_Pod* hitBuffer_pod, uint32_t hitBufferSize, bool* blockingHit_pod,
|
||||
physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod, physx_PxQueryCache_Pod const* cache_pod, float inflation)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxGeometry const& geometry = reinterpret_cast<physx::PxGeometry const&>(*geometry_pod);
|
||||
physx::PxTransform const& pose = reinterpret_cast<physx::PxTransform const&>(*pose_pod);
|
||||
@ -396,7 +396,9 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
int32_t CALL PxSceneQueryExt_overlapMultiple(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod, physx_PxOverlapHit_Pod* hitBuffer_pod, uint32_t hitBufferSize, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod) {
|
||||
EXPORT_API int32_t CALL PxSceneQueryExt_overlapMultiple(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod,
|
||||
physx_PxOverlapHit_Pod* hitBuffer_pod, uint32_t hitBufferSize, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxGeometry const& geometry = reinterpret_cast<physx::PxGeometry const&>(*geometry_pod);
|
||||
physx::PxTransform const& pose = reinterpret_cast<physx::PxTransform const&>(*pose_pod);
|
||||
@ -407,7 +409,9 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
bool CALL PxSceneQueryExt_overlapAny(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod, physx_PxTransform_Pod const* pose_pod, physx_PxOverlapHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod) {
|
||||
EXPORT_API bool CALL PxSceneQueryExt_overlapAny(physx_PxScene_Pod const* scene_pod, physx_PxGeometry_Pod const* geometry_pod,
|
||||
physx_PxTransform_Pod const* pose_pod, physx_PxOverlapHit_Pod* hit_pod, physx_PxQueryFilterData_Pod const* filterData_pod, physx_PxQueryFilterCallback_Pod* filterCall_pod)
|
||||
{
|
||||
physx::PxScene const& scene = reinterpret_cast<physx::PxScene const&>(*scene_pod);
|
||||
physx::PxGeometry const& geometry = reinterpret_cast<physx::PxGeometry const&>(*geometry_pod);
|
||||
physx::PxTransform const& pose = reinterpret_cast<physx::PxTransform const&>(*pose_pod);
|
||||
@ -418,7 +422,7 @@ extern "C"
|
||||
return return_val;
|
||||
}
|
||||
|
||||
physx_PxFilterData_Pod CALL PxFilterData_new(int32_t anon_param0_pod) {
|
||||
EXPORT_API physx_PxFilterData_Pod CALL PxFilterData_new(int32_t anon_param0_pod) {
|
||||
auto anon_param0 = static_cast<physx::PxEMPTY>(anon_param0_pod);
|
||||
physx::PxFilterData return_val(anon_param0);
|
||||
physx_PxFilterData_Pod return_val_pod;
|
||||
@ -426,21 +430,21 @@ extern "C"
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxFilterData_Pod CALL PxFilterData_new_1() {
|
||||
EXPORT_API physx_PxFilterData_Pod CALL PxFilterData_new_1() {
|
||||
physx::PxFilterData return_val;
|
||||
physx_PxFilterData_Pod return_val_pod;
|
||||
memcpy(&return_val_pod, &return_val, sizeof(return_val_pod));
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxQueryFilterData_Pod CALL PxQueryFilterData_new() {
|
||||
EXPORT_API physx_PxQueryFilterData_Pod CALL PxQueryFilterData_new() {
|
||||
physx::PxQueryFilterData return_val;
|
||||
physx_PxQueryFilterData_Pod return_val_pod;
|
||||
memcpy(&return_val_pod, &return_val, sizeof(return_val_pod));
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxQueryFilterData_Pod CALL PxQueryFilterData_new_1(physx_PxFilterData_Pod const* fd_pod, uint16_t f_pod) {
|
||||
EXPORT_API physx_PxQueryFilterData_Pod CALL PxQueryFilterData_new_1(physx_PxFilterData_Pod const* fd_pod, uint16_t f_pod) {
|
||||
physx::PxFilterData const& fd = reinterpret_cast<physx::PxFilterData const&>(*fd_pod);
|
||||
auto f = physx::PxQueryFlags(f_pod);
|
||||
physx::PxQueryFilterData return_val(fd, f);
|
||||
@ -449,7 +453,7 @@ extern "C"
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxQueryFilterData_Pod CALL PxQueryFilterData_new_2(uint16_t f_pod) {
|
||||
EXPORT_API physx_PxQueryFilterData_Pod CALL PxQueryFilterData_new_2(uint16_t f_pod) {
|
||||
auto f = physx::PxQueryFlags(f_pod);
|
||||
physx::PxQueryFilterData return_val(f);
|
||||
physx_PxQueryFilterData_Pod return_val_pod;
|
||||
@ -459,7 +463,7 @@ extern "C"
|
||||
|
||||
|
||||
|
||||
bool CALL PxScene_simulate_mut(physx_PxScene_Pod* self__pod, float elapsedTime, physx_PxBaseTask_Pod* completionTask_pod, void* scratchMemBlock, uint32_t scratchMemBlockSize, bool controlSimulation) {
|
||||
EXPORT_API bool CALL PxScene_simulate_mut(physx_PxScene_Pod* self__pod, float elapsedTime, physx_PxBaseTask_Pod* completionTask_pod, void* scratchMemBlock, uint32_t scratchMemBlockSize, bool controlSimulation) {
|
||||
physx::PxScene* self_ = reinterpret_cast<physx::PxScene*>(self__pod);
|
||||
physx::PxBaseTask* completionTask = reinterpret_cast<physx::PxBaseTask*>(completionTask_pod);
|
||||
bool return_val = self_->simulate(elapsedTime, completionTask, scratchMemBlock, scratchMemBlockSize, controlSimulation);
|
||||
@ -467,7 +471,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
bool CALL PxScene_fetchResults_mut(physx_PxScene_Pod* self__pod, bool block, uint32_t* errorState) {
|
||||
EXPORT_API bool CALL PxScene_fetchResults_mut(physx_PxScene_Pod* self__pod, bool block, uint32_t* errorState) {
|
||||
physx::PxScene* self_ = reinterpret_cast<physx::PxScene*>(self__pod);
|
||||
bool return_val = self_->fetchResults(block, errorState);
|
||||
return return_val;
|
||||
@ -475,14 +479,14 @@ extern "C"
|
||||
|
||||
|
||||
////¹¤¾ßº¯Êý
|
||||
physx_PxVec3_Pod CALL PxVec3_new() {
|
||||
EXPORT_API physx_PxVec3_Pod CALL PxVec3_new() {
|
||||
physx::PxVec3 return_val;
|
||||
physx_PxVec3_Pod return_val_pod;
|
||||
memcpy(&return_val_pod, &return_val, sizeof(return_val_pod));
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxVec3_Pod CALL PxVec3_new_1(int32_t anon_param0_pod) {
|
||||
EXPORT_API physx_PxVec3_Pod CALL PxVec3_new_1(int32_t anon_param0_pod) {
|
||||
auto anon_param0 = static_cast<physx::PxZERO>(anon_param0_pod);
|
||||
physx::PxVec3 return_val(anon_param0);
|
||||
physx_PxVec3_Pod return_val_pod;
|
||||
@ -490,51 +494,51 @@ extern "C"
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxVec3_Pod CALL PxVec3_new_2(float a) {
|
||||
EXPORT_API physx_PxVec3_Pod CALL PxVec3_new_2(float a) {
|
||||
physx::PxVec3 return_val(a);
|
||||
physx_PxVec3_Pod return_val_pod;
|
||||
memcpy(&return_val_pod, &return_val, sizeof(return_val_pod));
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
physx_PxVec3_Pod CALL PxVec3_new_3(float nx, float ny, float nz) {
|
||||
EXPORT_API physx_PxVec3_Pod CALL PxVec3_new_3(float nx, float ny, float nz) {
|
||||
physx::PxVec3 return_val(nx, ny, nz);
|
||||
physx_PxVec3_Pod return_val_pod;
|
||||
memcpy(&return_val_pod, &return_val, sizeof(return_val_pod));
|
||||
return return_val_pod;
|
||||
}
|
||||
|
||||
bool CALL PxVec3_isZero(physx_PxVec3_Pod const* self__pod) {
|
||||
EXPORT_API bool CALL PxVec3_isZero(physx_PxVec3_Pod const* self__pod) {
|
||||
physx::PxVec3 const* self_ = reinterpret_cast<physx::PxVec3 const*>(self__pod);
|
||||
bool return_val = self_->isZero();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
bool CALL PxVec3_isFinite(physx_PxVec3_Pod const* self__pod) {
|
||||
EXPORT_API bool CALL PxVec3_isFinite(physx_PxVec3_Pod const* self__pod) {
|
||||
physx::PxVec3 const* self_ = reinterpret_cast<physx::PxVec3 const*>(self__pod);
|
||||
bool return_val = self_->isFinite();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
bool CALL PxVec3_isNormalized(physx_PxVec3_Pod const* self__pod) {
|
||||
EXPORT_API bool CALL PxVec3_isNormalized(physx_PxVec3_Pod const* self__pod) {
|
||||
physx::PxVec3 const* self_ = reinterpret_cast<physx::PxVec3 const*>(self__pod);
|
||||
bool return_val = self_->isNormalized();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
float CALL PxVec3_magnitudeSquared(physx_PxVec3_Pod const* self__pod) {
|
||||
EXPORT_API float CALL PxVec3_magnitudeSquared(physx_PxVec3_Pod const* self__pod) {
|
||||
physx::PxVec3 const* self_ = reinterpret_cast<physx::PxVec3 const*>(self__pod);
|
||||
float return_val = self_->magnitudeSquared();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
float CALL PxVec3_magnitude(physx_PxVec3_Pod const* self__pod) {
|
||||
EXPORT_API float CALL PxVec3_magnitude(physx_PxVec3_Pod const* self__pod) {
|
||||
physx::PxVec3 const* self_ = reinterpret_cast<physx::PxVec3 const*>(self__pod);
|
||||
float return_val = self_->magnitude();
|
||||
return return_val;
|
||||
}
|
||||
|
||||
bool CALL phys_PxFilterObjectIsTrigger(uint32_t attr) {
|
||||
EXPORT_API bool CALL phys_PxFilterObjectIsTrigger(uint32_t attr) {
|
||||
bool return_val = physx::PxFilterObjectIsTrigger(attr);
|
||||
return return_val;
|
||||
}
|
||||
@ -560,7 +564,7 @@ extern "C"
|
||||
bool call_default_filter_shader_first;
|
||||
};
|
||||
|
||||
physx::PxFilterFlags CALL FilterShaderTrampoline(physx::PxFilterObjectAttributes attributes0,
|
||||
EXPORT_API physx::PxFilterFlags CALL FilterShaderTrampoline(physx::PxFilterObjectAttributes attributes0,
|
||||
physx::PxFilterData filterData0,
|
||||
physx::PxFilterObjectAttributes attributes1,
|
||||
physx::PxFilterData filterData1,
|
||||
@ -1031,83 +1035,83 @@ extern "C"
|
||||
// return &gErrorCallback;
|
||||
//}
|
||||
|
||||
physx::PxPhysics* CALL physx_create_physics(physx::PxFoundation* foundation)
|
||||
EXPORT_API physx::PxPhysics* CALL physx_create_physics(physx::PxFoundation* foundation)
|
||||
{
|
||||
return PxCreatePhysics(PX_PHYSICS_VERSION, *foundation, physx::PxTolerancesScale(), true, nullptr, nullptr);
|
||||
}
|
||||
|
||||
physx::PxQueryFilterCallback* CALL create_raycast_filter_callback(physx::PxRigidActor* actor_to_ignore)
|
||||
EXPORT_API physx::PxQueryFilterCallback* CALL create_raycast_filter_callback(physx::PxRigidActor* actor_to_ignore)
|
||||
{
|
||||
return new RaycastFilterCallback(actor_to_ignore);
|
||||
}
|
||||
|
||||
physx::PxQueryFilterCallback* CALL create_raycast_filter_callback_func(RaycastHitCallback callback, void* userData)
|
||||
EXPORT_API physx::PxQueryFilterCallback* CALL create_raycast_filter_callback_func(RaycastHitCallback callback, void* userData)
|
||||
{
|
||||
return new RaycastFilterTrampoline(callback, userData);
|
||||
}
|
||||
|
||||
|
||||
physx::PxQueryFilterCallback* CALL create_pre_and_post_raycast_filter_callback_func(RaycastHitCallback preFilter, PostFilterCallback postFilter, void* userData)
|
||||
EXPORT_API physx::PxQueryFilterCallback* CALL create_pre_and_post_raycast_filter_callback_func(RaycastHitCallback preFilter, PostFilterCallback postFilter, void* userData)
|
||||
{
|
||||
return new RaycastFilterPrePostTrampoline(preFilter, postFilter, userData);
|
||||
}
|
||||
|
||||
|
||||
physx::PxRaycastCallback* create_raycast_callback(
|
||||
EXPORT_API physx::PxRaycastCallback* create_raycast_callback(
|
||||
RaycastHitProcessTouchesCallback process_touches_callback,
|
||||
HitFinalizeQueryCallback finalize_query_callback,
|
||||
physx::PxRaycastHit* touchesBuffer,
|
||||
physx::PxU32 numTouches,
|
||||
void* userdata
|
||||
) {
|
||||
void* userdata )
|
||||
{
|
||||
return new RaycastHitCallbackTrampoline(
|
||||
process_touches_callback, finalize_query_callback, touchesBuffer, numTouches, userdata);
|
||||
}
|
||||
|
||||
void CALL delete_raycast_callback(physx::PxRaycastCallback* callback)
|
||||
EXPORT_API void CALL delete_raycast_callback(physx::PxRaycastCallback* callback)
|
||||
{
|
||||
delete callback;
|
||||
}
|
||||
|
||||
void CALL delete_sweep_callback(physx::PxSweepCallback* callback)
|
||||
EXPORT_API void CALL delete_sweep_callback(physx::PxSweepCallback* callback)
|
||||
{
|
||||
delete callback;
|
||||
}
|
||||
|
||||
void CALL delete_overlap_callback(physx::PxOverlapCallback* callback)
|
||||
EXPORT_API void CALL delete_overlap_callback(physx::PxOverlapCallback* callback)
|
||||
{
|
||||
delete callback;
|
||||
}
|
||||
|
||||
physx::PxSweepCallback* CALL create_sweep_callback(
|
||||
EXPORT_API physx::PxSweepCallback* CALL create_sweep_callback(
|
||||
SweepHitProcessTouchesCallback process_touches_callback,
|
||||
HitFinalizeQueryCallback finalize_query_callback,
|
||||
physx::PxSweepHit* touchesBuffer,
|
||||
physx::PxU32 numTouches,
|
||||
void* userdata
|
||||
) {
|
||||
void* userdata )
|
||||
{
|
||||
return new SweepHitCallbackTrampoline(
|
||||
process_touches_callback, finalize_query_callback, touchesBuffer, numTouches, userdata
|
||||
);
|
||||
}
|
||||
|
||||
physx::PxOverlapCallback* CALL create_overlap_callback(
|
||||
EXPORT_API physx::PxOverlapCallback* CALL create_overlap_callback(
|
||||
OverlapHitProcessTouchesCallback process_touches_callback,
|
||||
HitFinalizeQueryCallback finalize_query_callback,
|
||||
physx::PxOverlapHit* touchesBuffer,
|
||||
physx::PxU32 numTouches,
|
||||
void* userdata
|
||||
) {
|
||||
void* userdata)
|
||||
{
|
||||
return new OverlapHitCallbackTrampoline(
|
||||
process_touches_callback, finalize_query_callback, touchesBuffer, numTouches, userdata
|
||||
);
|
||||
}
|
||||
|
||||
physx::PxAllocatorCallback* CALL create_alloc_callback(
|
||||
EXPORT_API physx::PxAllocatorCallback* CALL create_alloc_callback(
|
||||
AllocCallback alloc_callback,
|
||||
DeallocCallback dealloc_callback,
|
||||
void* userdata
|
||||
) {
|
||||
void* userdata)
|
||||
{
|
||||
return new CustomAllocatorTrampoline(alloc_callback, dealloc_callback, userdata);
|
||||
}
|
||||
|
||||
@ -1116,18 +1120,18 @@ extern "C"
|
||||
return trampoline->mUserData;
|
||||
}
|
||||
|
||||
physx::PxProfilerCallback* CALL create_profiler_callback(
|
||||
EXPORT_API physx::PxProfilerCallback* CALL create_profiler_callback(
|
||||
ZoneStartCallback zone_start_callback,
|
||||
ZoneEndCallback zone_end_callback,
|
||||
void* userdata
|
||||
) {
|
||||
void* userdata)
|
||||
{
|
||||
return new CustomProfilerTrampoline(zone_start_callback, zone_end_callback, userdata);
|
||||
}
|
||||
|
||||
physx::PxErrorCallback* CALL create_error_callback(
|
||||
EXPORT_API physx::PxErrorCallback* CALL create_error_callback(
|
||||
ErrorCallback error_callback,
|
||||
void* userdata
|
||||
) {
|
||||
void* userdata)
|
||||
{
|
||||
return new ErrorTrampoline(error_callback, userdata);
|
||||
}
|
||||
|
||||
@ -1137,43 +1141,43 @@ extern "C"
|
||||
// return new AssertTrampoline(on_assert, userdata);
|
||||
//}
|
||||
|
||||
void* CALL get_default_simulation_filter_shader()
|
||||
EXPORT_API void* CALL get_default_simulation_filter_shader()
|
||||
{
|
||||
return (void*)physx::PxDefaultSimulationFilterShader;
|
||||
}
|
||||
|
||||
|
||||
physx::PxSimulationFilterCallback* CALL create_simulation_filter_callbacks(const SimuliationFilterCallBackInfo* callbacks)
|
||||
EXPORT_API physx::PxSimulationFilterCallback* CALL create_simulation_filter_callbacks(const SimuliationFilterCallBackInfo* callbacks)
|
||||
{
|
||||
SimulationFilterCallBackTrampoline* trampoline = new SimulationFilterCallBackTrampoline(callbacks);
|
||||
return static_cast<physx::PxSimulationFilterCallback*>(trampoline);
|
||||
}
|
||||
|
||||
void CALL destroy_simulation_filter_callbacks(physx::PxSimulationFilterCallback* callback)
|
||||
EXPORT_API void CALL destroy_simulation_filter_callbacks(physx::PxSimulationFilterCallback* callback)
|
||||
{
|
||||
SimulationFilterCallBackTrampoline* trampoline = static_cast<SimulationFilterCallBackTrampoline*>(callback);
|
||||
delete trampoline;
|
||||
}
|
||||
|
||||
physx::PxSimulationEventCallback* CALL create_simulation_event_callbacks(const SimulationEventCallbackInfo* callbacks)
|
||||
EXPORT_API physx::PxSimulationEventCallback* CALL create_simulation_event_callbacks(const SimulationEventCallbackInfo* callbacks)
|
||||
{
|
||||
SimulationEventTrampoline* trampoline = new SimulationEventTrampoline(callbacks);
|
||||
return static_cast<physx::PxSimulationEventCallback*>(trampoline);
|
||||
}
|
||||
|
||||
SimulationEventCallbackInfo* CALL get_simulation_event_info(physx::PxSimulationEventCallback* callback)
|
||||
EXPORT_API SimulationEventCallbackInfo* CALL get_simulation_event_info(physx::PxSimulationEventCallback* callback)
|
||||
{
|
||||
SimulationEventTrampoline* trampoline = static_cast<SimulationEventTrampoline*>(callback);
|
||||
return &trampoline->mCallbacks;
|
||||
}
|
||||
|
||||
void CALL destroy_simulation_event_callbacks(physx::PxSimulationEventCallback* callback)
|
||||
EXPORT_API void CALL destroy_simulation_event_callbacks(physx::PxSimulationEventCallback* callback)
|
||||
{
|
||||
SimulationEventTrampoline* trampoline = static_cast<SimulationEventTrampoline*>(callback);
|
||||
delete trampoline;
|
||||
}
|
||||
|
||||
void CALL enable_custom_filter_shader(physx::PxSceneDesc* desc, SimulationShaderFilter filter, uint32_t call_default_filter_shader_first)
|
||||
EXPORT_API void CALL enable_custom_filter_shader(physx::PxSceneDesc* desc, SimulationShaderFilter filter, uint32_t call_default_filter_shader_first)
|
||||
{
|
||||
/* Note: This is a workaround to PhysX copying the filter data */
|
||||
static FilterCallbackData filterShaderData = {
|
||||
@ -1185,14 +1189,7 @@ extern "C"
|
||||
desc->filterShaderData = (void*)&filterShaderData;
|
||||
desc->filterShaderDataSize = sizeof(FilterCallbackData);
|
||||
}
|
||||
|
||||
//// Not generated, used only for testing and examples!
|
||||
//void PxAssertHandler_opCall_mut(physx_PxErrorCallback_Pod* self__pod, char const* expr, char const* file, int32_t line, bool* ignore) {
|
||||
// physx::PxAssertHandler* self_ = reinterpret_cast<physx::PxAssertHandler*>(self__pod);
|
||||
// (*self_)(expr, file, line, *ignore);
|
||||
//};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
|
Binary file not shown.
@ -1,11 +1,16 @@
|
||||
d:\work\physxcdll\x64\debug\physxcdll.pdb
|
||||
d:\work\physxcdll\x64\debug\physxcdll.idb
|
||||
d:\work\physxcdll\x64\debug\vc143.pdb
|
||||
d:\work\physxcdll\x64\debug\vc143.idb
|
||||
d:\work\physxcdll\x64\debug\main.obj
|
||||
d:\work\physxcdll\x64\debug\physxcdll.ilk
|
||||
d:\work\physxcdll\x64\debug\physxcdll.dll
|
||||
d:\work\physxcdll\x64\debug\physxcdll.pdb
|
||||
d:\work\physxcdll\x64\debug\physxcdll.lib
|
||||
d:\work\physxcdll\x64\debug\physxcdll.exp
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\cl.command.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\cl.items.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\cl.read.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\cl.write.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\lib-link.read.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\lib-link.write.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\lib.command.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\link.command.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\link.read.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\link.write.1.tlog
|
||||
d:\work\physxcdll\x64\debug\physxcdll.tlog\link.write.2u.tlog
|
||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
main.cpp
|
||||
D:\work\physxCDLL\physxApi.hpp(28,10): warning C4067: 预处理器指令后有意外标记 - 应输入换行符
|
||||
D:\work\physxCDLL\physxApi.hpp(570,5): warning C4190: “FilterShaderTrampoline”有指定的 C 链接,但返回了与 C 不兼容的 UDT“physx::PxFlags<physx::PxFilterFlag::Enum,physx::PxU16>”
|
||||
D:\work\physxCDLL\physxApi.hpp(16,10): warning C4067: 预处理器指令后有意外标记 - 应输入换行符
|
||||
D:\work\physxCDLL\physxApi.hpp(576,5): warning C4190: “FilterShaderTrampoline”有指定的 C 链接,但返回了与 C 不兼容的 UDT“physx::PxFlags<physx::PxFilterFlag::Enum,physx::PxU16>”
|
||||
D:\work\PhysxCDLL\include\PxFiltering.h(353,9): message : 参见“physx::PxFlags<physx::PxFilterFlag::Enum,physx::PxU16>”的声明
|
||||
LINK : 没有找到 D:\work\physxCDLL\x64\Debug\physxCDLL.exe 或上一个增量链接没有生成它;正在执行完全链接
|
||||
physxCDLL.vcxproj -> D:\work\physxCDLL\x64\Debug\physxCDLL.exe
|
||||
正在创建库 D:\work\physxCDLL\x64\Debug\physxCDLL.lib 和对象 D:\work\physxCDLL\x64\Debug\physxCDLL.exp
|
||||
physxCDLL.vcxproj -> D:\work\physxCDLL\x64\Debug\physxCDLL.dll
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
D:\work\physxCDLL\x64\Debug\physxCDLL.exe
|
||||
D:\work\physxCDLL\x64\Debug\physxCDLL.dll
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user