-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPxShape.cpp
More file actions
executable file
·30 lines (25 loc) · 942 Bytes
/
CPxShape.cpp
File metadata and controls
executable file
·30 lines (25 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "PxPhysicsAPI.h"
#include "CPxShape.h"
#include "CPxTransformHelpers.h"
void CPxShape_setLocalPose(CPxShape cs, CPxTransform* tr)
{
static_cast<physx::PxShape*>(cs.obj)->setLocalPose(CPxTransform_toPxTransform(*tr));
}
CPxTransform CPxShape_getLocalPose(CPxShape cs)
{
return PxTransform_toCPxTransform(static_cast<physx::PxShape*>(cs.obj)->getLocalPose());
}
CPxFilterData CPxShape_getSimulationFilterData(CPxShape cs)
{
auto physxFilterData = static_cast<physx::PxShape*>(cs.obj)->getSimulationFilterData();
CPxFilterData cfd;
cfd.word0 = physxFilterData.word0;
cfd.word1 = physxFilterData.word1;
cfd.word2 = physxFilterData.word2;
cfd.word3 = physxFilterData.word3;
return cfd;
}
void CPxShape_setSimulationFilterData(CPxShape cs, CPxFilterData* cfd)
{
static_cast<physx::PxShape*>(cs.obj)->setSimulationFilterData(physx::PxFilterData(cfd->word0, cfd->word1, cfd->word2, cfd->word3));
}