mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:48:54 +02:00
Fixing typo and review comments
This commit is contained in:
parent
fc15c7cd98
commit
b37a6f689a
6 changed files with 7 additions and 13 deletions
|
@ -3,7 +3,7 @@
|
||||||
"channels": [
|
"channels": [
|
||||||
{ "from": "Standard.LY", "to": "Actions.TranslateZ" },
|
{ "from": "Standard.LY", "to": "Actions.TranslateZ" },
|
||||||
{ "from": "Standard.LX", "to": "Actions.TranslateX" },
|
{ "from": "Standard.LX", "to": "Actions.TranslateX" },
|
||||||
{ "from": "Standard.RX", "to": "Actions.Yaw" },
|
{ "from": "Standard.RX", "to": "Actions.Yaw" },
|
||||||
{ "from": "Standard.RY", "to": "Actions.Pitch" },
|
{ "from": "Standard.RY", "to": "Actions.Pitch" },
|
||||||
|
|
||||||
{ "from": [ "Standard.DU", "Standard.DL", "Standard.DR", "Standard.DD" ], "to": "Standard.LeftPrimaryThumb" },
|
{ "from": [ "Standard.DU", "Standard.DL", "Standard.DR", "Standard.DD" ], "to": "Standard.LeftPrimaryThumb" },
|
||||||
|
|
|
@ -647,7 +647,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
// Setup the keyboardMouseDevice and the user input mapper with the default bindings
|
// Setup the keyboardMouseDevice and the user input mapper with the default bindings
|
||||||
userInputMapper->registerDevice(_keyboardMouseDevice);
|
userInputMapper->registerDevice(_keyboardMouseDevice);
|
||||||
|
|
||||||
//userInputMapper->getApplicationDevice()->(float)qApp->getAvatarUpdater()->isHMDMode()
|
|
||||||
|
|
||||||
// check first run...
|
// check first run...
|
||||||
if (_firstRun.get()) {
|
if (_firstRun.get()) {
|
||||||
|
|
|
@ -75,8 +75,6 @@ namespace controller {
|
||||||
makeAxisPair(Action::BOOM_IN, "BoomIn"),
|
makeAxisPair(Action::BOOM_IN, "BoomIn"),
|
||||||
makeAxisPair(Action::BOOM_OUT, "BoomOut"),
|
makeAxisPair(Action::BOOM_OUT, "BoomOut"),
|
||||||
|
|
||||||
makeButtonPair(Action::IN_HMD, "InHMD"),
|
|
||||||
|
|
||||||
// Deprecated aliases
|
// Deprecated aliases
|
||||||
// FIXME remove after we port all scripts
|
// FIXME remove after we port all scripts
|
||||||
makeAxisPair(Action::LONGITUDINAL_BACKWARD, "LONGITUDINAL_BACKWARD"),
|
makeAxisPair(Action::LONGITUDINAL_BACKWARD, "LONGITUDINAL_BACKWARD"),
|
||||||
|
|
|
@ -77,9 +77,7 @@ enum class Action {
|
||||||
// Biseced aliases for TRANSLATE_CAMERA_Z
|
// Biseced aliases for TRANSLATE_CAMERA_Z
|
||||||
BOOM_IN,
|
BOOM_IN,
|
||||||
BOOM_OUT,
|
BOOM_OUT,
|
||||||
|
|
||||||
IN_HMD, // THis is a read only action ?
|
|
||||||
|
|
||||||
NUM_ACTIONS,
|
NUM_ACTIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ void StateController::update(float deltaTime, bool jointsCaptured) {}
|
||||||
void StateController::focusOutEvent() {}
|
void StateController::focusOutEvent() {}
|
||||||
|
|
||||||
void StateController::addInputVariant(QString name, ReadLambda& lambda) {
|
void StateController::addInputVariant(QString name, ReadLambda& lambda) {
|
||||||
namedReadLambdas.push_back(NamedReadLambda(name, lambda));
|
_namedReadLambdas.push_back(NamedReadLambda(name, lambda));
|
||||||
}
|
}
|
||||||
void StateController::buildDeviceProxy(DeviceProxy::Pointer proxy) {
|
void StateController::buildDeviceProxy(DeviceProxy::Pointer proxy) {
|
||||||
proxy->_name = _name;
|
proxy->_name = _name;
|
||||||
|
@ -42,15 +42,15 @@ void StateController::buildDeviceProxy(DeviceProxy::Pointer proxy) {
|
||||||
QVector<Input::NamedPair> availableInputs;
|
QVector<Input::NamedPair> availableInputs;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (auto pair : namedReadLambdas) {
|
for (auto& pair : _namedReadLambdas) {
|
||||||
availableInputs.push_back(Input::NamedPair(Input(_deviceID, i, ChannelType::BUTTON), pair.first));
|
availableInputs.push_back(Input::NamedPair(Input(_deviceID, i, ChannelType::BUTTON), pair.first));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return availableInputs;
|
return availableInputs;
|
||||||
};
|
};
|
||||||
proxy->createEndpoint = [this] (const Input& input) -> Endpoint::Pointer {
|
proxy->createEndpoint = [this] (const Input& input) -> Endpoint::Pointer {
|
||||||
if (input.getChannel() < namedReadLambdas.size()) {
|
if (input.getChannel() < _namedReadLambdas.size()) {
|
||||||
return std::make_shared<LambdaEndpoint>(namedReadLambdas[input.getChannel()].second);
|
return std::make_shared<LambdaEndpoint>(_namedReadLambdas[input.getChannel()].second);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Endpoint::Pointer();
|
return Endpoint::Pointer();
|
||||||
|
|
|
@ -40,8 +40,7 @@ public:
|
||||||
|
|
||||||
void addInputVariant(QString name, ReadLambda& lambda);
|
void addInputVariant(QString name, ReadLambda& lambda);
|
||||||
|
|
||||||
QVector<NamedReadLambda> namedReadLambdas;
|
QVector<NamedReadLambda> _namedReadLambdas;
|
||||||
QVector<Input::NamedPair> availableInputs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue