| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // StaticModel.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>
- /// Static model component.
- /// </summary>
- public unsafe partial class StaticModel : Drawable
- {
- public StaticModel (IntPtr handle) : base (handle)
- {
- }
- protected StaticModel (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int StaticModel_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (StaticModel_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr StaticModel_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (StaticModel_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int StaticModel_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(StaticModel));
- return new StringHash (StaticModel_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr StaticModel_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(StaticModel));
- return Marshal.PtrToStringAnsi (StaticModel_GetTypeNameStatic ());
- }
- public StaticModel () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr StaticModel_StaticModel (IntPtr context);
- public StaticModel (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(StaticModel));
- handle = StaticModel_StaticModel ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void StaticModel_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory. Drawable must be registered first.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(StaticModel));
- StaticModel_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr StaticModel_GetLodGeometry (IntPtr handle, uint batchIndex, uint level);
- /// <summary>
- /// Return the geometry for a specific LOD level.
- /// </summary>
- public override Geometry GetLodGeometry (uint batchIndex, uint level)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Geometry> (StaticModel_GetLodGeometry (handle, batchIndex, level));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint StaticModel_GetNumOccluderTriangles (IntPtr handle);
- /// <summary>
- /// Return number of occlusion geometry triangles.
- /// </summary>
- private uint GetNumOccluderTriangles ()
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_GetNumOccluderTriangles (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool StaticModel_DrawOcclusion (IntPtr handle, IntPtr buffer);
- /// <summary>
- /// Draw to occlusion buffer. Return true if did not run out of triangles.
- /// </summary>
- public override bool DrawOcclusion (OcclusionBuffer buffer)
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_DrawOcclusion (handle, (object)buffer == null ? IntPtr.Zero : buffer.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void StaticModel_SetModel (IntPtr handle, IntPtr model);
- /// <summary>
- /// Set model.
- /// </summary>
- private void SetModel (Model model)
- {
- Runtime.ValidateRefCounted (this);
- StaticModel_SetModel (handle, (object)model == null ? IntPtr.Zero : model.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void StaticModel_SetMaterial (IntPtr handle, IntPtr material);
- /// <summary>
- /// Set material on all geometries.
- /// </summary>
- public void SetMaterial (Material material)
- {
- Runtime.ValidateRefCounted (this);
- StaticModel_SetMaterial (handle, (object)material == null ? IntPtr.Zero : material.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool StaticModel_SetMaterial0 (IntPtr handle, uint index, IntPtr material);
- /// <summary>
- /// Set material on one geometry. Return true if successful.
- /// </summary>
- public bool SetMaterial (uint index, Material material)
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_SetMaterial0 (handle, index, (object)material == null ? IntPtr.Zero : material.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void StaticModel_SetOcclusionLodLevel (IntPtr handle, uint level);
- /// <summary>
- /// Set occlusion LOD level. By default (M_MAX_UNSIGNED) same as visible.
- /// </summary>
- private void SetOcclusionLodLevel (uint level)
- {
- Runtime.ValidateRefCounted (this);
- StaticModel_SetOcclusionLodLevel (handle, level);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void StaticModel_ApplyMaterialList (IntPtr handle, string fileName);
- /// <summary>
- /// Apply default materials from a material list file. If filename is empty (default), the model's resource name with extension .txt will be used.
- /// </summary>
- public void ApplyMaterialList (string fileName)
- {
- Runtime.ValidateRefCounted (this);
- StaticModel_ApplyMaterialList (handle, fileName);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr StaticModel_GetModel (IntPtr handle);
- /// <summary>
- /// Return model.
- /// </summary>
- private Model GetModel ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Model> (StaticModel_GetModel (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint StaticModel_GetNumGeometries (IntPtr handle);
- /// <summary>
- /// Return number of geometries.
- /// </summary>
- private uint GetNumGeometries ()
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_GetNumGeometries (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr StaticModel_GetMaterial (IntPtr handle, uint index);
- /// <summary>
- /// Return material by geometry index.
- /// </summary>
- public Material GetMaterial (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Material> (StaticModel_GetMaterial (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint StaticModel_GetOcclusionLodLevel (IntPtr handle);
- /// <summary>
- /// Return occlusion LOD level.
- /// </summary>
- private uint GetOcclusionLodLevel ()
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_GetOcclusionLodLevel (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool StaticModel_IsInside (IntPtr handle, ref Urho.Vector3 point);
- /// <summary>
- /// Determines if the given world space point is within the model geometry.
- /// </summary>
- public bool IsInside (Urho.Vector3 point)
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_IsInside (handle, ref point);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool StaticModel_IsInsideLocal (IntPtr handle, ref Urho.Vector3 point);
- /// <summary>
- /// Determines if the given local space point is within the model geometry.
- /// </summary>
- public bool IsInsideLocal (Urho.Vector3 point)
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_IsInsideLocal (handle, ref point);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern ResourceRef StaticModel_GetModelAttr (IntPtr handle);
- /// <summary>
- /// Return model attribute.
- /// </summary>
- private ResourceRef GetModelAttr ()
- {
- Runtime.ValidateRefCounted (this);
- return StaticModel_GetModelAttr (handle);
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return number of occlusion geometry triangles.
- /// </summary>
- public override uint NumOccluderTriangles {
- get {
- return GetNumOccluderTriangles ();
- }
- }
- /// <summary>
- /// Return model.
- /// Or
- /// Set model.
- /// </summary>
- public Model Model {
- get {
- return GetModel ();
- }
- set {
- SetModel (value);
- }
- }
- /// <summary>
- /// Return occlusion LOD level.
- /// Or
- /// Set occlusion LOD level. By default (M_MAX_UNSIGNED) same as visible.
- /// </summary>
- public uint OcclusionLodLevel {
- get {
- return GetOcclusionLodLevel ();
- }
- set {
- SetOcclusionLodLevel (value);
- }
- }
- /// <summary>
- /// Return number of geometries.
- /// </summary>
- public uint NumGeometries {
- get {
- return GetNumGeometries ();
- }
- }
- /// <summary>
- /// Return model attribute.
- /// </summary>
- public virtual ResourceRef ModelAttr {
- get {
- return GetModelAttr ();
- }
- }
- }
- }
|