mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 22:39:09 -05:00
Dont allow axis flipping for propertry axis
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
-- The axis values can either go back to 0 when the joystick is released or it can
|
||||
-- stay at the value it was before the joystick was released.
|
||||
-- The latter is called a sticky axis, when the values don't go back to 0.
|
||||
-- Seventh parameter is the sensitivity for the axis
|
||||
-- Seventh parameter can be used to reverse the camera movement for the axis
|
||||
-- Eighth parameter is the sensitivity for the axis
|
||||
|
||||
|
||||
-- Parameters for bindJoystickAxisProperty:
|
||||
@@ -59,8 +60,6 @@ local freezeValue = function(name, axis, min, max)
|
||||
local isPropertyBound = true;
|
||||
if joystickType == "None" then
|
||||
isPropertyBound = false;
|
||||
else
|
||||
isPropertyBound = true;
|
||||
end
|
||||
|
||||
if isPropertyBound then
|
||||
|
||||
@@ -99,8 +99,7 @@ public:
|
||||
|
||||
void setAxisMappingProperty(std::string joystickName, int axis,
|
||||
std::string propertyUri, float min = 0.f, float max = 1.f,
|
||||
AxisInvert shouldInvert = AxisInvert::No, AxisFlip shouldFlip = AxisFlip::No,
|
||||
bool isRemote = true
|
||||
AxisInvert shouldInvert = AxisInvert::No, bool isRemote = true
|
||||
);
|
||||
|
||||
AxisInformation axisMapping(const std::string& joystickName, int axis) const;
|
||||
|
||||
@@ -114,7 +114,6 @@ public:
|
||||
float min = 0.f, float max = 1.f,
|
||||
JoystickCameraStates::AxisInvert shouldInvert =
|
||||
JoystickCameraStates::AxisInvert::No,
|
||||
JoystickCameraStates::AxisFlip shouldFlip = JoystickCameraStates::AxisFlip::No,
|
||||
bool isRemote = true);
|
||||
|
||||
JoystickCameraStates::AxisInformation joystickAxisMapping(
|
||||
|
||||
@@ -276,7 +276,6 @@ void JoystickCameraStates::setAxisMappingProperty(std::string joystickName,
|
||||
std::string propertyUri,
|
||||
float min, float max,
|
||||
AxisInvert shouldInvert,
|
||||
AxisFlip shouldFlip,
|
||||
bool isRemote)
|
||||
{
|
||||
JoystickCameraState* joystickCameraState = findOrAddJoystickCameraState(joystickName);
|
||||
@@ -292,7 +291,6 @@ void JoystickCameraStates::setAxisMappingProperty(std::string joystickName,
|
||||
|
||||
joystickCameraState->axisMapping[axis].type = AxisType::Property;
|
||||
joystickCameraState->axisMapping[axis].invert = shouldInvert;
|
||||
joystickCameraState->axisMapping[axis].flip = shouldFlip;
|
||||
joystickCameraState->axisMapping[axis].propertyUri = propertyUri;
|
||||
joystickCameraState->axisMapping[axis].minValue = min;
|
||||
joystickCameraState->axisMapping[axis].maxValue = max;
|
||||
|
||||
@@ -544,7 +544,6 @@ void NavigationHandler::setJoystickAxisMappingProperty(std::string joystickName,
|
||||
std::string propertyUri,
|
||||
float min, float max,
|
||||
JoystickCameraStates::AxisInvert shouldInvert,
|
||||
JoystickCameraStates::AxisFlip shouldFlip,
|
||||
bool isRemote)
|
||||
{
|
||||
_orbitalNavigator.joystickStates().setAxisMappingProperty(
|
||||
@@ -554,7 +553,6 @@ void NavigationHandler::setJoystickAxisMappingProperty(std::string joystickName,
|
||||
min,
|
||||
max,
|
||||
shouldInvert,
|
||||
shouldFlip,
|
||||
isRemote
|
||||
);
|
||||
}
|
||||
|
||||
@@ -217,7 +217,6 @@ namespace {
|
||||
* \param min the minimum value that this axis can set for the property
|
||||
* \param max the maximum value that this axis can set for the property
|
||||
* \param shouldInvert if the joystick movement should be inverted or not
|
||||
* \param shouldFlip reverses the movement of the camera that the joystick produces
|
||||
* \param isRemote if true, the property change will also be executed on connected nodes
|
||||
* if false, the property change will only affect the master node
|
||||
*/
|
||||
@@ -225,7 +224,6 @@ namespace {
|
||||
std::string propertyUri,
|
||||
float min = 0.f, float max = 1.f,
|
||||
bool shouldInvert = false,
|
||||
bool shouldFlip = false,
|
||||
bool isRemote = true)
|
||||
{
|
||||
using namespace openspace;
|
||||
@@ -237,7 +235,6 @@ namespace {
|
||||
min,
|
||||
max,
|
||||
JoystickCameraStates::AxisInvert(shouldInvert),
|
||||
JoystickCameraStates::AxisFlip(shouldFlip),
|
||||
isRemote
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user