[This is preliminary documentation and is subject to change.]

Represents the data used to build a NavmeshTile.

Namespace: org.critterai.nav
Assembly: cai-nav (in cai-nav.dll) Version: 0.4.0.0 (0.4.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public sealed class NavmeshTileBuildData
Public NotInheritable Class NavmeshTileBuildData
public ref class NavmeshTileBuildData sealed

Members

               
 All Members  Constructors   Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
NavmeshTileBuildData(Int32, Int32, Int32)
Constructor. (No detail mesh or off-mesh connections.)
NavmeshTileBuildData(Int32, Int32, Int32, Int32)
Constructor. (No detail mesh.)
NavmeshTileBuildData(Int32, Int32, Int32, Int32, Int32)
Constructor. (No off-mesh connections.)
NavmeshTileBuildData(Int32, Int32, Int32, Int32, Int32, Int32)
Constructor.
BoundsMax
The maximum bounds of the tile's AABB.
BoundsMin
The minimum bounds of the tile's AABB.
BVTreeEnabled
True if bounding volumn data should be generated for the tile.
ConnCount
The number of off-mesh connections.
DetailTriCount
The number of detail triangles.
DetailVertCount
The number of detail vertices.
Dispose()()()()
Disposes of all resources and marks the object as disposed.
Finalize()()()()
Destructor
(Overrides Object..::..Finalize()()()().)
GetConnAreas(array<Byte>[]()[][])
Returns a copy of the areas for off-mesh connections.
GetConnDirs(array<Byte>[]()[][])
Returns a copy of the direction flags for off-mesh connections.
GetConnFlags(array<UInt16>[]()[][])
Returns a copy of the user-defined flags for off-mesh connections.
GetConnRadii(array<Single>[]()[][])
Returns a copy of the radii for off-mesh connections.
GetConnUserIds(array<UInt32>[]()[][])
The user-defined ids for off-mesh connections.
GetConnVerts(array<Vector3>[]()[][])
Returns a copy of the off-mesh connection vertices.
GetDetailMeshes(array<UInt32>[]()[][])
Returns a copy of the sub-mesh data for the detail mesh.
GetDetailTris(array<Byte>[]()[][])
Returns a copy of the triangle/flag data for the detail mesh.
GetDetailVerts(array<Vector3>[]()[][])
Returns a copy of the vertex data for the detail mesh.
GetPolyAreas(array<Byte>[]()[][])
Returns a copy of the area for each polygon.
GetPolyFlags(array<UInt16>[]()[][])
Returns a copy of the user-defined flags for each polygon.
GetPolys(array<UInt16>[]()[][])
Returns a copy of polygon and neighbor information.
GetPolyVerts(array<UInt16>[]()[][])
Returns a copy of the vertex information for each polygon.
IsDisposed
True if the object has been disposed and should no longer be used.
LoadBase(Int32, Int32, Int32, UInt32, Vector3, Vector3, Single, Single, Single, Single, Single, Boolean)
Load the base configuration.
LoadConns(array<Vector3>[]()[][], array<Single>[]()[][], array<Byte>[]()[][], array<Byte>[]()[][], array<UInt16>[]()[][], array<UInt32>[]()[][], Int32)
Load the off-mesh connection data.
LoadDetail(array<Vector3>[]()[][], Int32, array<Byte>[]()[][], Int32, array<UInt32>[]()[][], Int32)
Load the detail mesh data.
LoadPolys(array<UInt16>[]()[][], Int32, array<UInt16>[]()[][], array<UInt16>[]()[][], array<Byte>[]()[][], Int32)
Load the polygon data.
MaxConns
The maximum allowed off-mesh connections.
MaxDetailTris
The maximum allowed detail triangles.
MaxDetailVerts
The maximum allowed detail vertices.
MaxPolys
The maximum allowed polygons.
MaxPolyVerts
The maximum allowed polygon vertices.
MaxTraversableStep
The walkable step to use for the tile.
MaxVertsPerPoly
The maximum vertices per polygon.
MinAllowedTraversableHeight
The absolute minimum allowed value for WalkableHeight.
MinCellSize
The minimum allowed cell size.
PolyCount
The number of polygons.
PolyVertCount
The number of polygon vertices.
TileLayer
The tile's layer.
TileUserId
The user id of the tile.
TileX
The tile grid x-location.
TileZ
The tile grid z-location.
WalkableHeight
The walkable height to use for the tile.
WalkableRadius
The walkable radius to use for the tile.
XZCellSize
The xz-plane cell size of the tile.
YCellSize
The y-axis cell size of the tile.

Remarks

This class marshals data between the navigation mesh generation pipeline and the navigation system. The NMGen PolyMesh and PolyMeshDetail classes provide details on data stucture and limits.

The standard load process is as follows:

  1. Construct the object.
  2. LoadBase(Int32, Int32, Int32, UInt32, Vector3, Vector3, Single, Single, Single, Single, Single, Boolean)
  3. LoadPolys(array<UInt16>[]()[][], Int32, array<UInt16>[]()[][], array<UInt16>[]()[][], array<Byte>[]()[][], Int32)
  4. LoadDetail(array<Vector3>[]()[][], Int32, array<Byte>[]()[][], Int32, array<UInt32>[]()[][], Int32) (Optional)
  5. LoadConns(array<Vector3>[]()[][], array<Single>[]()[][], array<Byte>[]()[][], array<Byte>[]()[][], array<UInt16>[]()[][], array<UInt32>[]()[][], Int32) (Optional)

The design permits re-use of the data buffers for multiple tile builds. Just set the buffer sizes to the maximum size required then use the load methods to reload the data as needed. The only restriction is that all polygon data must have the same maximum vertices per polygon.

Behavior is undefined if used after disposal.

Inheritance Hierarchy

System..::..Object
  org.critterai.nav..::..NavmeshTileBuildData

See Also