Skip to content
Snippets Groups Projects
Commit b7d6afb2 authored by demiralp's avatar demiralp
Browse files

Merge branch 'release/v18.01.0'

parents df34df63 d6cfab0d
No related branches found
No related tags found
2 merge requests!148feature/#480_Create_a_smaller_test _mesh_for_combustion_demo,!141WIP: Resolve "Copy standard assets to build folder and remove resource path"
Showing
with 70 additions and 59 deletions
......@@ -14,7 +14,11 @@ README.md text
*.cpp text
*.h text
*.hpp text
*.png filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs
*.obj filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs
*.mtl filter=lfs diff=lfs merge=lfs -text
*.PNG filter=lfs diff=lfs merge=lfs
*.OBJ filter=lfs diff=lfs merge=lfs -text
*.JPG filter=lfs diff=lfs merge=lfs
*.MTL filter=lfs diff=lfs merge=lfs -text
\ No newline at end of file
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......@@ -55,6 +55,7 @@ conan_or_find_package(SDL2 REQUIRED)
conan_or_find_package(spdlog REQUIRED)
conan_or_find_package(freeimage REQUIRED)
conan_or_find_package(openvr REQUIRED)
conan_or_find_package(jsonformoderncpp REQUIRED)
add_subdirectory(library)
......
--------------------------------------------------------------------------------
Project Phoenix
Copyright (c) 2017 RWTH Aachen University, Germany,
Copyright (c) 2017-2018 RWTH Aachen University, Germany,
Virtual Reality & Immersive Visualization Group.
--------------------------------------------------------------------------------
Contact Information
......
......@@ -4,7 +4,7 @@
 
**Develop:** [![build status](https://devhub.vr.rwth-aachen.de/VR-Group/Project_Phoenix/badges/develop/build.svg)](https://devhub.vr.rwth-aachen.de/VR-Group/Project_Phoenix/commits/develop)
*Project Phoenix* is Copyright (c) 2017 RWTH Aachen University, Germany,
*Project Phoenix* is Copyright (c) 2017-2018 RWTH Aachen University, Germany,
Virtual Reality & Immersive Visualization Group.
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......@@ -24,7 +24,7 @@ from conans import ConanFile, CMake
class ProjectPhoenix(ConanFile):
name = "phx"
version = "17.12.0"
version = "18.01.0"
license = "3-Clause BSD License"
description = """Project Phoenix"""
settings = "os", "compiler", "build_type", "arch"
......@@ -38,6 +38,7 @@ class ProjectPhoenix(ConanFile):
("gl/1.0.0@RWTH-VR/thirdparty"),
("glew/2.1.0_1@RWTH-VR/thirdparty"),
("glm/0.9.8@RWTH-VR/thirdparty"),
("jsonformoderncpp/3.0.1@vthiery/stable"),
("openvr/1.0.10@RWTH-VR/thirdparty"),
("SDL2/2.0.5@RWTH-VR/thirdparty"),
("spdlog/0.14.0@RWTH-VR/thirdparty"),
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
#------------------------------------------------------------------------------
# Project Phoenix
#
# Copyright (c) 2017 RWTH Aachen University, Germany,
# Copyright (c) 2017-2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
#------------------------------------------------------------------------------
# License
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......@@ -23,20 +23,25 @@
#include "controller_behavior.hpp"
#include "phx/entity.hpp"
#include "phx/runtime_component.hpp"
#include "phx/scene.hpp"
#include "phx/transform.hpp"
void ControllerBehavior::OnUpdate() {
phx::Scene* scene = GetEntity()->GetScene();
phx::Entity* runtime_entity = nullptr;
for (auto entity : scene->GetEntities()) {
if (entity->GetName() == phx::RUNTIME_ENTITY_NAME_CONTROLLER_LEFT &&
side_ == Side::LEFT) {
runtime_entity = entity;
if (side_ == Side::LEFT) {
auto runtime_entities = scene->GetEntitiesWithComponents<
phx::RuntimeComponent<phx::LEFT_CONTROLLER>>();
if (!runtime_entities.empty()) {
runtime_entity = runtime_entities[0];
}
if (entity->GetName() == phx::RUNTIME_ENTITY_NAME_CONTROLLER_RIGHT &&
side_ == Side::RIGHT) {
runtime_entity = entity;
}
if (side_ == Side::RIGHT) {
auto runtime_entities = scene->GetEntitiesWithComponents<
phx::RuntimeComponent<phx::RIGHT_CONTROLLER>>();
if (!runtime_entities.empty()) {
runtime_entity = runtime_entities[0];
}
}
if (runtime_entity &&
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......
//------------------------------------------------------------------------------
// Project Phoenix
//
// Copyright (c) 2017 RWTH Aachen University, Germany,
// Copyright (c) 2017-2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
// License
......@@ -37,18 +37,18 @@
#include "phx/material_handle.hpp"
#include "phx/mesh.hpp"
#include "phx/mesh_handle.hpp"
#include "phx/openvr_mesh_loader.hpp"
#include "phx/openvr_resource_loader.hpp"
#include "phx/phoenix.hpp"
#include "phx/rendering_system.hpp"
#include "phx/resource_declaration.hpp"
#include "phx/resource_manager.hpp"
#include "phx/resource_proxy.hpp"
#include "phx/runtime_component.hpp"
#include "phx/scene.hpp"
#include "phx/scene_loader.hpp"
#include "phx/setup.hpp"
#include "phx/splash_screen.hpp"
#include "phx/transform.hpp"
#include "phx/virtual_platform.hpp"
#include "phx/window.hpp"
#include "controller_behavior.hpp"
......@@ -68,36 +68,36 @@ void AddControllerEntity(const std::shared_ptr<phx::Scene>& scene,
controller->AddComponent<ControllerBehavior>()->SetSide(side);
}
void SetupOpenVRController(const std::shared_ptr<phx::Scene>& scene,
phx::HMD* hmd) {
void AddController(const std::shared_ptr<phx::Scene>& scene,
ControllerBehavior::Side side) {
auto& resource_manager = phx::ResourceManager::instance();
auto openvr_mesh_loader = std::make_unique<phx::OpenvrMeshLoader>(hmd);
resource_manager.RegisterResourceType(".openvr",
std::move(openvr_mesh_loader));
phx::ResourceDeclaration material_declaration{"material.openvr"};
phx::ResourceDeclaration mesh_declaration{
{"TYPE", "openVR"},
{"OpenVR_type", "mesh"},
{"side", (side == ControllerBehavior::RIGHT ? "right" : "left")}};
auto mesh_proxy =
phx::ResourceManager::instance().DeclareResource(mesh_declaration);
mesh_proxy->Load();
phx::ResourceDeclaration material_declaration{{"TYPE", "openVR"},
{"OpenVR_type", "material"}};
auto material_proxy = resource_manager.DeclareResource(material_declaration);
material_proxy->Load();
phx::ResourceDeclaration right_controller_declaration{
"controller_right.openvr"};
auto right_controller_proxy =
resource_manager.DeclareResource(right_controller_declaration);
right_controller_proxy->Load();
if (right_controller_proxy->GetAs<phx::Mesh>() != nullptr) {
AddControllerEntity(scene, right_controller_proxy, material_proxy,
ControllerBehavior::RIGHT);
if (mesh_proxy->GetAs<phx::Mesh>() != nullptr) {
AddControllerEntity(scene, mesh_proxy, material_proxy, side);
}
phx::ResourceDeclaration left_controller_declaration{
"controller_left.openvr"};
auto left_controller_proxy =
resource_manager.DeclareResource(left_controller_declaration);
left_controller_proxy->Load();
if (left_controller_proxy->GetAs<phx::Mesh>() != nullptr) {
AddControllerEntity(scene, left_controller_proxy, material_proxy,
ControllerBehavior::LEFT);
}
void SetupOpenVRController(const std::shared_ptr<phx::Scene>& scene,
phx::HMD* hmd) {
auto& resource_manager = phx::ResourceManager::instance();
auto openvr_loader = std::make_unique<phx::OpenVRResourceLoader>(hmd);
resource_manager.RegisterResourceType("openVR", std::move(openvr_loader));
AddController(scene, ControllerBehavior::RIGHT);
AddController(scene, ControllerBehavior::LEFT);
}
int main(int, char**) {
......@@ -112,8 +112,6 @@ int main(int, char**) {
splash.SetLoadProgress(progress);
splash.Draw();
});
phx::ResourceManager::instance().RegisterResourceType(
".obj", std::move(assimp_loader));
phx::InputSystem* input_system = engine->GetSystem<phx::InputSystem>();
ViewerSystem* viewer_system = engine->CreateSystem<ViewerSystem>();
......@@ -154,7 +152,9 @@ int main(int, char**) {
}
auto virtual_platform_transform =
scene->GetEntitiesWithComponents<phx::VirtualPlatform>()[0]
scene
->GetEntitiesWithComponents<
phx::RuntimeComponent<phx::USER_PLATFORM>>()[0]
->GetFirstComponent<phx::Transform>();
virtual_platform_transform->SetLocalTranslation(glm::vec3(0, 1.0, 5.0));
......@@ -167,8 +167,8 @@ int main(int, char**) {
1000.0f);
camera_transform->SetLocalTranslation(glm::vec3(0, 0, 0));
camera_transform->SetParent(virtual_platform_transform, false);
auto virtual_platform =
scene->GetEntitiesWithComponents<phx::VirtualPlatform>()[0];
auto virtual_platform = scene->GetEntitiesWithComponents<
phx::RuntimeComponent<phx::USER_PLATFORM>>()[0];
virtual_platform->AddComponent<NavigationBehavior>();
engine->Run();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment