Table of Contents

Class NavigationMeshBuildUtils

Namespace
Stride.Navigation
Assembly
Stride.Navigation.dll

Utility function for navigation mesh building

public class NavigationMeshBuildUtils
Inheritance
NavigationMeshBuildUtils

Methods

BuildPlanePoints(ref Plane, float, out Vector3[], out int[])

Generates vertices and indices for an infinite size, limited by the parameter

public static void BuildPlanePoints(ref Plane plane, float size, out Vector3[] points, out int[] inds)

Parameters

plane Plane
size float

the amount from the origin the plane points are placed

points Vector3[]
inds int[]

CalculateTileBoundingBox(NavigationMeshBuildSettings, Point)

Calculates X-Z span for a navigation mesh tile. The Y-axis will span from MinValue to MaxValue

public static BoundingBox CalculateTileBoundingBox(NavigationMeshBuildSettings settings, Point tileCoord)

Parameters

settings NavigationMeshBuildSettings
tileCoord Point

Returns

BoundingBox

CheckColliderFilter(StaticColliderComponent, CollisionFilterGroupFlags)

Checks if a static collider passes the given filter group

public static bool CheckColliderFilter(StaticColliderComponent collider, CollisionFilterGroupFlags includedCollisionGroups)

Parameters

collider StaticColliderComponent

The collider to check

includedCollisionGroups CollisionFilterGroupFlags

The collision filter

Returns

bool

true if the collider passes the filter, false otherwise

ExtendBoundingBox(ref BoundingBox, Vector3)

Applies an offset vector to a bounding box to make it bigger or smaller

public static void ExtendBoundingBox(ref BoundingBox boundingBox, Vector3 offsets)

Parameters

boundingBox BoundingBox
offsets Vector3

GenerateTangentBinormal(Vector3, out Vector3, out Vector3)

Generates a random tangent and binormal for a given normal, usefull for creating plane vertices or orienting objects (lookat) where the rotation along the normal doesn't matter

public static void GenerateTangentBinormal(Vector3 normal, out Vector3 tangent, out Vector3 binormal)

Parameters

normal Vector3
tangent Vector3
binormal Vector3

GetOverlappingTiles(NavigationMeshBuildSettings, BoundingBox)

Check which tiles overlap a given bounding box

public static List<Point> GetOverlappingTiles(NavigationMeshBuildSettings settings, BoundingBox boundingBox)

Parameters

settings NavigationMeshBuildSettings
boundingBox BoundingBox

Returns

List<Point>

HasLatestColliderShape(StaticColliderComponent)

Checks if a static collider has latest collider shape

public static bool HasLatestColliderShape(StaticColliderComponent collider)

Parameters

collider StaticColliderComponent

The collider to check

Returns

bool

true if the collider has latest collider shape, false otherwise

HashEntityCollider(StaticColliderComponent, CollisionFilterGroupFlags)

Hashes and entity's transform and it's collider shape settings

public static int HashEntityCollider(StaticColliderComponent collider, CollisionFilterGroupFlags includedCollisionGroups)

Parameters

collider StaticColliderComponent

The collider to hash

includedCollisionGroups CollisionFilterGroupFlags

The filter group for active collides, which is used to hash if this colliders participates in the navigation mesh build

Returns

int

SnapBoundingBoxToCellHeight(NavigationMeshBuildSettings, ref BoundingBox)

Snaps a BoundingBox's height according to the given NavigationMeshBuildSettings

public static void SnapBoundingBoxToCellHeight(NavigationMeshBuildSettings settings, ref BoundingBox boundingBox)

Parameters

settings NavigationMeshBuildSettings

The build settings

boundingBox BoundingBox

Reference to the bounding box to snap