![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <PXDevice.h>
Public Types | |
enum class | PhysicsAPI : U8 { PhysX = 0 , ODE , Bullet , COUNT } |
Public Member Functions | |
PXDevice (PlatformContext &context) noexcept | |
~PXDevice () override | |
ErrorCode | initPhysicsAPI (U8 targetFrameRate, F32 simSpeed) override |
bool | closePhysicsAPI () override |
void | updateTimeStep (U8 timeStepFactor, F32 simSpeed) override |
void | idle () override |
bool | convertActor (PhysicsAsset *actor, PhysicsGroup newGroup) override |
bool | initPhysicsScene (Scene &scene) override |
bool | destroyPhysicsScene (const Scene &scene) override |
PhysicsAsset * | createRigidActor (SceneGraphNode *node, RigidBodyComponent &parentComp) override |
PhysicsAPIWrapper & | getImpl () |
const PhysicsAPIWrapper & | getImpl () const |
bool | intersect (const Ray &intersectionRay, vec2< F32 > range, vector< SGNRayResult > &intersectionsOut) const override |
bool | frameStarted (const FrameEvent &evt) override |
bool | frameEnded (const FrameEvent &evt) noexcept override |
frameEnded is called after the buffers have been swapped | |
PROPERTY_RW (PhysicsAPI, apiID, PhysicsAPI::COUNT) | |
![]() | |
PhysicsAPIWrapper (PlatformContext &context) | |
virtual bool | convertActor (PhysicsAsset *actor, PhysicsGroup newGroup)=0 |
![]() | |
PlatformContextComponent (PlatformContext &context) noexcept | |
virtual | ~PlatformContextComponent ()=default |
PlatformContext & | context () noexcept |
const PlatformContext & | context () const noexcept |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
![]() | |
FrameListener (const Str< 64 > &name, FrameListenerManager &parent, U32 callOrder) | |
Either give it a name. | |
virtual | ~FrameListener () override |
bool | operator< (FrameListener &that) 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 |
Protected Member Functions | |
void | frameStarted (U64 deltaTimeGameUS) override |
void | frameEnded (U64 deltaTimeGameUS) noexcept override |
virtual ErrorCode | initPhysicsAPI (U8 targetFrameRate, F32 simSpeed)=0 |
virtual bool | closePhysicsAPI ()=0 |
virtual void | updateTimeStep (U8 timeStepFactor, F32 simSpeed)=0 |
virtual void | idle ()=0 |
virtual bool | initPhysicsScene (Scene &scene)=0 |
virtual bool | destroyPhysicsScene (const Scene &scene)=0 |
virtual void | frameStarted (const U64 deltaTimeGameUS)=0 |
virtual void | frameEnded (const U64 deltaTimeGameUS)=0 |
virtual PhysicsAsset * | createRigidActor (SceneGraphNode *node, RigidBodyComponent &parentComp)=0 |
virtual bool | intersect (const Ray &intersectionRay, vec2< F32 > range, vector< SGNRayResult > &intersectionsOut) const =0 |
![]() | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
![]() | |
void | setCallOrder (const U32 order) noexcept |
virtual bool | frameStarted (const FrameEvent &evt) |
virtual bool | framePreRender (const FrameEvent &evt) |
framePreRenderStarted is called when we need to start processing the visual aspect of a scene | |
virtual bool | frameSceneRenderStarted (const FrameEvent &evt) |
frameSceneRenderStarted is called right before rendering the scene for the current player starts | |
virtual bool | frameSceneRenderEnded (const FrameEvent &evt) |
frameSceneRenderEnded is called immediately after scene rendering for the current player has ended but before any blitting operations | |
virtual bool | frameRenderingQueued (const FrameEvent &evt) |
virtual bool | framePostRender (const FrameEvent &evt) |
virtual bool | frameEnded (const FrameEvent &evt) |
frameEnded is called after the buffers have been swapped | |
PROPERTY_R_IW (bool, enabled, false) | |
PROPERTY_RW (Str< 64 >, name) | |
Private Attributes | |
F32 | _simulationSpeed = 1.0f |
PhysicsAPIWrapper_uptr | _api = nullptr |
Additional Inherited Members | |
![]() | |
static I64 | generateGUID () noexcept |
![]() | |
PlatformContext & | _context |
![]() | |
const I64 | _guid |
Definition at line 43 of file PXDevice.h.
|
strong |
Enumerator | |
---|---|
PhysX | |
ODE | |
Bullet | |
COUNT |
Definition at line 46 of file PXDevice.h.
|
explicitnoexcept |
Definition at line 22 of file PXDevice.cpp.
|
override |
Definition at line 28 of file PXDevice.cpp.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 55 of file PXDevice.cpp.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 124 of file PXDevice.cpp.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 118 of file PXDevice.cpp.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 113 of file PXDevice.cpp.
|
overridevirtualnoexcept |
frameEnded is called after the buffers have been swapped
Reimplemented from Divide::FrameListener.
Definition at line 75 of file PXDevice.cpp.
|
overrideprotectedvirtualnoexcept |
Implements Divide::PhysicsAPIWrapper.
Definition at line 83 of file PXDevice.cpp.
|
overridevirtual |
Adapter patern instead of pure interface for the same reason as the Ogre boys pointed out: Implement what you need without filling classes with dummy functions frameStarted is calld at the beggining of a new frame before processing the logic aspect of a scene
Reimplemented from Divide::FrameListener.
Definition at line 88 of file PXDevice.cpp.
|
overrideprotectedvirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 96 of file PXDevice.cpp.
|
inline |
Definition at line 68 of file PXDevice.h.
|
inline |
Definition at line 69 of file PXDevice.h.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 101 of file PXDevice.cpp.
Implements Divide::PhysicsAPIWrapper.
Definition at line 33 of file PXDevice.cpp.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 108 of file PXDevice.cpp.
|
overridevirtual |
Implements Divide::PhysicsAPIWrapper.
Definition at line 130 of file PXDevice.cpp.
Divide::PXDevice::PROPERTY_RW | ( | PhysicsAPI | , |
apiID | , | ||
PhysicsAPI::COUNT | |||
) |
Implements Divide::PhysicsAPIWrapper.
Definition at line 69 of file PXDevice.cpp.
|
private |
Definition at line 84 of file PXDevice.h.
|
private |
Definition at line 83 of file PXDevice.h.