Adding a method of rendering GUI's that avoid the whole throwing raw

data around everywhere thing I had going on before
This commit is contained in:
MitchellHansen
2017-09-27 23:36:20 -07:00
parent a6e18bbb54
commit 3ff6fb0b14
11 changed files with 343 additions and 59 deletions

View File

@@ -197,6 +197,39 @@ void Camera::recieve_event(VrEventPublisher* publisher, std::unique_ptr<vr::Even
}
void Camera::render_gui() {
ImGui::Begin("Camera");
ImGui::Columns(2);
ImGui::Text("Camera Inclination");
ImGui::Text("Camera Azimuth");
ImGui::Text("Camera Pos_X");
ImGui::Text("Camera Poz_Y");
ImGui::Text("Camera Poz_Z");
ImGui::NextColumn();
ImGui::Text("%f", direction.x);
ImGui::Text("%f", direction.y);
ImGui::Text("%f", position.x);
ImGui::Text("%f", position.y);
ImGui::Text("%f", position.z);
ImGui::Separator();
ImGui::Columns(1);
ImGui::SliderFloat("Camera Speed", &default_impulse, 0, 4);
ImGui::End();
}
void Camera::update_gui() {
rendering = true;
}
void Camera::look_at_center() {
direction = CartToNormalizedSphere(sf::Vector3f(60, 60, 35) - position);