Fixed so some of the tests are working again. Also removed the test errors
This commit is contained in:
@@ -94,7 +94,7 @@ CapturePointTest::CapturePointTest(int runTestNumber)
|
|||||||
m_World = new World();
|
m_World = new World();
|
||||||
|
|
||||||
// Create system pipeline
|
// Create system pipeline
|
||||||
m_SystemPipeline = new SystemPipeline(m_World,m_EventBroker);
|
m_SystemPipeline = new SystemPipeline(m_World,m_EventBroker, true, false);
|
||||||
m_SystemPipeline->AddSystem<HealthSystem>(0);
|
m_SystemPipeline->AddSystem<HealthSystem>(0);
|
||||||
m_SystemPipeline->AddSystem<CapturePointSystem>(1);
|
m_SystemPipeline->AddSystem<CapturePointSystem>(1);
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ void RayTest(std::string fileName) {
|
|||||||
ResourceManager::RegisterType<RawModel>("RawModel");
|
ResourceManager::RegisterType<RawModel>("RawModel");
|
||||||
auto unitBox = ResourceManager::Load<RawModel>(fileName);
|
auto unitBox = ResourceManager::Load<RawModel>(fileName);
|
||||||
BOOST_REQUIRE(unitBox != nullptr);
|
BOOST_REQUIRE(unitBox != nullptr);
|
||||||
bool hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices);
|
bool hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
BOOST_CHECK(hit);
|
BOOST_CHECK(hit);
|
||||||
ray.SetDirection(glm::vec3(-1, 0, 0));
|
ray.SetDirection(glm::vec3(-1, 0, 0));
|
||||||
hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices);
|
hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
BOOST_CHECK(!hit);
|
BOOST_CHECK(!hit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,12 +146,12 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
|||||||
z = Collision::RayVsAABB(ray, someAABB);
|
z = Collision::RayVsAABB(ray, someAABB);
|
||||||
if (z) {
|
if (z) {
|
||||||
//hit
|
//hit
|
||||||
bool hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices);
|
bool hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices,glm::mat4(1));
|
||||||
if (!hit) {
|
if (!hit) {
|
||||||
//if rayvsaabb hit but rayvvmodel didnt hit, we get to here
|
//if rayvsaabb hit but rayvvmodel didnt hit, we get to here
|
||||||
glm::vec3 outtttttttt;
|
glm::mat4 outtttttttt;
|
||||||
hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices, outtttttttt);
|
hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices);
|
hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hit = hit;
|
hit = hit;
|
||||||
@@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
|||||||
// z = z;
|
// z = z;
|
||||||
//}
|
//}
|
||||||
//
|
//
|
||||||
bool hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices);
|
bool hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
////breakpoint test
|
////breakpoint test
|
||||||
//if (!hit) {
|
//if (!hit) {
|
||||||
// hit = hit;
|
// hit = hit;
|
||||||
@@ -175,8 +175,8 @@ BOOST_AUTO_TEST_CASE(rayVsModelTest2)
|
|||||||
//if rayvsmodel hit but rayvsaabb didnt hit then we get to here
|
//if rayvsmodel hit but rayvsaabb didnt hit then we get to here
|
||||||
z = Collision::RayVsAABB(ray, someAABB);
|
z = Collision::RayVsAABB(ray, someAABB);
|
||||||
glm::vec3 outtttttttt;
|
glm::vec3 outtttttttt;
|
||||||
hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices, outtttttttt);
|
hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
hit = Collision::RayVsModel(ray, unitBox->m_Vertices, unitBox->m_Indices);
|
hit = Collision::RayVsModel(ray, unitBox->Vertices(), unitBox->m_Indices, glm::mat4(1));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
z = z;
|
z = z;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ GameHealthSystemTest::GameHealthSystemTest()
|
|||||||
fp.MergeEntities(m_World);
|
fp.MergeEntities(m_World);
|
||||||
|
|
||||||
// Create system pipeline
|
// Create system pipeline
|
||||||
m_SystemPipeline = new SystemPipeline(m_World, m_EventBroker);
|
m_SystemPipeline = new SystemPipeline(m_World, m_EventBroker, false, false);
|
||||||
m_SystemPipeline->AddSystem<HealthSystem>(0);
|
m_SystemPipeline->AddSystem<HealthSystem>(0);
|
||||||
|
|
||||||
//The Test
|
//The Test
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ PickupSpawnTest::PickupSpawnTest(int runTestNumber)
|
|||||||
m_World = new World();
|
m_World = new World();
|
||||||
|
|
||||||
// Create system pipeline
|
// Create system pipeline
|
||||||
m_SystemPipeline = new SystemPipeline(m_World, m_EventBroker);
|
m_SystemPipeline = new SystemPipeline(m_World, m_EventBroker, false, false);
|
||||||
m_SystemPipeline->AddSystem<HealthSystem>(0);
|
m_SystemPipeline->AddSystem<HealthSystem>(0);
|
||||||
m_SystemPipeline->AddSystem<PickupSpawnSystem>(1);
|
m_SystemPipeline->AddSystem<PickupSpawnSystem>(1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user