10#include "PhysXDefines.h"
11#include <PxQueryReport.h>
13#include "PhysicsCollider.hpp"
14#include "PhysicsTaskDispatcher.hpp"
15#include <PxPhysicsAPI.h>
16#include <PxFiltering.h>
32 struct PhysicsBodyComponent;
46 World* owner =
nullptr;
49 void DeallocatePhysx();
52 void setupFiltering(
physx::PxRigidActor* actor, physx::PxU32 filterGroup, physx::PxU32 filterMask);
63 constexpr static float max_step_time = 1.f/30;
73 void Spawn( PhysicsBodyComponent&);
74 void Destroy( PhysicsBodyComponent&);
76 void Tick(
float deltaTime);
78 static void ReleaseStatics();
88 decimalType hitDistance{};
Definition PhysicsBodyComponent.hpp:41
Definition PhysicsSolver.hpp:34
void Tick(float deltaTime)
Definition PhysicsSolver.cpp:220
virtual void onContact(const physx::PxContactPairHeader &pairHeader, const physx::PxContactPair *pairs, physx::PxU32 nbPairs) override
This is called when certain contact events occur.
Definition PhysicsSolver.cpp:54
virtual void onAdvance(const physx::PxRigidBody *const *bodyBuffer, const physx::PxTransform *poseBuffer, const physx::PxU32 count) override
Provides early access to the new pose of moving rigid bodies.
Definition PhysicsSolver.hpp:60
virtual void onTrigger(physx::PxTriggerPair *pairs, physx::PxU32 count) override
This is called with the current trigger pair events.
Definition PhysicsSolver.cpp:108
virtual void onConstraintBreak(physx::PxConstraintInfo *constraints, physx::PxU32 count) override
This is called when a breakable constraint breaks.
Definition PhysicsSolver.hpp:55
bool SphereOverlap(const vector3 &origin, decimalType radius, OverlapHit &out_hit)
Definition PhysicsSolver.cpp:173
bool Raycast(const vector3 &origin, const vector3 &direction, decimalType maxDistance, RaycastHit &out_hit)
Definition PhysicsSolver.cpp:158
virtual void onWake(physx::PxActor **actors, physx::PxU32 count) override
This is called with the actors which have just been woken up.
Definition PhysicsSolver.hpp:56
void Spawn(PhysicsBodyComponent &)
Definition PhysicsSolver.cpp:196
void Destroy(PhysicsBodyComponent &)
Definition PhysicsSolver.cpp:210
bool BoxOverlap(const vector3 &origin, const quaternion &rotation, const vector3 &half_ext, OverlapHit &out_hit)
Definition PhysicsSolver.cpp:168
bool generic_overlap(const PhysicsTransform &transform, const physx::PxGeometry &geo, OverlapHit &out_hit)
Definition PhysicsSolver.cpp:183
virtual void onSleep(physx::PxActor **actors, physx::PxU32 count) override
This is called with the actors which have just been put to sleep.
Definition PhysicsSolver.hpp:57
bool CapsuleOverlap(const vector3 &origin, const quaternion &rotation, decimalType radius, decimalType halfheight, OverlapHit &out_hit)
Definition PhysicsSolver.cpp:178
Definition PhysicsTaskDispatcher.hpp:6
Definition concurrentqueue.h:747
PxActor is the base class for the main simulation objects in the physics SDK.
Definition PxActor.h:201
Provides methods to cook (where cooking means to prepare the data and convert it to the right format ...
Definition PxCooking.h:337
default implementation of the allocator interface required by the SDK
Definition PxDefaultAllocator.h:88
default implementation of the error callback
Definition PxDefaultErrorCallback.h:52
Foundation SDK singleton class.
Definition PxFoundation.h:57
A geometry object.
Definition PxGeometry.h:79
Abstract singleton factory class used for instancing objects in the Physics SDK.
Definition PxPhysics.h:91
PxPvd is the top-level class for the PVD framework, and the main customer interface for PVD configura...
Definition PxPvd.h:114
PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD...
Definition PxRigidActor.h:53
PxRigidBody is a base class shared between dynamic rigid body objects.
Definition PxRigidBody.h:199
A scene is a collection of bodies and constraints which can interact.
Definition PxScene.h:178
An interface class that the user can implement in order to receive simulation events.
Definition PxSimulationEventCallback.h:792
Definition Animation.hpp:6
Definition PhysicsSolver.hpp:21
Definition PhysicsSolver.hpp:105
Definition PhysicsSolver.hpp:81
Definition type_quat.hpp:20
Definition qualifier.hpp:35
Descriptor for a broken constraint.
Definition PxSimulationEventCallback.h:765
Descriptor for a trigger pair.
Definition PxSimulationEventCallback.h:745