| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // View3D.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho.Gui
- {
- /// <summary>
- /// %UI element which renders a 3D scene.
- /// </summary>
- public unsafe partial class View3D : Window
- {
- unsafe partial void OnView3DCreated ();
- [Preserve]
- public View3D (IntPtr handle) : base (handle)
- {
- OnView3DCreated ();
- }
- [Preserve]
- protected View3D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnView3DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int View3D_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (View3D_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (View3D_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int View3D_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(View3D));
- return new StringHash (View3D_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(View3D));
- return Marshal.PtrToStringAnsi (View3D_GetTypeNameStatic ());
- }
- [Preserve]
- public View3D () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_View3D (IntPtr context);
- [Preserve]
- public View3D (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(View3D));
- handle = View3D_View3D ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnView3DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void View3D_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(View3D));
- View3D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void View3D_OnResize (IntPtr handle, ref Urho.IntVector2 newSize, ref Urho.IntVector2 delta);
- /// <summary>
- /// React to resize.
- /// </summary>
- public override void OnResize (Urho.IntVector2 newSize, Urho.IntVector2 delta)
- {
- Runtime.ValidateRefCounted (this);
- View3D_OnResize (handle, ref newSize, ref delta);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void View3D_SetView (IntPtr handle, IntPtr scene, IntPtr camera, bool ownScene);
- /// <summary>
- /// Define the scene and camera to use in rendering. When ownScene is true the View3D will take ownership of them with shared pointers.
- /// </summary>
- public void SetView (Scene scene, Camera camera, bool ownScene = true)
- {
- Runtime.ValidateRefCounted (this);
- View3D_SetView (handle, (object)scene == null ? IntPtr.Zero : scene.Handle, (object)camera == null ? IntPtr.Zero : camera.Handle, ownScene);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void View3D_SetFormat (IntPtr handle, uint format);
- /// <summary>
- /// Set render texture pixel format. Default is RGB.
- /// </summary>
- private void SetFormat (uint format)
- {
- Runtime.ValidateRefCounted (this);
- View3D_SetFormat (handle, format);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void View3D_SetAutoUpdate (IntPtr handle, bool enable);
- /// <summary>
- /// Set render target auto update mode. Default is true.
- /// </summary>
- private void SetAutoUpdate (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- View3D_SetAutoUpdate (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void View3D_QueueUpdate (IntPtr handle);
- /// <summary>
- /// Queue manual update on the render texture.
- /// </summary>
- public void QueueUpdate ()
- {
- Runtime.ValidateRefCounted (this);
- View3D_QueueUpdate (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint View3D_GetFormat (IntPtr handle);
- /// <summary>
- /// Return render texture pixel format.
- /// </summary>
- private uint GetFormat ()
- {
- Runtime.ValidateRefCounted (this);
- return View3D_GetFormat (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool View3D_GetAutoUpdate (IntPtr handle);
- /// <summary>
- /// Return whether render target updates automatically.
- /// </summary>
- private bool GetAutoUpdate ()
- {
- Runtime.ValidateRefCounted (this);
- return View3D_GetAutoUpdate (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetScene (IntPtr handle);
- /// <summary>
- /// Return scene.
- /// </summary>
- private Scene GetScene ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Scene> (View3D_GetScene (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetCameraNode (IntPtr handle);
- /// <summary>
- /// Return camera scene node.
- /// </summary>
- private Node GetCameraNode ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Node> (View3D_GetCameraNode (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetRenderTexture (IntPtr handle);
- /// <summary>
- /// Return render texture.
- /// </summary>
- private Texture2D GetRenderTexture ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Texture2D> (View3D_GetRenderTexture (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetDepthTexture (IntPtr handle);
- /// <summary>
- /// Return depth stencil texture.
- /// </summary>
- private Texture2D GetDepthTexture ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Texture2D> (View3D_GetDepthTexture (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr View3D_GetViewport (IntPtr handle);
- /// <summary>
- /// Return viewport.
- /// </summary>
- private Viewport GetViewport ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Viewport> (View3D_GetViewport (handle));
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return render texture pixel format.
- /// Or
- /// Set render texture pixel format. Default is RGB.
- /// </summary>
- public uint Format {
- get {
- return GetFormat ();
- }
- set {
- SetFormat (value);
- }
- }
- /// <summary>
- /// Return whether render target updates automatically.
- /// Or
- /// Set render target auto update mode. Default is true.
- /// </summary>
- public bool AutoUpdate {
- get {
- return GetAutoUpdate ();
- }
- set {
- SetAutoUpdate (value);
- }
- }
- /// <summary>
- /// Return scene.
- /// </summary>
- public Scene Scene {
- get {
- return GetScene ();
- }
- }
- /// <summary>
- /// Return camera scene node.
- /// </summary>
- public Node CameraNode {
- get {
- return GetCameraNode ();
- }
- }
- /// <summary>
- /// Return render texture.
- /// </summary>
- public Texture2D RenderTexture {
- get {
- return GetRenderTexture ();
- }
- }
- /// <summary>
- /// Return depth stencil texture.
- /// </summary>
- public Texture2D DepthTexture {
- get {
- return GetDepthTexture ();
- }
- }
- /// <summary>
- /// Return viewport.
- /// </summary>
- public Viewport Viewport {
- get {
- return GetViewport ();
- }
- }
- }
- }
|