mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 21:23:18 +02:00
work on intersection with rotation overlays
This commit is contained in:
parent
2004159778
commit
458475ee64
1 changed files with 30 additions and 0 deletions
|
@ -1507,6 +1507,12 @@ SelectionDisplay = (function () {
|
|||
}
|
||||
|
||||
var pickRay = Camera.computePickRay(event.x, event.y);
|
||||
Overlays.editOverlay(selectionBox, { ignoreRayIntersection: true });
|
||||
Overlays.editOverlay(baseOfEntityProjectionOverlay, { ignoreRayIntersection: true });
|
||||
Overlays.editOverlay(rotateOverlayInner, { ignoreRayIntersection: false });
|
||||
Overlays.editOverlay(rotateOverlayOuter, { ignoreRayIntersection: false });
|
||||
Overlays.editOverlay(rotateOverlayCurrent, { ignoreRayIntersection: false });
|
||||
|
||||
var result = Overlays.findRayIntersection(pickRay);
|
||||
print("result.intersects:" + result.intersects);
|
||||
print("result.overlayID:" + overlayNames[result.overlayID]);
|
||||
|
@ -1519,12 +1525,36 @@ SelectionDisplay = (function () {
|
|||
if (!entitySelected || mode !== "ROTATE_PITCH") {
|
||||
return; // not allowed
|
||||
}
|
||||
var pickRay = Camera.computePickRay(event.x, event.y);
|
||||
Overlays.editOverlay(selectionBox, { ignoreRayIntersection: true });
|
||||
Overlays.editOverlay(baseOfEntityProjectionOverlay, { ignoreRayIntersection: true });
|
||||
Overlays.editOverlay(rotateOverlayInner, { ignoreRayIntersection: false });
|
||||
Overlays.editOverlay(rotateOverlayOuter, { ignoreRayIntersection: false });
|
||||
Overlays.editOverlay(rotateOverlayCurrent, { ignoreRayIntersection: false });
|
||||
var result = Overlays.findRayIntersection(pickRay);
|
||||
print("result.intersects:" + result.intersects);
|
||||
print("result.overlayID:" + overlayNames[result.overlayID]);
|
||||
print("result.distance:" + result.distance);
|
||||
print("result.face:" + result.face);
|
||||
Vec3.print("result.intersection:", result.intersection);
|
||||
};
|
||||
|
||||
that.rotateRoll = function(event) {
|
||||
if (!entitySelected || mode !== "ROTATE_ROLL") {
|
||||
return; // not allowed
|
||||
}
|
||||
var pickRay = Camera.computePickRay(event.x, event.y);
|
||||
Overlays.editOverlay(selectionBox, { ignoreRayIntersection: true });
|
||||
Overlays.editOverlay(baseOfEntityProjectionOverlay, { ignoreRayIntersection: true });
|
||||
Overlays.editOverlay(rotateOverlayInner, { ignoreRayIntersection: false });
|
||||
Overlays.editOverlay(rotateOverlayOuter, { ignoreRayIntersection: false });
|
||||
Overlays.editOverlay(rotateOverlayCurrent, { ignoreRayIntersection: false });
|
||||
var result = Overlays.findRayIntersection(pickRay);
|
||||
print("result.intersects:" + result.intersects);
|
||||
print("result.overlayID:" + overlayNames[result.overlayID]);
|
||||
print("result.distance:" + result.distance);
|
||||
print("result.face:" + result.face);
|
||||
Vec3.print("result.intersection:", result.intersection);
|
||||
};
|
||||
|
||||
that.checkMove = function() {
|
||||
|
|
Loading…
Reference in a new issue