Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    NavigationMeshBuildUtils Class

    Namespace: Stride.Navigation
    Assembly: Stride.Navigation.dll

    Utility function for navigation mesh building

    System.Object → NavigationMeshBuildUtils
    Derived from NavigationMeshBuildUtils:

    public class NavigationMeshBuildUtils
    Name Description
    Methods
    BuildPlanePoints(ref Plane, Single, out Vector3[], out Int32[])

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

    CalculateTileBoundingBox(NavigationMeshBuildSettings, Point)

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

    CheckColliderFilter(StaticColliderComponent, CollisionFilterGroupFlags)

    Checks if a static collider passes the given filter group

    ExtendBoundingBox(ref BoundingBox, Vector3)

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

    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

    GetOverlappingTiles(NavigationMeshBuildSettings, BoundingBox)

    Check which tiles overlap a given bounding box

    HashEntityCollider(StaticColliderComponent, CollisionFilterGroupFlags)

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

    HasLatestColliderShape(StaticColliderComponent)

    Checks if a static collider has latest collider shape

    SnapBoundingBoxToCellHeight(NavigationMeshBuildSettings, ref BoundingBox)

    Snaps a BoundingBox's height according to the given NavigationMeshBuildSettings

    | Improve this Doc View Source

    Methods


    BuildPlanePoints(ref Plane, Single, out Vector3[], out Int32[])

    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
    Type Name Description
    Plane plane
    System.Single size

    the amount from the origin the plane points are placed

    Vector3[] points
    System.Int32[] inds

    CalculateTileBoundingBox(NavigationMeshBuildSettings, Point)

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

    public static BoundingBox CalculateTileBoundingBox(NavigationMeshBuildSettings settings, Point tileCoord)
    Parameters
    Type Name Description
    NavigationMeshBuildSettings settings
    Point tileCoord
    Returns
    Type Description
    BoundingBox

    CheckColliderFilter(StaticColliderComponent, CollisionFilterGroupFlags)

    Checks if a static collider passes the given filter group

    public static bool CheckColliderFilter(StaticColliderComponent collider, CollisionFilterGroupFlags includedCollisionGroups)
    Parameters
    Type Name Description
    StaticColliderComponent collider

    The collider to check

    CollisionFilterGroupFlags includedCollisionGroups

    The collision filter

    Returns
    Type Description
    System.Boolean

    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
    Type Name Description
    BoundingBox boundingBox
    Vector3 offsets

    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
    Type Name Description
    Vector3 normal
    Vector3 tangent
    Vector3 binormal

    GetOverlappingTiles(NavigationMeshBuildSettings, BoundingBox)

    Check which tiles overlap a given bounding box

    public static List<Point> GetOverlappingTiles(NavigationMeshBuildSettings settings, BoundingBox boundingBox)
    Parameters
    Type Name Description
    NavigationMeshBuildSettings settings
    BoundingBox boundingBox
    Returns
    Type Description
    System.Collections.Generic.List<Point>

    HashEntityCollider(StaticColliderComponent, CollisionFilterGroupFlags)

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

    public static int HashEntityCollider(StaticColliderComponent collider, CollisionFilterGroupFlags includedCollisionGroups)
    Parameters
    Type Name Description
    StaticColliderComponent collider

    The collider to hash

    CollisionFilterGroupFlags includedCollisionGroups

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

    Returns
    Type Description
    System.Int32

    HasLatestColliderShape(StaticColliderComponent)

    Checks if a static collider has latest collider shape

    public static bool HasLatestColliderShape(StaticColliderComponent collider)
    Parameters
    Type Name Description
    StaticColliderComponent collider

    The collider to check

    Returns
    Type Description
    System.Boolean

    true if the collider has latest collider shape, false otherwise


    SnapBoundingBoxToCellHeight(NavigationMeshBuildSettings, ref BoundingBox)

    Snaps a BoundingBox's height according to the given NavigationMeshBuildSettings

    public static void SnapBoundingBoxToCellHeight(NavigationMeshBuildSettings settings, ref BoundingBox boundingBox)
    Parameters
    Type Name Description
    NavigationMeshBuildSettings settings

    The build settings

    BoundingBox boundingBox

    Reference to the bounding box to snap


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation