This commit is contained in:
antc13
2016-01-20 09:49:54 +01:00
parent a47317bb32
commit 386e76f642
11 changed files with 24 additions and 24 deletions
+7 -7
View File
@@ -292,21 +292,21 @@ void EditorSystem::createWidget()
m_WidgetPlaneX = m_World->CreateEntity(m_Widget);
m_World->AttachComponent(m_WidgetPlaneX, "Transform");
m_World->AttachComponent(m_WidgetPlaneX, "Model");
m_World->GetComponent(m_WidgetPlaneX, "Model")["Resource"] = "Models/coolCube";
m_World->GetComponent(m_WidgetPlaneX, "Model")["Resource"] = "Models/coolCube"; // 360NoScope widgetPlaneX
m_WidgetY = m_World->CreateEntity(m_Widget);
m_World->AttachComponent(m_WidgetY, "Transform");
m_World->AttachComponent(m_WidgetY, "Model");
m_WidgetPlaneY = m_World->CreateEntity(m_Widget);
m_World->AttachComponent(m_WidgetPlaneY, "Transform");
m_World->AttachComponent(m_WidgetPlaneY, "Model");
m_World->GetComponent(m_WidgetPlaneY, "Model")["Resource"] = "Models/coolCube";
m_World->GetComponent(m_WidgetPlaneY, "Model")["Resource"] = "Models/coolCube"; // 360NoScope widgetPlaneY
m_WidgetZ = m_World->CreateEntity(m_Widget);
m_World->AttachComponent(m_WidgetZ, "Transform");
m_World->AttachComponent(m_WidgetZ, "Model");
m_WidgetPlaneZ = m_World->CreateEntity(m_Widget);
m_World->AttachComponent(m_WidgetPlaneZ, "Transform");
m_World->AttachComponent(m_WidgetPlaneZ, "Model");
m_World->GetComponent(m_WidgetPlaneZ, "Model")["Resource"] = "Models/coolCube";
m_World->GetComponent(m_WidgetPlaneZ, "Model")["Resource"] = "Models/coolCube"; // 360NoScope widgetPlaneZ
m_WidgetOrigin = m_World->CreateEntity(m_Widget);
m_World->AttachComponent(m_WidgetOrigin, "Transform");
m_World->AttachComponent(m_WidgetOrigin, "Model");
@@ -351,7 +351,7 @@ void EditorSystem::setWidgetMode(WidgetMode newMode)
m_World->GetComponent(m_WidgetOrigin, "Model")["Visible"] = false;
if (newMode == WidgetMode::Translate) {
//m_World->GetComponent(m_WidgetX, "Model")["Resource"] = "Models/TranslationWidgetX.obj";
//m_World->GetComponent(m_WidgetX, "Model")["Resource"] = "Models/TranslationWidgetX.obj"; // 360NoScope TranslationWidgets mesh
//m_World->GetComponent(m_WidgetY, "Model")["Resource"] = "Models/TranslationWidgetY.obj";
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/TranslationWidgetZ.obj";
// Temporarily disabled for local space until I can figure out what's wrong with the math
@@ -367,17 +367,17 @@ void EditorSystem::setWidgetMode(WidgetMode newMode)
}
}
} else if (newMode == WidgetMode::Scale) {
//m_World->GetComponent(m_WidgetX, "Model")["Resource"] = "Models/ScaleWidgetX.obj";
//m_World->GetComponent(m_WidgetX, "Model")["Resource"] = "Models/ScaleWidgetX.obj"; // 360NoScope ScaleWidgets mesh
//m_World->GetComponent(m_WidgetY, "Model")["Resource"] = "Models/ScaleWidgetY.obj";
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/ScaleWidgetZ.obj";
m_World->GetComponent(m_WidgetOrigin, "Model")["Visible"] = true;
//m_World->GetComponent(m_WidgetOrigin, "Model")["Resource"] = "Models/ScaleWidgetOrigin.obj";
//m_World->GetComponent(m_WidgetOrigin, "Model")["Resource"] = "Models/ScaleWidgetOrigin.obj"; // 360NoScope ScaleWidgetOrigin mesh
if (m_Selection != EntityID_Invalid) {
auto selectionTransform = m_World->GetComponent(m_Selection, "Transform");
widgetTransform["Orientation"] = glm::eulerAngles(Transform::AbsoluteOrientation(m_World, m_Selection));
}
} else if (newMode == WidgetMode::Rotate) {
//m_World->GetComponent(m_WidgetX, "Model")["Resource"] = "Models/RotationWidgetX.obj";
//m_World->GetComponent(m_WidgetX, "Model")["Resource"] = "Models/RotationWidgetX.obj"; // 360NoScope RotationWidget mesh
//m_World->GetComponent(m_WidgetY, "Model")["Resource"] = "Models/RotationWidgetY.obj";
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/RotationWidgetZ.obj";
if (m_Selection != EntityID_Invalid) {
+1 -1
View File
@@ -331,7 +331,7 @@ EntityID Client::createPlayer()
EntityID entityID = m_World->CreateEntity();
ComponentWrapper transform = m_World->AttachComponent(entityID, "Transform");
ComponentWrapper model = m_World->AttachComponent(entityID, "Model");
model["Resource"] = "Models/Core/UnitSphere.obj";
model["Resource"] = "Models/Core/UnitSphere.obj"; // 360NoScope UnitSphere mesh
ComponentWrapper player = m_World->AttachComponent(entityID, "Player");
return entityID;
}
+1 -1
View File
@@ -349,7 +349,7 @@ EntityID Server::createPlayer()
ComponentWrapper transform = m_World->AttachComponent(entityID, "Transform");
transform["Position"] = glm::vec3(-1.5f, 0.f, 0.f);
ComponentWrapper model = m_World->AttachComponent(entityID, "Model");
model["Resource"] = "Models/Core/UnitSphere.obj";
model["Resource"] = "Models/Core/UnitSphere.obj"; // 360NoScope UnitSphere
model["Color"] = glm::vec4(rand()%255 / 255.f, rand()%255 / 255.f, rand() %255 / 255.f, 1.f);
ComponentWrapper player = m_World->AttachComponent(entityID, "Player");
return entityID;
+2 -2
View File
@@ -96,10 +96,10 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& jobs, World
model = ResourceManager::Load<::Model, true>(resource);
} catch (const Resource::StillLoadingException&) {
//continue;
model = ResourceManager::Load<::Model>("Models/coolCube");
model = ResourceManager::Load<::Model>("Models/coolCube"); // 360NoScope StillLoading mesh
} catch (const std::exception&) {
try {
model = ResourceManager::Load<::Model>("Models/coolCube");
model = ResourceManager::Load<::Model>("Models/coolCube"); // 360NoScope Error mesh
} catch (const std::exception&) {
continue;
}
+1 -1
View File
@@ -198,7 +198,7 @@ bool SoundSystem::OnPlaySoundOnPosition(const Events::PlaySoundOnPosition & e)
(float&)(double)emitter["RollOffFactor"] = e.RollOffFactor;
(float&)(double)emitter["ReferenceDistance"] = e.ReferenceDistance;
auto model = m_World->AttachComponent(emitterID, "Model");
(std::string&)model["Resource"] = "Models/Core/UnitCube.obj";
(std::string&)model["Resource"] = "Models/Core/UnitCube.obj"; // 360NoScope UnitCube
source->Type = SoundType::SFX;
m_Sources[emitterID] = source;
playSound(source);
+5 -5
View File
@@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(collisionTest2)
BOOST_AUTO_TEST_CASE(rayVsModelTest)
{
//simple box test
RayTest("Models/Core/UnitCube.obj");
RayTest("Models/Core/UnitCube.obj"); // 360NoScope Unitcube
}
BOOST_AUTO_TEST_CASE(rayVsModelTest2)
@@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
someAABB = AABB(minPos, maxPos);
//using a rawmodel here, else we have to init the renderingsystem
ResourceManager::RegisterType<RawModel>("RawModel");
auto unitBox = ResourceManager::Load<RawModel>("Models/Core/UnitCube.obj");
auto unitBox = ResourceManager::Load<RawModel>("Models/Core/UnitCube.obj"); // 360NoScope unitcube
BOOST_CHECK(unitBox != nullptr);
for (size_t i = 0; i < 1000000; i++)
@@ -187,19 +187,19 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
BOOST_AUTO_TEST_CASE(rayVsModelTest3)
{
//simple test
RayTest("Models/Core/UnitSphere.obj");
RayTest("Models/Core/UnitSphere.obj"); // 360NoScope unitSphere
}
BOOST_AUTO_TEST_CASE(rayVsModelTest4)
{
//simple test
RayTest("Models/Core/UnitCylinder.obj");
RayTest("Models/Core/UnitCylinder.obj"); // 360NoScope unitCylinder
}
BOOST_AUTO_TEST_CASE(rayVsModelTest5)
{
//simple test
RayTest("Models/Core/UnitRaptor.obj");
RayTest("Models/Core/UnitRaptor.obj"); // 360NoScope unitRaptor
}
BOOST_AUTO_TEST_CASE(octTest)
{
+2 -2
View File
@@ -55,7 +55,7 @@ GameHealthSystemTest::GameHealthSystemTest()
EntityID playerID = m_World->CreateEntity();
ComponentWrapper transform = m_World->AttachComponent(playerID, "Transform");
ComponentWrapper model = m_World->AttachComponent(playerID, "Model");
model["Resource"] = "Models/Core/UnitSphere.obj";
model["Resource"] = "Models/Core/UnitSphere.obj"; // 360NoScope UnitSphere
ComponentWrapper player = m_World->AttachComponent(playerID, "Player");
ComponentWrapper health = m_World->AttachComponent(playerID, "Health");
healthsID = playerID;
@@ -80,7 +80,7 @@ GameHealthSystemTest::GameHealthSystemTest()
EntityID playerID2 = m_World->CreateEntity();
ComponentWrapper transform2 = m_World->AttachComponent(playerID2, "Transform");
ComponentWrapper model2 = m_World->AttachComponent(playerID2, "Model");
model2["Resource"] = "Models/Core/UnitSphere.obj";
model2["Resource"] = "Models/Core/UnitSphere.obj"; // 360NoScope UnitSphere
ComponentWrapper player2 = m_World->AttachComponent(playerID2, "Player");
ComponentWrapper health2 = m_World->AttachComponent(playerID2, "Health");
//END TEST
+1 -1
View File
@@ -149,7 +149,7 @@ void Game::Tick()
ComponentWrapper transform = m_World->AttachComponent(m_BoxID, "Transform");
transform["Scale"] = boxSize;
ComponentWrapper model = m_World->AttachComponent(m_BoxID, "Model");
model["Resource"] = "Models/Core/UnitBox.obj";
model["Resource"] = "Models/Core/UnitBox.obj"; // 360NoScope UnitBox
m_World->createTestEntitiesTest2();
}
+2 -2
View File
@@ -112,7 +112,7 @@ private:
ComponentWrapper transform = world.AttachComponent(entityCollisionBox, "Transform");
transform["Position"] = glm::vec3(0.f, 2.f, 0.f);
ComponentWrapper model = world.AttachComponent(entityCollisionBox, "Model");
model["Resource"] = "Models/Core/UnitBox.obj";
model["Resource"] = "Models/Core/UnitBox.obj"; // 360NoScope UnitBox
}
void AddBoxModel(const glm::vec3 &center, const float &halfSize, Octree::Child* child, EntityID &outEntityId) {
@@ -124,7 +124,7 @@ private:
transform["Position"] = center;
transform["Scale"] = glm::vec3(1.0f, 1.0f, 1.0f)*halfSize*2.0f*0.97f;
ComponentWrapper model = world.AttachComponent(entityDummyScene, "Model");
model["Resource"] = "Models/Core/UnitBox.obj";
model["Resource"] = "Models/Core/UnitBox.obj"; // 360NoScope unitBox
model["Color"] = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);
if (child->m_DynamicObjIndices.size() != 0)
model["Color"] = glm::vec4(1.0f, 1.0f, 1.0f, 1.0f);
+1 -1
View File
@@ -112,7 +112,7 @@ void OctTree::Update(float dt, World* world, Camera* cam)
ComponentWrapper transform = world->AttachComponent(m_BoxID, "Transform");
transform["Scale"] = boxSize;
ComponentWrapper model = world->AttachComponent(m_BoxID, "Model");
model["Resource"] = "Models/Core/UnitBox.obj";
model["Resource"] = "Models/Core/UnitBox.obj"; // 360NoScope UnitBox
m_UpdatedOnce = true;
}
+1 -1
View File
@@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(resourceManagerTest)
//configfile without register
//check so output says "EE failed to load: type not registered..."
auto m_ScreenQuadNoRegister = ResourceManager::Load<Model>("Models/Core/ScreenQuad.obj");
auto m_ScreenQuadNoRegister = ResourceManager::Load<Model>("Models/Core/ScreenQuad.obj"); // 360NoScope ScreenQuad
BOOST_CHECK(!ResourceManager::IsResourceLoaded("Model", "Models/Core/ScreenQuad.obj"));
//there is no error feedback to check if you try to release the wrong resources - hence that cant be tested either