improve vr controllers handling
This commit is contained in:
@@ -42,14 +42,14 @@ struct Vive
|
||||
vr::IVRSystem* m_hmd = nullptr;
|
||||
vr::IVRCompositor* m_comp = nullptr;
|
||||
vr::IVRSettings* m_settings = nullptr;
|
||||
ViveController m_controllers[2];
|
||||
std::array<ViveController, 2> m_controllers;
|
||||
glm::mat4 m_view[2];
|
||||
glm::mat4 m_proj[2];
|
||||
glm::mat4 m_pose;
|
||||
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)> on_button = nullptr;
|
||||
std::function<void(const ViveController&, ViveController::kButton, ViveController::kAction)> on_analog_button = nullptr;
|
||||
std::function<void(const ViveController&, ViveController::kButton, ViveController::kAction, glm::vec2 axis)> on_button = nullptr;
|
||||
std::function<void(const ViveController&, ViveController::kButton, ViveController::kAction, glm::vec2 force)> on_analog_button = nullptr;
|
||||
|
||||
bool Initialize();
|
||||
void Terminate();
|
||||
|
||||
Reference in New Issue
Block a user