17#include "basegamefeature/components/basegamefeature.h"
22#include "components/physicsfeature.h"
107 template <
typename COMPONENT_TYPE>
111 template <
typename COMPONENT_TYPE>
131template <
typename COMPONENT_TYPE>
143template <
typename COMPONENT_TYPE>
The main programming interface for the Game Subsystem.
__DeclareClass(RefCounted)
Managers are objects which care about some specific functionality of a feature.
Definition manager.h:32
A container of entities, their components, and processors.
Definition world.h:92
Basically a bitfield with packed ComponentIds.
Definition tablesignature.h:26
Definition physicsmanager.h:42
void OnDecay() override
An entity whose handle goes away takes its physx actor with it.
Definition physicsmanager.cc:1138
static Physics::ShapeId GetShapeForEntity(Game::World *, Game::Entity)
Definition physicsmanager.cc:375
static void InitSphereCollider(Game::World *, Game::Entity, PhysicsFeature::SphereCollider *)
Definition physicsmanager.cc:1085
void OnDeactivate() override
called when removed from game server
Definition physicsmanager.cc:1296
static void InitRigidbody(Game::World *, Game::Entity, PhysicsFeature::Rigidbody *)
Definition physicsmanager.cc:1057
static void InitCapsuleCollider(Game::World *, Game::Entity, PhysicsFeature::CapsuleCollider *)
Definition physicsmanager.cc:1095
static void InitHeightFieldCollider(Game::World *, Game::Entity, PhysicsFeature::HeightFieldCollider *)
Definition physicsmanager.cc:1125
static void MarkBodyChanged(Game::World *, Game::Entity)
the body component of the entity changed: actor type, mass, damping, gravity, ccd,...
Definition physicsmanager.cc:148
static void InitPhysicsResource(Game::World *, Game::Entity, PhysicsFeature::PhysicsResource *)
Definition physicsmanager.cc:1048
static void MarkComponentChange(Game::World *, Game::Entity, Game::ComponentId)
the value of a component was written on an entity which already has a handle.
Definition physicsmanager.cc:166
static void InitPhysicsActor(Game::World *, Game::Entity, PhysicsFeature::PhysicsActor *)
Definition physicsmanager.cc:1019
static void InitMeshCollider(Game::World *, Game::Entity, PhysicsFeature::MeshCollider *)
Definition physicsmanager.cc:1115
static void MarkPoseChanged(Game::World *, Game::Entity)
the entity moved.
Definition physicsmanager.cc:157
void InitPhysicsFrameEvent()
builds the processors and callbacks of the physics frame event.
Definition physicsmanager.cc:1245
static void MarkShapeChanged(Game::World *, Game::Entity)
the collider components of the entity were changed, or added to an entity which already had a handle.
Definition physicsmanager.cc:136
static bool HasCollider(Game::World *, Game::Entity)
true when the entity has any of the collider components
Definition physicsmanager.cc:335
static void OnBodyComponentDecay(Game::World *, Game::Entity, COMPONENT_TYPE *)
decay callback of the body components, which releases the physx actor of the entity
Definition physicsmanager.h:145
static void Mark(Game::World *, Game::Entity, uint32_t pending)
queues up work for an entity, see PhysicsPending.
Definition physicsmanager.cc:109
Util::Array< Game::Entity > rebuildQueue
Definition physicsmanager.h:124
void RebuildQueued()
Rebuilds everything which has been queued since the last frame, and nothing else.
Definition physicsmanager.cc:971
static void ReleaseShapeForEntity(Game::World *, Game::Entity)
Definition physicsmanager.cc:429
void OnActivate() override
called when added to game server
Definition physicsmanager.cc:1285
static MemDb::TableSignature const & ColliderSignature()
the collider components as a signature.
Definition physicsmanager.cc:324
static bool IsColliderComponent(Game::ComponentId)
true when the component is one of the collider components
Definition physicsmanager.cc:348
static void InitPlaneCollider(Game::World *, Game::Entity, PhysicsFeature::PlaneCollider *)
Definition physicsmanager.cc:1105
static void InitBoxCollider(Game::World *, Game::Entity, PhysicsFeature::BoxCollider *)
Definition physicsmanager.cc:1075
static void OnColliderComponentDecay(Game::World *, Game::Entity, COMPONENT_TYPE *)
decay callback of the collider components, see MarkShapeChanged
Definition physicsmanager.h:133
static void InitStaticBody(Game::World *, Game::Entity, PhysicsFeature::StaticBody *)
Definition physicsmanager.cc:1066
void OnCleanup(Game::World *world) override
called before unloading game state
Definition physicsmanager.cc:1305
Nebula's dynamic array class.
Definition array.h:61
MemDb::AttributeId ComponentId
Definition componentid.h:15
Definition charactermanager.cc:22
PhysicsPending
what the physics manager has queued for an entity, mixed together in the pending field of the Physics...
Definition physicsmanager.h:32
@ PendingStructural
the actor has to look through its shapes for owners which no longer have a component....
Definition physicsmanager.h:37
@ PendingAll
Definition physicsmanager.h:38
@ PendingBody
create or update the physx actor of the body component
Definition physicsmanager.h:36
@ PendingPose
push the pose of the actor, and the local pose of its shapes
Definition physicsmanager.h:34
@ PendingShape
build or update the shapes of the collider components
Definition physicsmanager.h:35
@ PendingNone
nothing queued for the entity
Definition physicsmanager.h:33
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
An entity is essentially just an Id with some utility functions attached.
Definition entity.h:35
Definition physicsinterface.h:91