| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // NavigationMesh.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.Navigation
- {
- /// <summary>
- /// Navigation mesh component. Collects the navigation geometry from child nodes with the Navigable component and responds to path queries.
- /// </summary>
- public unsafe partial class NavigationMesh : Component
- {
- unsafe partial void OnNavigationMeshCreated ();
- [Preserve]
- public NavigationMesh (IntPtr handle) : base (handle)
- {
- OnNavigationMeshCreated ();
- }
- [Preserve]
- protected NavigationMesh (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnNavigationMeshCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int NavigationMesh_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (NavigationMesh_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr NavigationMesh_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (NavigationMesh_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int NavigationMesh_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(NavigationMesh));
- return new StringHash (NavigationMesh_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr NavigationMesh_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(NavigationMesh));
- return Marshal.PtrToStringAnsi (NavigationMesh_GetTypeNameStatic ());
- }
- [Preserve]
- public NavigationMesh () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr NavigationMesh_NavigationMesh (IntPtr context);
- [Preserve]
- public NavigationMesh (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(NavigationMesh));
- handle = NavigationMesh_NavigationMesh ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnNavigationMeshCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(NavigationMesh));
- NavigationMesh_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_DrawDebugGeometry (IntPtr handle, IntPtr debug, bool depthTest);
- /// <summary>
- /// Visualize the component as debug geometry.
- /// </summary>
- public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_DrawDebugGeometry (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetTileSize (IntPtr handle, int size);
- /// <summary>
- /// Set tile size.
- /// </summary>
- private void SetTileSize (int size)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetTileSize (handle, size);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetCellSize (IntPtr handle, float size);
- /// <summary>
- /// Set cell size.
- /// </summary>
- private void SetCellSize (float size)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetCellSize (handle, size);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetCellHeight (IntPtr handle, float height);
- /// <summary>
- /// Set cell height.
- /// </summary>
- private void SetCellHeight (float height)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetCellHeight (handle, height);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetAgentHeight (IntPtr handle, float height);
- /// <summary>
- /// Set navigation agent height.
- /// </summary>
- private void SetAgentHeight (float height)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetAgentHeight (handle, height);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetAgentRadius (IntPtr handle, float radius);
- /// <summary>
- /// Set navigation agent radius.
- /// </summary>
- private void SetAgentRadius (float radius)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetAgentRadius (handle, radius);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetAgentMaxClimb (IntPtr handle, float maxClimb);
- /// <summary>
- /// Set navigation agent max vertical climb.
- /// </summary>
- private void SetAgentMaxClimb (float maxClimb)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetAgentMaxClimb (handle, maxClimb);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetAgentMaxSlope (IntPtr handle, float maxSlope);
- /// <summary>
- /// Set navigation agent max slope.
- /// </summary>
- private void SetAgentMaxSlope (float maxSlope)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetAgentMaxSlope (handle, maxSlope);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetRegionMinSize (IntPtr handle, float size);
- /// <summary>
- /// Set region minimum size.
- /// </summary>
- private void SetRegionMinSize (float size)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetRegionMinSize (handle, size);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetRegionMergeSize (IntPtr handle, float size);
- /// <summary>
- /// Set region merge size.
- /// </summary>
- private void SetRegionMergeSize (float size)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetRegionMergeSize (handle, size);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetEdgeMaxLength (IntPtr handle, float length);
- /// <summary>
- /// Set edge max length.
- /// </summary>
- private void SetEdgeMaxLength (float length)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetEdgeMaxLength (handle, length);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetEdgeMaxError (IntPtr handle, float error);
- /// <summary>
- /// Set edge max error.
- /// </summary>
- private void SetEdgeMaxError (float error)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetEdgeMaxError (handle, error);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetDetailSampleDistance (IntPtr handle, float distance);
- /// <summary>
- /// Set detail sampling distance.
- /// </summary>
- private void SetDetailSampleDistance (float distance)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetDetailSampleDistance (handle, distance);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetDetailSampleMaxError (IntPtr handle, float error);
- /// <summary>
- /// Set detail sampling maximum error.
- /// </summary>
- private void SetDetailSampleMaxError (float error)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetDetailSampleMaxError (handle, error);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetPadding (IntPtr handle, ref Urho.Vector3 padding);
- /// <summary>
- /// Set padding of the navigation mesh bounding box. Having enough padding allows to add geometry on the extremities of the navigation mesh when doing partial rebuilds.
- /// </summary>
- private void SetPadding (Urho.Vector3 padding)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetPadding (handle, ref padding);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetAreaCost (IntPtr handle, uint areaID, float cost);
- /// <summary>
- /// Set the cost of an area.
- /// </summary>
- public void SetAreaCost (uint areaID, float cost)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetAreaCost (handle, areaID, cost);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_Allocate (IntPtr handle, ref Urho.BoundingBox boundingBox, uint maxTiles);
- /// <summary>
- /// Allocate the navigation mesh without building any tiles. Bounding box is not padded. Return true if successful.
- /// </summary>
- public virtual bool Allocate (Urho.BoundingBox boundingBox, uint maxTiles)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_Allocate (handle, ref boundingBox, maxTiles);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_Build (IntPtr handle);
- /// <summary>
- /// Rebuild the navigation mesh. Return true if successful.
- /// </summary>
- public virtual bool Build ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_Build (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_Build0 (IntPtr handle, ref Urho.BoundingBox boundingBox);
- /// <summary>
- /// Rebuild part of the navigation mesh contained by the world-space bounding box. Return true if successful.
- /// </summary>
- public virtual bool Build (Urho.BoundingBox boundingBox)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_Build0 (handle, ref boundingBox);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_Build1 (IntPtr handle, ref Urho.IntVector2 from, ref Urho.IntVector2 to);
- /// <summary>
- /// Rebuild part of the navigation mesh in the rectangular area. Return true if successful.
- /// </summary>
- public virtual bool Build (Urho.IntVector2 from, Urho.IntVector2 to)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_Build1 (handle, ref from, ref to);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_RemoveTile (IntPtr handle, ref Urho.IntVector2 tile);
- /// <summary>
- /// Remove tile from navigation mesh.
- /// </summary>
- public virtual void RemoveTile (Urho.IntVector2 tile)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_RemoveTile (handle, ref tile);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_RemoveAllTiles (IntPtr handle);
- /// <summary>
- /// Remove all tiles from navigation mesh.
- /// </summary>
- public virtual void RemoveAllTiles ()
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_RemoveAllTiles (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_HasTile (IntPtr handle, ref Urho.IntVector2 tile);
- /// <summary>
- /// Return whether the navigation mesh has tile.
- /// </summary>
- public bool HasTile (Urho.IntVector2 tile)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_HasTile (handle, ref tile);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern BoundingBox NavigationMesh_GetTileBoudningBox (IntPtr handle, ref Urho.IntVector2 tile);
- /// <summary>
- /// Return bounding box of the tile in the node space.
- /// </summary>
- public BoundingBox GetTileBoudningBox (Urho.IntVector2 tile)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetTileBoudningBox (handle, ref tile);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 NavigationMesh_GetTileIndex (IntPtr handle, ref Urho.Vector3 position);
- /// <summary>
- /// Return index of the tile at the position.
- /// </summary>
- public Urho.IntVector2 GetTileIndex (Urho.Vector3 position)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetTileIndex (handle, ref position);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector3 NavigationMesh_FindNearestPoint (IntPtr handle, ref Urho.Vector3 point, ref Urho.Vector3 extents, dtQueryFilter* filter, uint* nearestRef);
- /// <summary>
- /// Find the nearest point on the navigation mesh to a given point. Extents specifies how far out from the specified point to check along each axis.
- /// </summary>
- public Vector3 FindNearestPoint (Urho.Vector3 point, Urho.Vector3 extents, dtQueryFilter* filter = null, uint* nearestRef = null)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_FindNearestPoint (handle, ref point, ref extents, filter, nearestRef);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector3 NavigationMesh_MoveAlongSurface (IntPtr handle, ref Urho.Vector3 start, ref Urho.Vector3 end, ref Urho.Vector3 extents, int maxVisited, dtQueryFilter* filter);
- /// <summary>
- /// Try to move along the surface from one point to another.
- /// </summary>
- public Vector3 MoveAlongSurface (Urho.Vector3 start, Urho.Vector3 end, Urho.Vector3 extents, int maxVisited = 3, dtQueryFilter* filter = null)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_MoveAlongSurface (handle, ref start, ref end, ref extents, maxVisited, filter);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector3 NavigationMesh_GetRandomPoint (IntPtr handle, dtQueryFilter* filter, uint* randomRef);
- /// <summary>
- /// Return a random point on the navigation mesh.
- /// </summary>
- public Vector3 GetRandomPoint (dtQueryFilter* filter = null, uint* randomRef = null)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetRandomPoint (handle, filter, randomRef);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector3 NavigationMesh_GetRandomPointInCircle (IntPtr handle, ref Urho.Vector3 center, float radius, ref Urho.Vector3 extents, dtQueryFilter* filter, uint* randomRef);
- /// <summary>
- /// Return a random point on the navigation mesh within a circle. The circle radius is only a guideline and in practice the returned point may be further away.
- /// </summary>
- public Vector3 GetRandomPointInCircle (Urho.Vector3 center, float radius, Urho.Vector3 extents, dtQueryFilter* filter = null, uint* randomRef = null)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetRandomPointInCircle (handle, ref center, radius, ref extents, filter, randomRef);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetDistanceToWall (IntPtr handle, ref Urho.Vector3 point, float radius, ref Urho.Vector3 extents, dtQueryFilter* filter, Vector3* hitPos, Vector3* hitNormal);
- /// <summary>
- /// Return distance to wall from a point. Maximum search radius must be specified.
- /// </summary>
- public float GetDistanceToWall (Urho.Vector3 point, float radius, Urho.Vector3 extents, dtQueryFilter* filter = null, Vector3* hitPos = null, Vector3* hitNormal = null)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetDistanceToWall (handle, ref point, radius, ref extents, filter, hitPos, hitNormal);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector3 NavigationMesh_Raycast (IntPtr handle, ref Urho.Vector3 start, ref Urho.Vector3 end, ref Urho.Vector3 extents, dtQueryFilter* filter, Vector3* hitNormal);
- /// <summary>
- /// Perform a walkability raycast on the navigation mesh between start and end and return the point where a wall was hit, or the end point if no walls.
- /// </summary>
- public Vector3 Raycast (Urho.Vector3 start, Urho.Vector3 end, Urho.Vector3 extents, dtQueryFilter* filter = null, Vector3* hitNormal = null)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_Raycast (handle, ref start, ref end, ref extents, filter, hitNormal);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_DrawDebugGeometry2 (IntPtr handle, bool depthTest);
- /// <summary>
- /// Add debug geometry to the debug renderer.
- /// </summary>
- public virtual void DrawDebugGeometry (bool depthTest)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_DrawDebugGeometry2 (handle, depthTest);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr NavigationMesh_GetMeshName (IntPtr handle);
- /// <summary>
- /// Return the given name of this navigation mesh.
- /// </summary>
- private string GetMeshName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (NavigationMesh_GetMeshName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetMeshName (IntPtr handle, string newName);
- /// <summary>
- /// Set the name of this navigation mesh.
- /// </summary>
- public void SetMeshName (string newName)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetMeshName (handle, newName);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int NavigationMesh_GetTileSize (IntPtr handle);
- /// <summary>
- /// Return tile size.
- /// </summary>
- private int GetTileSize ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetTileSize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetCellSize (IntPtr handle);
- /// <summary>
- /// Return cell size.
- /// </summary>
- private float GetCellSize ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetCellSize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetCellHeight (IntPtr handle);
- /// <summary>
- /// Return cell height.
- /// </summary>
- private float GetCellHeight ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetCellHeight (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetAgentHeight (IntPtr handle);
- /// <summary>
- /// Return navigation agent height.
- /// </summary>
- private float GetAgentHeight ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetAgentHeight (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetAgentRadius (IntPtr handle);
- /// <summary>
- /// Return navigation agent radius.
- /// </summary>
- private float GetAgentRadius ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetAgentRadius (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetAgentMaxClimb (IntPtr handle);
- /// <summary>
- /// Return navigation agent max vertical climb.
- /// </summary>
- private float GetAgentMaxClimb ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetAgentMaxClimb (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetAgentMaxSlope (IntPtr handle);
- /// <summary>
- /// Return navigation agent max slope.
- /// </summary>
- private float GetAgentMaxSlope ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetAgentMaxSlope (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetRegionMinSize (IntPtr handle);
- /// <summary>
- /// Return region minimum size.
- /// </summary>
- private float GetRegionMinSize ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetRegionMinSize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetRegionMergeSize (IntPtr handle);
- /// <summary>
- /// Return region merge size.
- /// </summary>
- private float GetRegionMergeSize ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetRegionMergeSize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetEdgeMaxLength (IntPtr handle);
- /// <summary>
- /// Return edge max length.
- /// </summary>
- private float GetEdgeMaxLength ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetEdgeMaxLength (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetEdgeMaxError (IntPtr handle);
- /// <summary>
- /// Return edge max error.
- /// </summary>
- private float GetEdgeMaxError ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetEdgeMaxError (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetDetailSampleDistance (IntPtr handle);
- /// <summary>
- /// Return detail sampling distance.
- /// </summary>
- private float GetDetailSampleDistance ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetDetailSampleDistance (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetDetailSampleMaxError (IntPtr handle);
- /// <summary>
- /// Return detail sampling maximum error.
- /// </summary>
- private float GetDetailSampleMaxError ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetDetailSampleMaxError (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.Vector3 NavigationMesh_GetPadding (IntPtr handle);
- /// <summary>
- /// Return navigation mesh bounding box padding.
- /// </summary>
- private Urho.Vector3 GetPadding ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetPadding (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float NavigationMesh_GetAreaCost (IntPtr handle, uint areaID);
- /// <summary>
- /// Get the current cost of an area
- /// </summary>
- public float GetAreaCost (uint areaID)
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetAreaCost (handle, areaID);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_IsInitialized (IntPtr handle);
- /// <summary>
- /// Return whether has been initialized with valid navigation data.
- /// </summary>
- private bool IsInitialized ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_IsInitialized (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.BoundingBox NavigationMesh_GetBoundingBox (IntPtr handle);
- /// <summary>
- /// Return local space bounding box of the navigation mesh.
- /// </summary>
- private Urho.BoundingBox GetBoundingBox ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetBoundingBox (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern BoundingBox NavigationMesh_GetWorldBoundingBox (IntPtr handle);
- /// <summary>
- /// Return world space bounding box of the navigation mesh.
- /// </summary>
- private BoundingBox GetWorldBoundingBox ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetWorldBoundingBox (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 NavigationMesh_GetNumTiles (IntPtr handle);
- /// <summary>
- /// Return number of tiles.
- /// </summary>
- private Urho.IntVector2 GetNumTiles ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetNumTiles (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetPartitionType (IntPtr handle, NavmeshPartitionType aType);
- /// <summary>
- /// Set the partition type used for polygon generation.
- /// </summary>
- private void SetPartitionType (NavmeshPartitionType aType)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetPartitionType (handle, aType);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern NavmeshPartitionType NavigationMesh_GetPartitionType (IntPtr handle);
- /// <summary>
- /// Return Partition Type.
- /// </summary>
- private NavmeshPartitionType GetPartitionType ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetPartitionType (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetDrawOffMeshConnections (IntPtr handle, bool enable);
- /// <summary>
- /// Draw debug geometry for OffMeshConnection components.
- /// </summary>
- private void SetDrawOffMeshConnections (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetDrawOffMeshConnections (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_GetDrawOffMeshConnections (IntPtr handle);
- /// <summary>
- /// Return whether to draw OffMeshConnection components.
- /// </summary>
- private bool GetDrawOffMeshConnections ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetDrawOffMeshConnections (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void NavigationMesh_SetDrawNavAreas (IntPtr handle, bool enable);
- /// <summary>
- /// Draw debug geometry for NavArea components.
- /// </summary>
- private void SetDrawNavAreas (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- NavigationMesh_SetDrawNavAreas (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool NavigationMesh_GetDrawNavAreas (IntPtr handle);
- /// <summary>
- /// Return whether to draw NavArea components.
- /// </summary>
- private bool GetDrawNavAreas ()
- {
- Runtime.ValidateRefCounted (this);
- return NavigationMesh_GetDrawNavAreas (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 tile size.
- /// Or
- /// Set tile size.
- /// </summary>
- public int TileSize {
- get {
- return GetTileSize ();
- }
- set {
- SetTileSize (value);
- }
- }
- /// <summary>
- /// Return cell size.
- /// Or
- /// Set cell size.
- /// </summary>
- public float CellSize {
- get {
- return GetCellSize ();
- }
- set {
- SetCellSize (value);
- }
- }
- /// <summary>
- /// Return cell height.
- /// Or
- /// Set cell height.
- /// </summary>
- public float CellHeight {
- get {
- return GetCellHeight ();
- }
- set {
- SetCellHeight (value);
- }
- }
- /// <summary>
- /// Return navigation agent height.
- /// Or
- /// Set navigation agent height.
- /// </summary>
- public float AgentHeight {
- get {
- return GetAgentHeight ();
- }
- set {
- SetAgentHeight (value);
- }
- }
- /// <summary>
- /// Return navigation agent radius.
- /// Or
- /// Set navigation agent radius.
- /// </summary>
- public float AgentRadius {
- get {
- return GetAgentRadius ();
- }
- set {
- SetAgentRadius (value);
- }
- }
- /// <summary>
- /// Return navigation agent max vertical climb.
- /// Or
- /// Set navigation agent max vertical climb.
- /// </summary>
- public float AgentMaxClimb {
- get {
- return GetAgentMaxClimb ();
- }
- set {
- SetAgentMaxClimb (value);
- }
- }
- /// <summary>
- /// Return navigation agent max slope.
- /// Or
- /// Set navigation agent max slope.
- /// </summary>
- public float AgentMaxSlope {
- get {
- return GetAgentMaxSlope ();
- }
- set {
- SetAgentMaxSlope (value);
- }
- }
- /// <summary>
- /// Return region minimum size.
- /// Or
- /// Set region minimum size.
- /// </summary>
- public float RegionMinSize {
- get {
- return GetRegionMinSize ();
- }
- set {
- SetRegionMinSize (value);
- }
- }
- /// <summary>
- /// Return region merge size.
- /// Or
- /// Set region merge size.
- /// </summary>
- public float RegionMergeSize {
- get {
- return GetRegionMergeSize ();
- }
- set {
- SetRegionMergeSize (value);
- }
- }
- /// <summary>
- /// Return edge max length.
- /// Or
- /// Set edge max length.
- /// </summary>
- public float EdgeMaxLength {
- get {
- return GetEdgeMaxLength ();
- }
- set {
- SetEdgeMaxLength (value);
- }
- }
- /// <summary>
- /// Return edge max error.
- /// Or
- /// Set edge max error.
- /// </summary>
- public float EdgeMaxError {
- get {
- return GetEdgeMaxError ();
- }
- set {
- SetEdgeMaxError (value);
- }
- }
- /// <summary>
- /// Return detail sampling distance.
- /// Or
- /// Set detail sampling distance.
- /// </summary>
- public float DetailSampleDistance {
- get {
- return GetDetailSampleDistance ();
- }
- set {
- SetDetailSampleDistance (value);
- }
- }
- /// <summary>
- /// Return detail sampling maximum error.
- /// Or
- /// Set detail sampling maximum error.
- /// </summary>
- public float DetailSampleMaxError {
- get {
- return GetDetailSampleMaxError ();
- }
- set {
- SetDetailSampleMaxError (value);
- }
- }
- /// <summary>
- /// Return navigation mesh bounding box padding.
- /// Or
- /// Set padding of the navigation mesh bounding box. Having enough padding allows to add geometry on the extremities of the navigation mesh when doing partial rebuilds.
- /// </summary>
- public Urho.Vector3 Padding {
- get {
- return GetPadding ();
- }
- set {
- SetPadding (value);
- }
- }
- /// <summary>
- /// Return the given name of this navigation mesh.
- /// </summary>
- public string MeshName {
- get {
- return GetMeshName ();
- }
- }
- /// <summary>
- /// Return whether has been initialized with valid navigation data.
- /// </summary>
- public bool Initialized {
- get {
- return IsInitialized ();
- }
- }
- /// <summary>
- /// Return local space bounding box of the navigation mesh.
- /// </summary>
- public Urho.BoundingBox BoundingBox {
- get {
- return GetBoundingBox ();
- }
- }
- /// <summary>
- /// Return world space bounding box of the navigation mesh.
- /// </summary>
- public BoundingBox WorldBoundingBox {
- get {
- return GetWorldBoundingBox ();
- }
- }
- /// <summary>
- /// Return number of tiles.
- /// </summary>
- public Urho.IntVector2 NumTiles {
- get {
- return GetNumTiles ();
- }
- }
- /// <summary>
- /// Return Partition Type.
- /// Or
- /// Set the partition type used for polygon generation.
- /// </summary>
- public NavmeshPartitionType PartitionType {
- get {
- return GetPartitionType ();
- }
- set {
- SetPartitionType (value);
- }
- }
- /// <summary>
- /// Return whether to draw OffMeshConnection components.
- /// Or
- /// Draw debug geometry for OffMeshConnection components.
- /// </summary>
- public bool DrawOffMeshConnections {
- get {
- return GetDrawOffMeshConnections ();
- }
- set {
- SetDrawOffMeshConnections (value);
- }
- }
- /// <summary>
- /// Return whether to draw NavArea components.
- /// Or
- /// Draw debug geometry for NavArea components.
- /// </summary>
- public bool DrawNavAreas {
- get {
- return GetDrawNavAreas ();
- }
- set {
- SetDrawNavAreas (value);
- }
- }
- }
- }
|