interface rcConfig { void rcConfig(); /// The width of the field along the x-axis. [Limit: >= 0] [Units: vx] attribute long width; /// The height of the field along the z-axis. [Limit: >= 0] [Units: vx] attribute long height; /// The width/height size of tile's on the xz-plane. [Limit: >= 0] [Units: vx] attribute long tileSize; /// The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx] attribute long borderSize; /// The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu] attribute float cs; /// The y-axis cell size to use for fields. [Limit: > 0] [Units: wu] attribute float ch; /// The minimum bounds of the field's AABB. [(x, y, z)] [Units: wu] //attribute float[] bmin; /// The maximum bounds of the field's AABB. [(x, y, z)] [Units: wu] //attribute float[] bmax; /// The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees] attribute float walkableSlopeAngle; /// Minimum floor to 'ceiling' height that will still allow the floor area to /// be considered walkable. [Limit: >= 3] [Units: vx] attribute long walkableHeight; /// Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx] attribute long walkableClimb; /// The distance to erode/shrink the walkable area of the heightfield away from /// obstructions. [Limit: >=0] [Units: vx] attribute long walkableRadius; /// The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx] attribute long maxEdgeLen; /// The maximum distance a simplfied contour's border edges should deviate /// the original raw contour. [Limit: >=0] [Units: vx] attribute float maxSimplificationError; /// The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx] attribute long minRegionArea; /// Any regions with a span count smaller than this value will, if possible, /// be merged with larger regions. [Limit: >=0] [Units: vx] attribute long mergeRegionArea; /// The maximum number of vertices allowed for polygons generated during the /// contour to polygon conversion process. [Limit: >= 3] attribute long maxVertsPerPoly; /// Sets the sampling distance to use when generating the detail mesh. /// (For height detail only.) [Limits: 0 or >= 0.9] [Units: wu] attribute float detailSampleDist; /// The maximum distance the detail mesh surface should deviate from heightfield /// data. (For height detail only.) [Limit: >=0] [Units: wu] attribute float detailSampleMaxError; }; interface Vec3 { void Vec3(); void Vec3(float x, float y, float z); attribute float x; attribute float y; attribute float z; }; interface Triangle { void Triangle(); [Const, Ref] Vec3 getPoint(long n); }; interface DebugNavMesh { void DebugNavMesh(); long getTriangleCount(); [Const, Ref] Triangle getTriangle(long n); }; interface dtNavMesh { }; interface NavmeshData { void NavmeshData(); attribute any dataPointer; attribute long size; }; interface NavPath { long getPointCount(); [Const, Ref] Vec3 getPoint(long n); }; interface dtObstacleRef { }; interface dtCrowdAgentParams { void dtCrowdAgentParams(); attribute float radius; ///< Agent radius. [Limit: >= 0] attribute float height; ///< Agent height. [Limit: > 0] attribute float maxAcceleration; ///< Maximum allowed acceleration. [Limit: >= 0] attribute float maxSpeed; ///< Maximum allowed speed. [Limit: >= 0] /// Defines how close a collision element must be before it is considered for steering behaviors. [Limits: > 0] attribute float collisionQueryRange; attribute float pathOptimizationRange; ///< The path visibility optimization range. [Limit: > 0] /// How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0] attribute float separationWeight; /// Flags that impact steering behavior. (See: #UpdateFlags) attribute long updateFlags; /// The index of the avoidance configuration to use for the agent. /// [Limits: 0 <= value <= #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS] attribute long obstacleAvoidanceType; /// The index of the query filter used by this agent. attribute long queryFilterType; /// User defined data attached to the agent. //attribute VoidPtr userData; }; interface NavMesh { void NavMesh(); void destroy(); void build([Const] float[] positions, [Const] long positionCount, [Const] long[] indices, [Const] long indexCount, [Const, Ref] rcConfig config); void buildFromNavmeshData(NavmeshData data); [Value] NavmeshData getNavmeshData(); void freeNavmeshData(NavmeshData data); [Value] DebugNavMesh getDebugNavMesh(); [Value] Vec3 getClosestPoint([Const, Ref] Vec3 position); [Value] Vec3 getRandomPointAround([Const, Ref] Vec3 position, float maxRadius); [Value] Vec3 moveAlong([Const, Ref] Vec3 position, [Const, Ref] Vec3 destination); dtNavMesh getNavMesh(); [Value] NavPath computePath([Const, Ref] Vec3 start, [Const, Ref] Vec3 end); void setDefaultQueryExtent([Const, Ref] Vec3 extent); [Value] Vec3 getDefaultQueryExtent(); dtObstacleRef addCylinderObstacle([Const, Ref] Vec3 position, float radius, float height); dtObstacleRef addBoxObstacle([Const, Ref] Vec3 position, [Const, Ref] Vec3 extent, float angle); void removeObstacle(dtObstacleRef obstacle); void update(); }; interface Crowd { void Crowd([Const] long maxAgents, [Const] float maxAgentRadius, dtNavMesh nav); void destroy(); long addAgent([Const, Ref] Vec3 position, [Const] dtCrowdAgentParams params); void removeAgent([Const] long idx); void update([Const] float dt); [Value] Vec3 getAgentPosition([Const] long idx); [Value] Vec3 getAgentVelocity([Const] long idx); [Value] Vec3 getAgentNextTargetPath([Const] long idx); long getAgentState([Const] long idx); boolean overOffmeshConnection([Const] long idx); void agentGoto([Const] long idx, [Const, Ref] Vec3 destination); void agentTeleport([Const] long idx, [Const, Ref] Vec3 destination); [Value] dtCrowdAgentParams getAgentParameters([Const] long idx); void setAgentParameters([Const] long idx, [Const] dtCrowdAgentParams params); void setDefaultQueryExtent([Const, Ref] Vec3 extent); [Value] Vec3 getDefaultQueryExtent(); [Value] NavPath getCorners([Const] long idx); }; interface RecastConfigHelper { void RecastConfigHelper(); void setBMAX([Ref] rcConfig config, [Const] float x, [Const] float y, [Const] float z); void setBMIN([Ref] rcConfig config, [Const] float x, [Const] float y, [Const] float z); [Value] Vec3 getBMAX([Ref] rcConfig config); [Value] Vec3 getBMIN([Ref] rcConfig config); }; interface rcFloatArray { attribute float[] raw; void rcFloatArray(long num); [Const] long size(); [Const] float at(long n); [Const] long set(long n, float value); }; interface rcIntArray { attribute long[] raw; void rcIntArray(long num); [Const] long size(); [Const] long at(long n); [Const] long set(long n, long value); };