Divide Framework
0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
RigidBodySystem.cpp
Go to the documentation of this file.
1
2
3
#include "
Headers/RigidBodySystem.h
"
4
5
#include "
Core/Headers/PlatformContext.h
"
6
#include "
Physics/Headers/PXDevice.h
"
7
8
namespace
Divide
{
9
RigidBodySystem::RigidBodySystem
(
ECS::ECSEngine
& parentEngine,
PlatformContext
& context)
10
:
PlatformContextComponent
(context),
11
ECSSystem
(parentEngine)
12
{
13
}
14
15
void
RigidBodySystem::OnFrameStart
()
16
{
17
PROFILE_SCOPE_AUTO
(
Profiler::Category::Scene
);
18
19
Parent::OnFrameStart
();
20
for
(
RigidBodyComponent
* comp :
_componentCache
) {
21
if
(comp->_rigidBody ==
nullptr
) {
22
comp->_rigidBody.reset(
context
().pfx().createRigidActor(comp->parentSGN(), *comp));
23
}
24
}
25
}
26
27
}
//namespace Divide
PXDevice.h
PlatformContext.h
PROFILE_SCOPE_AUTO
#define PROFILE_SCOPE_AUTO(CATEGORY)
Definition:
Profiler.h:87
RigidBodySystem.h
Divide::ECSSystem
Definition:
ECSSystem.h:70
Divide::ECSSystem< RigidBodySystem, RigidBodyComponent >::OnFrameStart
void OnFrameStart() override
Definition:
ECSSystem.inl:82
Divide::ECSSystem< RigidBodySystem, RigidBodyComponent >::_componentCache
vector< RigidBodyComponent * > _componentCache
Definition:
ECSSystem.h:92
Divide::PlatformContextComponent
Definition:
PlatformContextComponent.h:39
Divide::PlatformContextComponent::context
PlatformContext & context() noexcept
Definition:
PlatformContextComponent.h:48
Divide::PlatformContext
Definition:
PlatformContext.h:71
Divide::RigidBodyComponent
Definition:
RigidBodyComponent.h:51
Divide::RigidBodySystem::OnFrameStart
void OnFrameStart() override
Definition:
RigidBodySystem.cpp:15
Divide::RigidBodySystem::RigidBodySystem
RigidBodySystem(ECS::ECSEngine &parentEngine, PlatformContext &context)
Definition:
RigidBodySystem.cpp:9
ECS::ECSEngine
Definition:
Engine.h:37
Divide::Profiler::Category::Scene
constexpr Optick::Category::Type Scene
Definition:
Profiler.h:66
Divide
Handle console commands that start with a forward slash.
Definition:
AIProcessor.cpp:7
Source
ECS
Systems
RigidBodySystem.cpp
Generated on Fri May 17 2024 16:59:51 for Divide Framework by
1.9.6