forked from webaverse-studios/avatars-wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
physics-base.h
29 lines (22 loc) · 1.05 KB
/
physics-base.h
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
#ifndef _PHYSICS_BASE_H_
#define _PHYSICS_BASE_H_
#include "physics.h"
#include "physx.h"
// #include <string>
// #include <iostream>
using namespace physx;
class PBase {
public:
PBase();
~PBase();
PxTolerancesScale tolerancesScale;
PxDefaultAllocator *allocator = nullptr;
PxDefaultErrorCallback *errorCallback = nullptr;
PxFoundation *foundation = nullptr;
PxCooking *cooking = nullptr;
void cookGeometry(float *positions, unsigned int *indices, unsigned int numPositions, unsigned int numIndices, uint8_t **data, unsigned int *length, PxDefaultMemoryOutputStream **writeStream);
void cookConvexGeometry(float *positions, unsigned int *indices, unsigned int numPositions, unsigned int numIndices, uint8_t **data, unsigned int *length, PxDefaultMemoryOutputStream **writeStream);
void cookHeightFieldGeometry(unsigned int numRows, unsigned int numColumns, int16_t *scratchStack, uint8_t **data, unsigned int *length, PxDefaultMemoryOutputStream **writeStream);
};
extern PBase *physicsBase;
#endif // _PHYSICS_BASE_H_