Class NavSpaceFile
Namespace: ValveResourceFormat.NavMesh
Assembly: ValveResourceFormat.dll
Represents a navigation space file (.navspace), the volumes flying and swimming agents can path through, as convex blocks bucketed into a uniform grid and the transitions connecting them. Air and water share one space, and the file does not mark which blocks are under water.
public class NavSpaceFileInheritance
object ← NavSpaceFile
Fields
MAGIC
Magic number for navigation space files.
public const uint MAGIC = 4207869677Field Value
uint
Properties
Blocks
Gets every block of the file in id order.
public IEnumerable<NavSpaceBlock> Blocks { get; }Property Value
Bounds
Gets the world bounds the grid was built for. The grid starts at its minimum, and the last cells may extend past its maximum.
public AABB Bounds { get; }Property Value
CellSize
Gets the edge length of a grid cell.
public float CellSize { get; }Property Value
float
Cells
Gets the blocks of each grid cell. A cell at grid coordinate (x, y, z) is stored at index x + GridSize.X * (y + GridSize.Y * z).
public NavSpaceBlock[][] Cells { get; }Property Value
NavSpaceBlock[][]
GridSize
Gets the number of grid cells along each axis.
public (int X, int Y, int Z) GridSize { get; }Property Value
Transitions
Gets the transitions between blocks. Only stored in version 2 and newer.
public NavSpaceTransition[] Transitions { get; }Property Value
Version
Gets the file version.
public uint Version { get; }Property Value
uint
Methods
Read(string)
Reads the navigation space from a file.
public void Read(string filename)Parameters
filename string
Read(Stream)
Reads the navigation space from a stream.
public void Read(Stream stream)Parameters
stream Stream
Read(BinaryReader)
Reads the navigation space from a binary reader.
public void Read(BinaryReader binaryReader)Parameters
binaryReader BinaryReader
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
string
A string that represents the current object.
Remarks
Returns a formatted summary of the grid, blocks and transitions.

