//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2017 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// using BansheeEngine; namespace BansheeEditor { /** @addtogroup Gizmos * @{ */ /// /// Handles drawing of gizmos for the component. /// internal class CameraGizmo { /// /// Method called by the runtime when gizmos are meant to be drawn. /// /// Camera to draw gizmos for. [DrawGizmo(DrawGizmoFlags.Selected)] private static void Draw(Camera camera) { SceneObject so = camera.SceneObject; Gizmos.Color = Color.Yellow; Gizmos.Transform = Matrix4.TRS(so.Position, Quaternion.LookRotation(so.Rotation.Forward, so.Rotation.Up), Vector3.One); Gizmos.DrawFrustum(Vector3.Zero, camera.AspectRatio, camera.FieldOfView, camera.NearClipPlane, camera.FarClipPlane); } } /** @} */ }