27#include "foundation/Px.h"
28#include "foundation/PxSimpleTypes.h"
32 namespace SnippetUtils
36 void setRotX(PxMat33& m, PxReal angle);
37 void setRotY(PxMat33& m, PxReal angle);
38 void setRotZ(PxMat33& m, PxReal angle);
40 PxQuat getRotXQuat(
float angle);
41 PxQuat getRotYQuat(
float angle);
42 PxQuat getRotZQuat(
float angle);
54 PxU32 randomize() { mRnd = mRnd * 2147001325 + 715136305;
return mRnd; }
59 PxF32 rand(PxF32 a, PxF32 b)
61 const PxF32 r = rand32()/(
static_cast<PxF32
>(0xffffffff));
65 PxI32 rand(PxI32 a, PxI32 b)
67 return a +
static_cast<PxI32
>(rand32()%(b-a));
72 return rand()/(
static_cast<PxF32
>(0xffff)) - 0.5f;
76 return rand32()/(
static_cast<PxF32
>(0xffffffff)) - 0.5f;
79 PxF32 randomFloat32(PxReal a, PxReal b) {
return rand32()/PxF32(0xffffffff)*(b-a)+a; }
91 PxU32 Bunny_getNbVerts();
92 PxU32 Bunny_getNbFaces();
93 const PxVec3* Bunny_getVerts();
94 const PxU32* Bunny_getFaces();
99 PxI32 atomicIncrement(
volatile PxI32* val);
102 PxI32 atomicDecrement(
volatile PxI32* val);
107 PxU32 getNbPhysicalCores();
117 PxU64 getCurrentTimeCounterValue();
120 PxReal getElapsedTimeInMilliseconds(
const PxU64 elapsedTime);
123 PxReal getElapsedTimeInMicroSeconds(
const PxU64 elapsedTime);
133 void syncWait(
Sync* sync);
136 void syncSet(
Sync* sync);
139 void syncReset(
Sync* sync);
142 void syncRelease(
Sync* sync);
149 typedef void (*ThreadEntryPoint)(
void*);
153 Thread* threadCreate(ThreadEntryPoint entryPoint,
void* data);
156 void threadQuit(
Thread* thread);
160 void threadSignalQuit(
Thread* thread);
164 bool threadWaitForQuit(
Thread* thread);
168 bool threadQuitIsSignalled(
Thread* thread);
171 void threadRelease(
Thread* thread);
178 Mutex* mutexCreate();
181 void mutexLock(
Mutex* mutex);
184 void mutexUnlock(
Mutex* mutex);
187 void mutexRelease(
Mutex* mutex);
This is a quaternion class. For more information on quaternion mathematics consult a mathematics sour...
Definition PxQuat.h:50
3 Element vector class.
Definition PxVec3.h:50
Definition SnippetUtils.h:47
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition SnippetUtils.cpp:279
Definition SnippetUtils.cpp:195
Definition SnippetUtils.cpp:226