daving work

This commit is contained in:
Dante Ruiz 2017-05-12 23:38:20 +01:00
parent 1658ced671
commit 655483182c
5 changed files with 17 additions and 1 deletions

View file

@ -16,6 +16,8 @@
namespace controller {
bool InputDevice::_lowVelocityFilter = false;
float InputDevice::_translationFilterConstant = 0.1f;
float InputDevice::_rotationFilterConstant = 0.1f;
const float DEFAULT_HAND_RETICLE_MOVE_SPEED = 37.5f;
float InputDevice::_reticleMoveSpeed = DEFAULT_HAND_RETICLE_MOVE_SPEED;

View file

@ -105,6 +105,8 @@ protected:
PoseStateMap _poseStateMap;
static bool _lowVelocityFilter;
static float _translationFilterConstant;
static float _rotationFilterConstant;
private:
static float _reticleMoveSpeed;

Binary file not shown.

View file

@ -147,6 +147,11 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu
}
}
ViveControllerManager::InputDevice::InputDevice(vr::IVRSystem*& system) :
controller::InputDevice("Vive"), _system(system) {
createPreferences();
_lowVelocityFilter = false;
}
void ViveControllerManager::InputDevice::update(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) {
_poseStateMap.clear();
_buttonPressedMap.clear();
@ -630,6 +635,12 @@ void ViveControllerManager::InputDevice::createPreferences() {
preferences->addPreference(preference);
}
{
auto getter = [this]()->float { return _translationFilterConstant; };
auto setter = [this](const float& value) { _translationFilterConstant; };
}
}
controller::Input::NamedVector ViveControllerManager::InputDevice::getAvailableInputs() const {

View file

@ -50,7 +50,7 @@ public:
private:
class InputDevice : public controller::InputDevice {
public:
InputDevice(vr::IVRSystem*& system) : controller::InputDevice("Vive"), _system(system) { createPreferences(); }
InputDevice(vr::IVRSystem*& system);
private:
// Device functions
controller::Input::NamedVector getAvailableInputs() const override;
@ -121,6 +121,7 @@ private:
float _leftHapticDuration { 0.0f };
float _rightHapticStrength { 0.0f };
float _rightHapticDuration { 0.0f };
bool _enableFiltering { false };
bool _triggersPressedHandled { false };
bool _calibrated { false };
bool _timeTilCalibrationSet { false };