![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <PhysXSceneInterface.h>
Public Member Functions | |
PhysXSceneInterface (Scene &parentScene) | |
virtual | ~PhysXSceneInterface () override |
bool | init () override |
Pre PHYSICS_DEVICE initialisation call. | |
bool | isInit () const noexcept override |
Should return true if init() was called successfully. | |
void | idle () override |
Custom physics idle calls. | |
void | release () override |
Called on interface destruction. | |
void | frameStarted (U64 deltaTimeGameUS) override |
Custom process step. | |
void | frameEnded (U64 deltaTimeGameUS) override |
Physics update callback for custom behavior. | |
void | addRigidActor (PhysXActor *actor) |
void | updateRigidActor (physx::PxRigidActor *oldActor, physx::PxRigidActor *newActor) const |
physx::PxScene * | getPhysXScene () const noexcept |
bool | intersect (const Ray &intersectionRay, vec2< F32 > range, vector< SGNRayResult > &intersectionsOut) const |
![]() | |
PhysicsSceneInterface (Scene &parentScene) | |
virtual bool | init ()=0 |
Pre PHYSICS_DEVICE initialisation call. | |
virtual bool | isInit () const =0 |
Should return true if init() was called successfully. | |
virtual void | release ()=0 |
Called on interface destruction. | |
virtual void | idle ()=0 |
Custom physics idle calls. | |
virtual void | frameStarted (U64 deltaTimeGameUS)=0 |
Custom process step. | |
virtual void | frameEnded (U64 deltaTimeGameUS)=0 |
Physics update callback for custom behavior. | |
![]() | |
SceneComponent (Scene &parentScene) noexcept | |
Scene & | parentScene () noexcept |
const Scene & | parentScene () const noexcept |
![]() | |
GUIDWrapper () noexcept | |
GUIDWrapper (const GUIDWrapper &old) noexcept | |
GUIDWrapper (GUIDWrapper &&old) noexcept | |
virtual | ~GUIDWrapper ()=default |
FORCE_INLINE I64 | getGUID () const noexcept |
GUIDWrapper & | operator= (const GUIDWrapper &old)=delete |
GUIDWrapper & | operator= (GUIDWrapper &&other)=delete |
Static Protected Member Functions | |
static void | UpdateActor (physx::PxActor *actor) |
Private Types | |
using | LoadQueue = moodycamel::ConcurrentQueue< PhysXActor * > |
using | RigidMap = vector< PhysXActor * > |
Private Attributes | |
physx::PxScene * | _gScene = nullptr |
physx::PxDefaultCpuDispatcher * | _cpuDispatcher = nullptr |
RigidMap | _sceneRigidActors |
std::atomic_bool | _rigidActorsQueued {false} |
std::atomic_bool | _physxResultsPending {false} |
LoadQueue | _sceneRigidQueue |
Additional Inherited Members | |
![]() | |
static I64 | generateGUID () noexcept |
![]() | |
Scene & | _parentScene |
![]() | |
const I64 | _guid |
Definition at line 49 of file PhysXSceneInterface.h.
|
private |
Definition at line 50 of file PhysXSceneInterface.h.
|
private |
Definition at line 73 of file PhysXSceneInterface.h.
Divide::PhysXSceneInterface::PhysXSceneInterface | ( | Scene & | parentScene | ) |
Definition at line 61 of file PhysXSceneInterface.cpp.
|
overridevirtual |
Definition at line 66 of file PhysXSceneInterface.cpp.
void Divide::PhysXSceneInterface::addRigidActor | ( | PhysXActor * | actor | ) |
Definition at line 266 of file PhysXSceneInterface.cpp.
|
overridevirtual |
Physics update callback for custom behavior.
Implements Divide::PhysicsSceneInterface.
Definition at line 199 of file PhysXSceneInterface.cpp.
|
overridevirtual |
Custom process step.
Implements Divide::PhysicsSceneInterface.
Definition at line 255 of file PhysXSceneInterface.cpp.
|
inlinenoexcept |
Definition at line 66 of file PhysXSceneInterface.h.
|
overridevirtual |
Custom physics idle calls.
Implements Divide::PhysicsSceneInterface.
Definition at line 168 of file PhysXSceneInterface.cpp.
|
overridevirtual |
Pre PHYSICS_DEVICE initialisation call.
Implements Divide::PhysicsSceneInterface.
Definition at line 71 of file PhysXSceneInterface.cpp.
bool Divide::PhysXSceneInterface::intersect | ( | const Ray & | intersectionRay, |
vec2< F32 > | range, | ||
vector< SGNRayResult > & | intersectionsOut | ||
) | const |
Definition at line 286 of file PhysXSceneInterface.cpp.
|
overridevirtualnoexcept |
Should return true if init() was called successfully.
Implements Divide::PhysicsSceneInterface.
Definition at line 152 of file PhysXSceneInterface.cpp.
|
overridevirtual |
Called on interface destruction.
Implements Divide::PhysicsSceneInterface.
Definition at line 158 of file PhysXSceneInterface.cpp.
|
staticprotected |
Definition at line 242 of file PhysXSceneInterface.cpp.
void Divide::PhysXSceneInterface::updateRigidActor | ( | physx::PxRigidActor * | oldActor, |
physx::PxRigidActor * | newActor | ||
) | const |
Definition at line 274 of file PhysXSceneInterface.cpp.
|
private |
Definition at line 75 of file PhysXSceneInterface.h.
|
private |
Definition at line 74 of file PhysXSceneInterface.h.
|
private |
Definition at line 79 of file PhysXSceneInterface.h.
|
private |
Definition at line 78 of file PhysXSceneInterface.h.
|
private |
Definition at line 76 of file PhysXSceneInterface.h.
|
private |
Definition at line 81 of file PhysXSceneInterface.h.