WIP World changes
This commit is contained in:
@@ -80,6 +80,16 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Escape-the-Dawn\Escape-the-Dawn.vcxproj">
|
||||
<Project>{fe405cfa-8fce-4867-92cf-797e73b36482}</Project>
|
||||
<Private>true</Private>
|
||||
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -20,6 +20,27 @@ BOOST_AUTO_TEST_CASE(Parenting)
|
||||
BOOST_CHECK(world.GetEntityParent(ent2) == ent1);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SceneGraphTraversal)
|
||||
{
|
||||
World world;
|
||||
|
||||
EntityID ent1 = world.CreateEntity();
|
||||
auto t1 = world.AddComponent<Components::Transform>(ent1, "Transform");
|
||||
t1->Position[0] = 1.0f;
|
||||
t1->Position[1] = 1.0f;
|
||||
t1->Position[2] = 1.0f;
|
||||
EntityID ent2 = world.CreateEntity(ent1);
|
||||
auto t2 = world.AddComponent<Components::Transform>(ent2, "Transform");
|
||||
t2->Position[0] = 1.0f;
|
||||
t2->Position[1] = 1.0f;
|
||||
t2->Position[2] = 1.0f;
|
||||
|
||||
world.Update(0.0);
|
||||
|
||||
LOG_INFO("ent1: %f %f %f", t1->Position[0], t1->Position[1], t1->Position[2]);
|
||||
LOG_INFO("ent2: %f %f %f", t2->Position[0], t2->Position[1], t2->Position[2]);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Recycling)
|
||||
{
|
||||
World world;
|
||||
|
||||
Reference in New Issue
Block a user