Nebula
Loading...
Searching...
No Matches
physicsfeatureunit.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "game/featureunit.h"
12#include "core/cvar.h"
13
14#define TIMESOURCE_PHYSICS 'PHTS'
15
16//------------------------------------------------------------------------------
17namespace PhysicsFeature
18{
19
21{
24
25public:
26
31
32 void OnAttach() override;
33
35 void OnActivate();
37 void OnDeactivate();
39 void OnBeforeCleanup(Game::World* world);
40
42 virtual void OnBeginFrame();
44 virtual void OnDecay();
46 virtual void OnRenderDebug();
47
48private:
52
54};
55
56} // namespace PhysicsFeature
57//------------------------------------------------------------------------------
A FeatureUnit is an encapsulated feature which can be added to an application.
Definition featureunit.h:34
A container of entities, their components, and processors.
Definition world.h:81
Sets up and interfaces with the physics subsystem.
Definition physicsfeatureunit.h:21
bool simulating
Definition physicsfeatureunit.h:50
int debugDrawPhysicsLastValue
Definition physicsfeatureunit.h:51
void OnActivate()
Called upon activation of feature unit.
Definition physicsfeatureunit.cc:54
virtual void OnDecay()
called at the end of the feature trigger cycle
Definition physicsfeatureunit.cc:184
Core::CVar * cl_debug_draw_physics
Definition physicsfeatureunit.h:53
virtual void OnBeginFrame()
called on begin of frame
Definition physicsfeatureunit.cc:164
void OnBeforeCleanup(Game::World *world)
called from within GameServer::NotifyBeforeCleanup()
Definition physicsfeatureunit.cc:150
virtual void OnRenderDebug()
called when game debug visualization is on
Definition physicsfeatureunit.cc:201
void OnDeactivate()
Called upon deactivation of feature unit.
Definition physicsfeatureunit.cc:135
__DeclareClass(PhysicsFeatureUnit) __DeclareSingleton(PhysicsFeatureUnit) public ~PhysicsFeatureUnit()
destructor
Definition physicsfeatureunit.cc:34
void OnAttach() override
called from GameServer::AttachGameFeature()
Definition physicsfeatureunit.cc:43
Util::Dictionary< Game::World *, IndexT > physicsWorlds
Definition physicsfeatureunit.h:49
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
Contains API for creating, writing to, and reading from a Core::CVar.
Definition charactermanager.cc:24
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
#define __DeclareClass(type)
A console variable.
Definition cvar.cc:24