Ajout de Jolt Physics + 1ere version des factory entitecomposants - camera, transform, rigidbody, collider, renderer
This commit is contained in:
31
lib/All/JoltPhysics/Samples/Tests/Rig/CreateRigTest.cpp
Normal file
31
lib/All/JoltPhysics/Samples/Tests/Rig/CreateRigTest.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
||||
// SPDX-FileCopyrightText: 2022 Jorrit Rouwe
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <TestFramework.h>
|
||||
|
||||
#include <Tests/Rig/CreateRigTest.h>
|
||||
#include <Application/DebugUI.h>
|
||||
#include <Utils/RagdollLoader.h>
|
||||
#include <Layers.h>
|
||||
|
||||
JPH_IMPLEMENT_RTTI_VIRTUAL(CreateRigTest)
|
||||
{
|
||||
JPH_ADD_BASE_CLASS(CreateRigTest, Test)
|
||||
}
|
||||
|
||||
CreateRigTest::~CreateRigTest()
|
||||
{
|
||||
mRagdoll->RemoveFromPhysicsSystem();
|
||||
}
|
||||
|
||||
void CreateRigTest::Initialize()
|
||||
{
|
||||
// Floor
|
||||
CreateFloor();
|
||||
|
||||
// Create ragdoll
|
||||
Ref<RagdollSettings> settings = RagdollLoader::sCreate();
|
||||
mRagdoll = settings->CreateRagdoll(0, 0, mPhysicsSystem);
|
||||
mRagdoll->AddToPhysicsSystem(EActivation::Activate);
|
||||
}
|
||||
Reference in New Issue
Block a user