Esempio n. 1
0
        /// <summary>
        /// Poner la camara en front view respecto de un conjunto de primitivas
        /// </summary>
        public static void setCameraFrontView(MeshCreatorCamera camera, List <EditPolyPrimitive> primitives, Matrix transform)
        {
            TgcBoundingBox aabb = getSelectionBoundingBox(primitives);
            Vector3        lookAt;

            if (aabb != null)
            {
                lookAt = Vector3.TransformCoordinate(aabb.calculateBoxCenter(), transform);
            }
            else
            {
                lookAt = new Vector3(0, 0, 0);
            }
            camera.setFixedView(lookAt, 0, 0, camera.CameraDistance);
        }
Esempio n. 2
0
        /// <summary>
        ///     Poner la camara en left view respecto de un conjunto de primitivas
        /// </summary>
        public static void setCameraLeftView(MeshCreatorCamera camera, List <EditPolyPrimitive> primitives,
                                             TGCMatrix transform)
        {
            var        aabb = getSelectionBoundingBox(primitives);
            TGCVector3 lookAt;

            if (aabb != null)
            {
                lookAt = TGCVector3.TransformCoordinate(aabb.calculateBoxCenter(), transform);
            }
            else
            {
                lookAt = TGCVector3.Empty;
            }
            camera.setFixedView(lookAt, 0, FastMath.PI_HALF, camera.CameraDistance);
        }
Esempio n. 3
0
 /// <summary>
 /// Poner la camara en front view respecto de un conjunto de primitivas
 /// </summary>
 public static void setCameraFrontView(MeshCreatorCamera camera, List<EditPolyPrimitive> primitives, Matrix transform)
 {
     TgcBoundingBox aabb = getSelectionBoundingBox(primitives);
     Vector3 lookAt;
     if (aabb != null)
     {
         lookAt = Vector3.TransformCoordinate(aabb.calculateBoxCenter(), transform);
     }
     else
     {
         lookAt = new Vector3(0, 0, 0);
     }
     camera.setFixedView(lookAt, 0, 0, camera.CameraDistance);
 }