mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 21:06:54 +02:00
daving work
This commit is contained in:
parent
1658ced671
commit
655483182c
5 changed files with 17 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -105,6 +105,8 @@ protected:
|
|||
PoseStateMap _poseStateMap;
|
||||
|
||||
static bool _lowVelocityFilter;
|
||||
static float _translationFilterConstant;
|
||||
static float _rotationFilterConstant;
|
||||
|
||||
private:
|
||||
static float _reticleMoveSpeed;
|
||||
|
|
BIN
plugins/openvr/src/.#ViveControllerManager.cpp
Normal file
BIN
plugins/openvr/src/.#ViveControllerManager.cpp
Normal file
Binary file not shown.
|
@ -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 {
|
||||
|
|
|
@ -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 };
|
||||
|
|
Loading…
Reference in a new issue