review vr stuff, fix controller-ui ray casting

This commit is contained in:
2019-06-05 16:27:29 +02:00
parent 02b92cf382
commit dc9da77cf8
10 changed files with 96 additions and 47 deletions

View File

@@ -40,6 +40,8 @@ struct Vive
glm::mat4 m_view[2];
glm::mat4 m_proj[2];
glm::mat4 m_pose;
glm::vec3 m_initial_position;
bool m_position_valid = false;
bool m_active = false;
std::function<void(const glm::mat4& m_proj, const glm::mat4& m_view, const glm::mat4& m_pose)> on_draw = nullptr;
std::function<void(const ViveController&, ViveController::kButton, ViveController::kAction, glm::vec2 axis)> on_button = nullptr;