PvdSceneClient

This commit is contained in:
bloeys
2022-01-17 19:37:00 +04:00
parent 6fe8f6eba1
commit c3c74b46a4
11 changed files with 161 additions and 1 deletions

19
pgo/physx-c/CPxActor.h Executable file
View File

@ -0,0 +1,19 @@
#ifndef CPxActor_H
#define CPxActor_H
#ifdef __cplusplus
extern "C" {
#endif
struct CPxActor
{
void* obj;
};
CPxAPI void CPxActor_release(CSTRUCT CPxActor*);
#ifdef __cplusplus
}
#endif
#endif // !CPxActor_H

19
pgo/physx-c/CPxMaterial.h Executable file
View File

@ -0,0 +1,19 @@
#ifndef CPxMaterial_H
#define CPxMaterial_H
#ifdef __cplusplus
extern "C" {
#endif
struct CPxMaterial
{
void* obj;
};
CPxAPI void CPxMaterial_release(CSTRUCT CPxMaterial*);
#ifdef __cplusplus
}
#endif
#endif // !CPxMaterial_H

View File

@ -5,6 +5,7 @@
#include "CPxFoundation.h"
#include "CPxScene.h"
#include "CPxSceneDesc.h"
#include "CPxMaterial.h"
#include "CPxTolerancesScale.h"
#ifdef __cplusplus
@ -17,6 +18,7 @@ extern "C" {
CPxAPI CSTRUCT CPxPhysics* CPxCreatePhysics(CSTRUCT CPxFoundation* cfoundation, CSTRUCT CPxTolerancesScale cscale, bool trackOutstandingAllocations, CSTRUCT CPxPvd* cpvd);
CPxAPI CSTRUCT CPxScene* CPxPhysics_createScene(CSTRUCT CPxPhysics*, CSTRUCT CPxSceneDesc*);
CPxAPI CSTRUCT CPxMaterial* CPxPhysics_createMaterial(CSTRUCT CPxPhysics*, CPxReal staticFriction, CPxReal dynamicFriction, CPxReal restitution);
CPxAPI void CPxPhysics_release(CSTRUCT CPxPhysics*);
#ifdef __cplusplus

20
pgo/physx-c/CPxPlane.h Executable file
View File

@ -0,0 +1,20 @@
#ifndef CPxPlane_H
#define CPxPlane_H
#ifdef __cplusplus
extern "C" {
#endif
struct CPxPlane
{
void* obj;
};
CPxAPI CSTRUCT CPxPlane* NewCPxPlane(float nx, float ny, float nz, float distance);
CPxAPI void CPxPlane_release(CSTRUCT CPxPlane*);
#ifdef __cplusplus
}
#endif
#endif // !CPxPlane_H

33
pgo/physx-c/CPxPvdSceneClient.h Executable file
View File

@ -0,0 +1,33 @@
#ifndef CPxPvdSceneClient_H
#define CPxPvdSceneClient_H
#ifdef __cplusplus
extern "C" {
#endif
enum CPxPvdSceneFlag
{
CPxPvdSceneFlag_eTRANSMIT_CONTACTS = (1 << 0), //Transmits contact stream to PVD.
CPxPvdSceneFlag_eTRANSMIT_SCENEQUERIES = (1 << 1), //Transmits scene query stream to PVD.
CPxPvdSceneFlag_eTRANSMIT_CONSTRAINTS = (1 << 2) //Transmits constraints visualize stream to PVD.
};
struct CPxPvdSceneClient
{
void* obj;
};
CPxAPI void CPxPvdSceneClient_setScenePvdFlag(CSTRUCT CPxPvdSceneClient* c, CENUM CPxPvdSceneFlag flag, bool value);
/// <summary>
/// This only releases the C struct
/// </summary>
/// <param name=""></param>
/// <returns></returns>
CPxAPI void CPxPvdSceneClient_release(CSTRUCT CPxPvdSceneClient*);
#ifdef __cplusplus
}
#endif
#endif // !CPxPvdSceneClient_H

25
pgo/physx-c/CPxRigidStatic.h Executable file
View File

@ -0,0 +1,25 @@
#ifndef CPxRigidStatic_H
#define CPxRigidStatic_H
#include "CPxPhysics.h"
#include "CPxPlane.h"
#include "CPxMaterial.h"
#include "CPxActor.h"
#ifdef __cplusplus
extern "C" {
#endif
struct CPxRigidStatic
{
void* obj;
};
CPxAPI CSTRUCT CPxRigidStatic* CPxCreatePlane(CSTRUCT CPxPhysics* sdk, CSTRUCT CPxPlane* plane, CSTRUCT CPxMaterial* material);
CPxAPI CSTRUCT CPxActor* CPxRigidStatic_toCPxActor(CSTRUCT CPxRigidStatic*);
#ifdef __cplusplus
}
#endif
#endif // !CPxRigidStatic_H

View File

@ -1,6 +1,9 @@
#ifndef CPxScene_H
#define CPxScene_H
#include "CPxPvdSceneClient.h"
#include "CPxActor.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -10,6 +13,9 @@ extern "C" {
void* obj;
};
CPxAPI CSTRUCT CPxPvdSceneClient* CPxScene_getScenePvdClient(CSTRUCT CPxScene*);
CPxAPI void CPxScene_addActor(CSTRUCT CPxScene*, CSTRUCT CPxActor* actor);
CPxAPI void CPxScene_release(CSTRUCT CPxScene*);
#ifdef __cplusplus