/// <summary> /// Centrar la camara sobre un objeto seleccionado /// </summary> public void zoomObject() { var aabb = MeshCreatorUtils.getSelectionBoundingBox(control.SelectionList); if (aabb != null) { control.Camera.CameraCenter = aabb.calculateBoxCenter(); } }
/// <summary> /// Poner la camara en front view respecto de un objeto seleccionado /// </summary> public void setFrontView() { var aabb = MeshCreatorUtils.getSelectionBoundingBox(control.SelectionList); TGCVector3 lookAt; if (aabb != null) { lookAt = aabb.calculateBoxCenter(); } else { lookAt = TGCVector3.Empty; } control.Camera.setFixedView(lookAt, 0, 0, control.Camera.CameraDistance); }
/// <summary> /// Obtener pivote central para efectuar la rotacion. /// Se busca el centro de todos los AABB /// </summary> public TGCVector3 getRotationPivot() { var aabb = MeshCreatorUtils.getSelectionBoundingBox(control.SelectionList); return(aabb.calculateBoxCenter()); }