mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
initial commit jolt
This commit is contained in:
parent
0c2aa5328c
commit
8acf7da95b
1086 changed files with 214612 additions and 4 deletions
31
Engine/lib/JoltPhysics/Samples/Tests/Rig/CreateRigTest.cpp
Normal file
31
Engine/lib/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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue