mirror of
https://github.com/overte-org/overte.git
synced 2025-07-10 16:18:37 +02:00
Tidying
This commit is contained in:
parent
e4123070c4
commit
2bd3f87d73
1 changed files with 10 additions and 8 deletions
|
@ -1310,6 +1310,7 @@
|
|||
}
|
||||
|
||||
function startDirectScaling(targetPosition) {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
var initialTargetPosition,
|
||||
initialTargetsCenter;
|
||||
|
||||
|
@ -1326,17 +1327,21 @@
|
|||
}
|
||||
|
||||
function updateDirectScaling(targetPosition) {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
otherTargetPosition = targetPosition;
|
||||
}
|
||||
|
||||
function stopDirectScaling() {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
selection.finishDirectScaling();
|
||||
isDirectScaling = false;
|
||||
}
|
||||
|
||||
function startHandleScaling(targetPosition, overlayID) {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
var initialTargetPosition,
|
||||
boundingBox,
|
||||
selectionPositionAndOrientation,
|
||||
scaleAxis,
|
||||
handDistance;
|
||||
|
||||
|
@ -1375,10 +1380,12 @@
|
|||
}
|
||||
|
||||
function updateHandleScaling(targetPosition) {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
otherTargetPosition = targetPosition;
|
||||
}
|
||||
|
||||
function stopHandleScaling() {
|
||||
// Called on grabbing hand by scaling hand.
|
||||
handles.finishScaling();
|
||||
selection.finishHandleScaling();
|
||||
handles.grab(null); // Stop highlighting grabbed handle and resume displaying all handles.
|
||||
|
@ -1388,17 +1395,12 @@
|
|||
|
||||
function applyGrab() {
|
||||
// Sets position and orientation of selection per grabbing hand.
|
||||
var handPosition,
|
||||
handOrientation,
|
||||
deltaOrientation,
|
||||
var deltaOrientation,
|
||||
selectionPosition,
|
||||
selectionOrientation;
|
||||
|
||||
handPosition = hand.position();
|
||||
handOrientation = hand.orientation();
|
||||
|
||||
deltaOrientation = Quat.multiply(handOrientation, initialHandOrientationInverse);
|
||||
selectionPosition = Vec3.sum(handPosition, Vec3.multiplyQbyV(deltaOrientation, initialHandToSelectionVector));
|
||||
deltaOrientation = Quat.multiply(hand.orientation(), initialHandOrientationInverse);
|
||||
selectionPosition = Vec3.sum(hand.position(), Vec3.multiplyQbyV(deltaOrientation, initialHandToSelectionVector));
|
||||
selectionOrientation = Quat.multiply(deltaOrientation, initialSelectionOrientation);
|
||||
|
||||
selection.setPositionAndOrientation(selectionPosition, selectionOrientation);
|
||||
|
|
Loading…
Reference in a new issue