Esempio n. 1
0
        /// <summary>
        /// Centrar la camara sobre un objeto seleccionado
        /// </summary>
        public void zoomObject()
        {
            TgcBoundingBox aabb = MeshCreatorUtils.getSelectionBoundingBox(control.SelectionList);

            if (aabb != null)
            {
                control.Camera.CameraCenter = aabb.calculateBoxCenter();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Poner la camara en front view respecto de un objeto seleccionado
        /// </summary>
        public void setFrontView()
        {
            TgcBoundingBox aabb = MeshCreatorUtils.getSelectionBoundingBox(control.SelectionList);
            Vector3        lookAt;

            if (aabb != null)
            {
                lookAt = aabb.calculateBoxCenter();
            }
            else
            {
                lookAt = new Vector3(0, 0, 0);
            }
            control.Camera.setFixedView(lookAt, 0, 0, control.Camera.CameraDistance);
        }
Esempio n. 3
0
        /// <summary>
        /// Obtener pivote central para efectuar la rotacion.
        /// Se busca el centro de todos los AABB
        /// </summary>
        public Vector3 getRotationPivot()
        {
            TgcBoundingBox aabb = MeshCreatorUtils.getSelectionBoundingBox(control.SelectionList);

            return(aabb.calculateBoxCenter());
        }