| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System.Runtime.CompilerServices;
- using BansheeEngine;
- namespace BansheeEditor
- {
- public class Gizmos
- {
- private static Color _color;
- private static Matrix4 _transform;
- public static Color color
- {
- get { return _color; }
- set { _color = value; Internal_SetColor(_color); }
- }
- public static Matrix4 transform
- {
- get { return _transform; }
- set { _transform = value; Internal_SetTransform(_transform); }
- }
- public static void DrawCube(Vector3 position, Vector3 extents)
- {
- Internal_DrawCube(position, extents);
- }
- public static void DrawSphere(Vector3 position, float radius)
- {
- Internal_DrawSphere(position, radius);
- }
- public static void DrawWireCube(Vector3 position, Vector3 extents)
- {
- Internal_DrawWireCube(position, extents);
- }
- public static void DrawWireSphere(Vector3 position, float radius)
- {
- Internal_DrawWireSphere(position, radius);
- }
- public static void DrawLine(Vector3 start, Vector3 end)
- {
- Internal_DrawLine(start, end);
- }
- public static void DrawFrustum(Vector3 position, float aspect, Degree FOV, float near, float far)
- {
- Internal_DrawFrustum(position, aspect, FOV, near, far);
- }
- public static void DrawIcon(Vector3 position, SpriteTexture image, bool fixedScale)
- {
- Internal_DrawIcon(position, image, fixedScale);
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_SetColor(Color color);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_SetTransform(Matrix4 transform);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawCube(Vector3 position, Vector3 extents);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawSphere(Vector3 position, float radius);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawWireCube(Vector3 position, Vector3 extents);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawWireSphere(Vector3 position, float radius);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawLine(Vector3 start, Vector3 end);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawFrustum(Vector3 position, float aspect, Degree FOV, float near, float far);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_DrawIcon(Vector3 position, SpriteTexture image, bool fixedScale);
- }
- }
|