mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 21:28:54 +02:00
use axis aligned bounding box for highlight and selection box instead of non-axis aligned box
This commit is contained in:
parent
82a9429414
commit
cdafba603d
1 changed files with 4 additions and 10 deletions
|
@ -393,14 +393,8 @@ SelectionDisplay = (function () {
|
||||||
|
|
||||||
that.highlightSelectable = function(entityID) {
|
that.highlightSelectable = function(entityID) {
|
||||||
var properties = Entities.getEntityProperties(entityID);
|
var properties = Entities.getEntityProperties(entityID);
|
||||||
var center = { x: properties.position.x, y: properties.position.y, z: properties.position.z };
|
Overlays.editOverlay(highlightBox, { visible: true, position: properties.boundingBox.center,
|
||||||
Overlays.editOverlay(highlightBox,
|
dimensions: properties.boundingBox.dimensions });
|
||||||
{
|
|
||||||
visible: true,
|
|
||||||
position: center,
|
|
||||||
dimensions: properties.dimensions,
|
|
||||||
rotation: properties.rotation,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
that.unhighlightSelectable = function(entityID) {
|
that.unhighlightSelectable = function(entityID) {
|
||||||
|
@ -642,8 +636,8 @@ SelectionDisplay = (function () {
|
||||||
|
|
||||||
Overlays.editOverlay(highlightBox, { visible: false });
|
Overlays.editOverlay(highlightBox, { visible: false });
|
||||||
|
|
||||||
Overlays.editOverlay(selectionBox, { visible: selectionBoxVisible, position: objectCenter, dimensions: properties.dimensions,
|
Overlays.editOverlay(selectionBox, { visible: selectionBoxVisible, position: properties.boundingBox.center,
|
||||||
rotation: properties.rotation,});
|
dimensions: properties.boundingBox.dimensions });
|
||||||
|
|
||||||
|
|
||||||
Overlays.editOverlay(grabberMoveUp, { visible: translateHandlesVisible, position: { x: boundsCenter.x, y: top + grabberMoveUpOffset, z: boundsCenter.z } });
|
Overlays.editOverlay(grabberMoveUp, { visible: translateHandlesVisible, position: { x: boundsCenter.x, y: top + grabberMoveUpOffset, z: boundsCenter.z } });
|
||||||
|
|
Loading…
Reference in a new issue