Puyshing
This commit is contained in:
@@ -292,21 +292,21 @@ void EditorSystem::createWidget()
|
|||||||
m_WidgetPlaneX = m_World->CreateEntity(m_Widget);
|
m_WidgetPlaneX = m_World->CreateEntity(m_Widget);
|
||||||
m_World->AttachComponent(m_WidgetPlaneX, "Transform");
|
m_World->AttachComponent(m_WidgetPlaneX, "Transform");
|
||||||
m_World->AttachComponent(m_WidgetPlaneX, "Model");
|
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_WidgetY = m_World->CreateEntity(m_Widget);
|
||||||
m_World->AttachComponent(m_WidgetY, "Transform");
|
m_World->AttachComponent(m_WidgetY, "Transform");
|
||||||
m_World->AttachComponent(m_WidgetY, "Model");
|
m_World->AttachComponent(m_WidgetY, "Model");
|
||||||
m_WidgetPlaneY = m_World->CreateEntity(m_Widget);
|
m_WidgetPlaneY = m_World->CreateEntity(m_Widget);
|
||||||
m_World->AttachComponent(m_WidgetPlaneY, "Transform");
|
m_World->AttachComponent(m_WidgetPlaneY, "Transform");
|
||||||
m_World->AttachComponent(m_WidgetPlaneY, "Model");
|
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_WidgetZ = m_World->CreateEntity(m_Widget);
|
||||||
m_World->AttachComponent(m_WidgetZ, "Transform");
|
m_World->AttachComponent(m_WidgetZ, "Transform");
|
||||||
m_World->AttachComponent(m_WidgetZ, "Model");
|
m_World->AttachComponent(m_WidgetZ, "Model");
|
||||||
m_WidgetPlaneZ = m_World->CreateEntity(m_Widget);
|
m_WidgetPlaneZ = m_World->CreateEntity(m_Widget);
|
||||||
m_World->AttachComponent(m_WidgetPlaneZ, "Transform");
|
m_World->AttachComponent(m_WidgetPlaneZ, "Transform");
|
||||||
m_World->AttachComponent(m_WidgetPlaneZ, "Model");
|
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_WidgetOrigin = m_World->CreateEntity(m_Widget);
|
||||||
m_World->AttachComponent(m_WidgetOrigin, "Transform");
|
m_World->AttachComponent(m_WidgetOrigin, "Transform");
|
||||||
m_World->AttachComponent(m_WidgetOrigin, "Model");
|
m_World->AttachComponent(m_WidgetOrigin, "Model");
|
||||||
@@ -351,7 +351,7 @@ void EditorSystem::setWidgetMode(WidgetMode newMode)
|
|||||||
m_World->GetComponent(m_WidgetOrigin, "Model")["Visible"] = false;
|
m_World->GetComponent(m_WidgetOrigin, "Model")["Visible"] = false;
|
||||||
|
|
||||||
if (newMode == WidgetMode::Translate) {
|
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_WidgetY, "Model")["Resource"] = "Models/TranslationWidgetY.obj";
|
||||||
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/TranslationWidgetZ.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
|
// 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) {
|
} 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_WidgetY, "Model")["Resource"] = "Models/ScaleWidgetY.obj";
|
||||||
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/ScaleWidgetZ.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")["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) {
|
if (m_Selection != EntityID_Invalid) {
|
||||||
auto selectionTransform = m_World->GetComponent(m_Selection, "Transform");
|
auto selectionTransform = m_World->GetComponent(m_Selection, "Transform");
|
||||||
widgetTransform["Orientation"] = glm::eulerAngles(Transform::AbsoluteOrientation(m_World, m_Selection));
|
widgetTransform["Orientation"] = glm::eulerAngles(Transform::AbsoluteOrientation(m_World, m_Selection));
|
||||||
}
|
}
|
||||||
} else if (newMode == WidgetMode::Rotate) {
|
} 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_WidgetY, "Model")["Resource"] = "Models/RotationWidgetY.obj";
|
||||||
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/RotationWidgetZ.obj";
|
//m_World->GetComponent(m_WidgetZ, "Model")["Resource"] = "Models/RotationWidgetZ.obj";
|
||||||
if (m_Selection != EntityID_Invalid) {
|
if (m_Selection != EntityID_Invalid) {
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ EntityID Client::createPlayer()
|
|||||||
EntityID entityID = m_World->CreateEntity();
|
EntityID entityID = m_World->CreateEntity();
|
||||||
ComponentWrapper transform = m_World->AttachComponent(entityID, "Transform");
|
ComponentWrapper transform = m_World->AttachComponent(entityID, "Transform");
|
||||||
ComponentWrapper model = m_World->AttachComponent(entityID, "Model");
|
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");
|
ComponentWrapper player = m_World->AttachComponent(entityID, "Player");
|
||||||
return entityID;
|
return entityID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ EntityID Server::createPlayer()
|
|||||||
ComponentWrapper transform = m_World->AttachComponent(entityID, "Transform");
|
ComponentWrapper transform = m_World->AttachComponent(entityID, "Transform");
|
||||||
transform["Position"] = glm::vec3(-1.5f, 0.f, 0.f);
|
transform["Position"] = glm::vec3(-1.5f, 0.f, 0.f);
|
||||||
ComponentWrapper model = m_World->AttachComponent(entityID, "Model");
|
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);
|
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");
|
ComponentWrapper player = m_World->AttachComponent(entityID, "Player");
|
||||||
return entityID;
|
return entityID;
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& jobs, World
|
|||||||
model = ResourceManager::Load<::Model, true>(resource);
|
model = ResourceManager::Load<::Model, true>(resource);
|
||||||
} catch (const Resource::StillLoadingException&) {
|
} catch (const Resource::StillLoadingException&) {
|
||||||
//continue;
|
//continue;
|
||||||
model = ResourceManager::Load<::Model>("Models/coolCube");
|
model = ResourceManager::Load<::Model>("Models/coolCube"); // 360NoScope StillLoading mesh
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
try {
|
try {
|
||||||
model = ResourceManager::Load<::Model>("Models/coolCube");
|
model = ResourceManager::Load<::Model>("Models/coolCube"); // 360NoScope Error mesh
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ bool SoundSystem::OnPlaySoundOnPosition(const Events::PlaySoundOnPosition & e)
|
|||||||
(float&)(double)emitter["RollOffFactor"] = e.RollOffFactor;
|
(float&)(double)emitter["RollOffFactor"] = e.RollOffFactor;
|
||||||
(float&)(double)emitter["ReferenceDistance"] = e.ReferenceDistance;
|
(float&)(double)emitter["ReferenceDistance"] = e.ReferenceDistance;
|
||||||
auto model = m_World->AttachComponent(emitterID, "Model");
|
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;
|
source->Type = SoundType::SFX;
|
||||||
m_Sources[emitterID] = source;
|
m_Sources[emitterID] = source;
|
||||||
playSound(source);
|
playSound(source);
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(collisionTest2)
|
|||||||
BOOST_AUTO_TEST_CASE(rayVsModelTest)
|
BOOST_AUTO_TEST_CASE(rayVsModelTest)
|
||||||
{
|
{
|
||||||
//simple box test
|
//simple box test
|
||||||
RayTest("Models/Core/UnitCube.obj");
|
RayTest("Models/Core/UnitCube.obj"); // 360NoScope Unitcube
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
||||||
@@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
|||||||
someAABB = AABB(minPos, maxPos);
|
someAABB = AABB(minPos, maxPos);
|
||||||
//using a rawmodel here, else we have to init the renderingsystem
|
//using a rawmodel here, else we have to init the renderingsystem
|
||||||
ResourceManager::RegisterType<RawModel>("RawModel");
|
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);
|
BOOST_CHECK(unitBox != nullptr);
|
||||||
|
|
||||||
for (size_t i = 0; i < 1000000; i++)
|
for (size_t i = 0; i < 1000000; i++)
|
||||||
@@ -187,19 +187,19 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
|||||||
BOOST_AUTO_TEST_CASE(rayVsModelTest3)
|
BOOST_AUTO_TEST_CASE(rayVsModelTest3)
|
||||||
{
|
{
|
||||||
//simple test
|
//simple test
|
||||||
RayTest("Models/Core/UnitSphere.obj");
|
RayTest("Models/Core/UnitSphere.obj"); // 360NoScope unitSphere
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(rayVsModelTest4)
|
BOOST_AUTO_TEST_CASE(rayVsModelTest4)
|
||||||
{
|
{
|
||||||
//simple test
|
//simple test
|
||||||
RayTest("Models/Core/UnitCylinder.obj");
|
RayTest("Models/Core/UnitCylinder.obj"); // 360NoScope unitCylinder
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(rayVsModelTest5)
|
BOOST_AUTO_TEST_CASE(rayVsModelTest5)
|
||||||
{
|
{
|
||||||
//simple test
|
//simple test
|
||||||
RayTest("Models/Core/UnitRaptor.obj");
|
RayTest("Models/Core/UnitRaptor.obj"); // 360NoScope unitRaptor
|
||||||
}
|
}
|
||||||
BOOST_AUTO_TEST_CASE(octTest)
|
BOOST_AUTO_TEST_CASE(octTest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ GameHealthSystemTest::GameHealthSystemTest()
|
|||||||
EntityID playerID = m_World->CreateEntity();
|
EntityID playerID = m_World->CreateEntity();
|
||||||
ComponentWrapper transform = m_World->AttachComponent(playerID, "Transform");
|
ComponentWrapper transform = m_World->AttachComponent(playerID, "Transform");
|
||||||
ComponentWrapper model = m_World->AttachComponent(playerID, "Model");
|
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 player = m_World->AttachComponent(playerID, "Player");
|
||||||
ComponentWrapper health = m_World->AttachComponent(playerID, "Health");
|
ComponentWrapper health = m_World->AttachComponent(playerID, "Health");
|
||||||
healthsID = playerID;
|
healthsID = playerID;
|
||||||
@@ -80,7 +80,7 @@ GameHealthSystemTest::GameHealthSystemTest()
|
|||||||
EntityID playerID2 = m_World->CreateEntity();
|
EntityID playerID2 = m_World->CreateEntity();
|
||||||
ComponentWrapper transform2 = m_World->AttachComponent(playerID2, "Transform");
|
ComponentWrapper transform2 = m_World->AttachComponent(playerID2, "Transform");
|
||||||
ComponentWrapper model2 = m_World->AttachComponent(playerID2, "Model");
|
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 player2 = m_World->AttachComponent(playerID2, "Player");
|
||||||
ComponentWrapper health2 = m_World->AttachComponent(playerID2, "Health");
|
ComponentWrapper health2 = m_World->AttachComponent(playerID2, "Health");
|
||||||
//END TEST
|
//END TEST
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ void Game::Tick()
|
|||||||
ComponentWrapper transform = m_World->AttachComponent(m_BoxID, "Transform");
|
ComponentWrapper transform = m_World->AttachComponent(m_BoxID, "Transform");
|
||||||
transform["Scale"] = boxSize;
|
transform["Scale"] = boxSize;
|
||||||
ComponentWrapper model = m_World->AttachComponent(m_BoxID, "Model");
|
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();
|
m_World->createTestEntitiesTest2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ private:
|
|||||||
ComponentWrapper transform = world.AttachComponent(entityCollisionBox, "Transform");
|
ComponentWrapper transform = world.AttachComponent(entityCollisionBox, "Transform");
|
||||||
transform["Position"] = glm::vec3(0.f, 2.f, 0.f);
|
transform["Position"] = glm::vec3(0.f, 2.f, 0.f);
|
||||||
ComponentWrapper model = world.AttachComponent(entityCollisionBox, "Model");
|
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 ¢er, const float &halfSize, Octree::Child* child, EntityID &outEntityId) {
|
void AddBoxModel(const glm::vec3 ¢er, const float &halfSize, Octree::Child* child, EntityID &outEntityId) {
|
||||||
@@ -124,7 +124,7 @@ private:
|
|||||||
transform["Position"] = center;
|
transform["Position"] = center;
|
||||||
transform["Scale"] = glm::vec3(1.0f, 1.0f, 1.0f)*halfSize*2.0f*0.97f;
|
transform["Scale"] = glm::vec3(1.0f, 1.0f, 1.0f)*halfSize*2.0f*0.97f;
|
||||||
ComponentWrapper model = world.AttachComponent(entityDummyScene, "Model");
|
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);
|
model["Color"] = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
if (child->m_DynamicObjIndices.size() != 0)
|
if (child->m_DynamicObjIndices.size() != 0)
|
||||||
model["Color"] = glm::vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
model["Color"] = glm::vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ void OctTree::Update(float dt, World* world, Camera* cam)
|
|||||||
ComponentWrapper transform = world->AttachComponent(m_BoxID, "Transform");
|
ComponentWrapper transform = world->AttachComponent(m_BoxID, "Transform");
|
||||||
transform["Scale"] = boxSize;
|
transform["Scale"] = boxSize;
|
||||||
ComponentWrapper model = world->AttachComponent(m_BoxID, "Model");
|
ComponentWrapper model = world->AttachComponent(m_BoxID, "Model");
|
||||||
model["Resource"] = "Models/Core/UnitBox.obj";
|
model["Resource"] = "Models/Core/UnitBox.obj"; // 360NoScope UnitBox
|
||||||
m_UpdatedOnce = true;
|
m_UpdatedOnce = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(resourceManagerTest)
|
|||||||
|
|
||||||
//configfile without register
|
//configfile without register
|
||||||
//check so output says "EE failed to load: type not registered..."
|
//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"));
|
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
|
//there is no error feedback to check if you try to release the wrong resources - hence that cant be tested either
|
||||||
|
|||||||
Reference in New Issue
Block a user