using System; using System.Runtime.CompilerServices; using BansheeEngine; namespace BansheeEditor { /// /// Handles rendering of the scene grid for the specified camera. Grid properties are controlled through /// . /// internal sealed class SceneGrid : ScriptObject { /// /// Creates a new scene grid renderer. /// /// Camera into which the grid will be rendered. internal SceneGrid(Camera sceneCamera) { Internal_Create(this, sceneCamera.Native.GetCachedPtr()); } /// /// Queues grid drawing for this frame. /// internal void Draw() { Internal_Draw(mCachedPtr); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_Create(SceneGrid managedInstance, IntPtr camera); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_Draw(IntPtr thisPtr); } }