| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // DecalSet.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
- {
- /// <summary>
- /// %Decal renderer component.
- /// </summary>
- public unsafe partial class DecalSet : Drawable
- {
- unsafe partial void OnDecalSetCreated ();
- [Preserve]
- public DecalSet (IntPtr handle) : base (handle)
- {
- OnDecalSetCreated ();
- }
- [Preserve]
- protected DecalSet (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnDecalSetCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int DecalSet_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (DecalSet_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr DecalSet_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (DecalSet_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int DecalSet_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(DecalSet));
- return new StringHash (DecalSet_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr DecalSet_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(DecalSet));
- return Marshal.PtrToStringAnsi (DecalSet_GetTypeNameStatic ());
- }
- [Preserve]
- public DecalSet () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr DecalSet_DecalSet (IntPtr context);
- [Preserve]
- public DecalSet (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(DecalSet));
- handle = DecalSet_DecalSet ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnDecalSetCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(DecalSet));
- DecalSet_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_ApplyAttributes (IntPtr handle);
- /// <summary>
- /// Apply attribute changes that can not be applied immediately. Called after scene load or a network update.
- /// </summary>
- public override void ApplyAttributes ()
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_ApplyAttributes (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_OnSetEnabled (IntPtr handle);
- /// <summary>
- /// Handle enabled/disabled state change.
- /// </summary>
- public override void OnSetEnabled ()
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_OnSetEnabled (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern UpdateGeometryType DecalSet_GetUpdateGeometryType (IntPtr handle);
- /// <summary>
- /// Return whether a geometry update is necessary, and if it can happen in a worker thread.
- /// </summary>
- private UpdateGeometryType GetUpdateGeometryType ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetUpdateGeometryType (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_SetMaterial (IntPtr handle, IntPtr material);
- /// <summary>
- /// Set material. The material should use a small negative depth bias to avoid Z-fighting.
- /// </summary>
- private void SetMaterial (Material material)
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_SetMaterial (handle, (object)material == null ? IntPtr.Zero : material.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_SetMaxVertices (IntPtr handle, uint num);
- /// <summary>
- /// Set maximum number of decal vertices.
- /// </summary>
- private void SetMaxVertices (uint num)
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_SetMaxVertices (handle, num);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_SetMaxIndices (IntPtr handle, uint num);
- /// <summary>
- /// Set maximum number of decal vertex indices.
- /// </summary>
- private void SetMaxIndices (uint num)
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_SetMaxIndices (handle, num);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_SetOptimizeBufferSize (IntPtr handle, bool enable);
- /// <summary>
- /// Set whether to optimize GPU buffer sizes according to current amount of decals. Default false, which will size the buffers according to the maximum vertices/indices. When true, buffers will be reallocated whenever decals are added/removed, which can be worse for performance.
- /// </summary>
- private void SetOptimizeBufferSize (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_SetOptimizeBufferSize (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool DecalSet_AddDecal (IntPtr handle, IntPtr target, ref Urho.Vector3 worldPosition, ref Urho.Quaternion worldRotation, float size, float aspectRatio, float depth, ref Urho.Vector2 topLeftUV, ref Urho.Vector2 bottomRightUV, float timeToLive, float normalCutoff, uint subGeometry);
- /// <summary>
- /// Add a decal at world coordinates, using a target drawable's geometry for reference. If the decal needs to move with the target, the decal component should be created to the target's node. Return true if successful.
- /// </summary>
- public bool AddDecal (Drawable target, Urho.Vector3 worldPosition, Urho.Quaternion worldRotation, float size, float aspectRatio, float depth, Urho.Vector2 topLeftUV, Urho.Vector2 bottomRightUV, float timeToLive = 0f, float normalCutoff = 0.1f, uint subGeometry = uint.MaxValue)
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_AddDecal (handle, (object)target == null ? IntPtr.Zero : target.Handle, ref worldPosition, ref worldRotation, size, aspectRatio, depth, ref topLeftUV, ref bottomRightUV, timeToLive, normalCutoff, subGeometry);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_RemoveDecals (IntPtr handle, uint num);
- /// <summary>
- /// Remove n oldest decals.
- /// </summary>
- public void RemoveDecals (uint num)
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_RemoveDecals (handle, num);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void DecalSet_RemoveAllDecals (IntPtr handle);
- /// <summary>
- /// Remove all decals.
- /// </summary>
- public void RemoveAllDecals ()
- {
- Runtime.ValidateRefCounted (this);
- DecalSet_RemoveAllDecals (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr DecalSet_GetMaterial (IntPtr handle);
- /// <summary>
- /// Return material.
- /// </summary>
- private Material GetMaterial ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Material> (DecalSet_GetMaterial (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DecalSet_GetNumDecals (IntPtr handle);
- /// <summary>
- /// Return number of decals.
- /// </summary>
- private uint GetNumDecals ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetNumDecals (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DecalSet_GetNumVertices (IntPtr handle);
- /// <summary>
- /// Retur number of vertices in the decals.
- /// </summary>
- private uint GetNumVertices ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetNumVertices (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DecalSet_GetNumIndices (IntPtr handle);
- /// <summary>
- /// Retur number of vertex indices in the decals.
- /// </summary>
- private uint GetNumIndices ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetNumIndices (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DecalSet_GetMaxVertices (IntPtr handle);
- /// <summary>
- /// Return maximum number of decal vertices.
- /// </summary>
- private uint GetMaxVertices ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetMaxVertices (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint DecalSet_GetMaxIndices (IntPtr handle);
- /// <summary>
- /// Return maximum number of decal vertex indices.
- /// </summary>
- private uint GetMaxIndices ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetMaxIndices (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool DecalSet_GetOptimizeBufferSize (IntPtr handle);
- /// <summary>
- /// Return whether is optimizing GPU buffer sizes according to current amount of decals.
- /// </summary>
- private bool GetOptimizeBufferSize ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetOptimizeBufferSize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern ResourceRef DecalSet_GetMaterialAttr (IntPtr handle);
- /// <summary>
- /// Return material attribute.
- /// </summary>
- private ResourceRef GetMaterialAttr ()
- {
- Runtime.ValidateRefCounted (this);
- return DecalSet_GetMaterialAttr (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 whether a geometry update is necessary, and if it can happen in a worker thread.
- /// </summary>
- public override UpdateGeometryType UpdateGeometryType {
- get {
- return GetUpdateGeometryType ();
- }
- }
- /// <summary>
- /// Return material.
- /// Or
- /// Set material. The material should use a small negative depth bias to avoid Z-fighting.
- /// </summary>
- public Material Material {
- get {
- return GetMaterial ();
- }
- set {
- SetMaterial (value);
- }
- }
- /// <summary>
- /// Return maximum number of decal vertices.
- /// Or
- /// Set maximum number of decal vertices.
- /// </summary>
- public uint MaxVertices {
- get {
- return GetMaxVertices ();
- }
- set {
- SetMaxVertices (value);
- }
- }
- /// <summary>
- /// Return maximum number of decal vertex indices.
- /// Or
- /// Set maximum number of decal vertex indices.
- /// </summary>
- public uint MaxIndices {
- get {
- return GetMaxIndices ();
- }
- set {
- SetMaxIndices (value);
- }
- }
- /// <summary>
- /// Return whether is optimizing GPU buffer sizes according to current amount of decals.
- /// Or
- /// Set whether to optimize GPU buffer sizes according to current amount of decals. Default false, which will size the buffers according to the maximum vertices/indices. When true, buffers will be reallocated whenever decals are added/removed, which can be worse for performance.
- /// </summary>
- public bool OptimizeBufferSize {
- get {
- return GetOptimizeBufferSize ();
- }
- set {
- SetOptimizeBufferSize (value);
- }
- }
- /// <summary>
- /// Return number of decals.
- /// </summary>
- public uint NumDecals {
- get {
- return GetNumDecals ();
- }
- }
- /// <summary>
- /// Retur number of vertices in the decals.
- /// </summary>
- public uint NumVertices {
- get {
- return GetNumVertices ();
- }
- }
- /// <summary>
- /// Retur number of vertex indices in the decals.
- /// </summary>
- public uint NumIndices {
- get {
- return GetNumIndices ();
- }
- }
- /// <summary>
- /// Return material attribute.
- /// </summary>
- public ResourceRef MaterialAttr {
- get {
- return GetMaterialAttr ();
- }
- }
- }
- }
|