.NET SDK Documentation

    Show / Hide Table of Contents

    Class NavMapGridNode

    A node in the NavMap

    Leaf nodes contain content, all other nodes are split into 4 equally sized children.

    Child node indices are stored in the following X,Y orientation:

    +---+----+---+ | ^ | 2 | 0 | +---+----+---+ | Y | 3 | 1 | +---+----+---+ | | X->| | +---+----+---+

    Inheritance
    Object
    NavMapGridNode
    NavMapGrid
    Namespace: Anki.Vector.Types
    Assembly: Anki.Vector.dll
    Syntax
    public class NavMapGridNode

    Properties

    | Improve this Doc View Source

    Center

    Gets the center of this node.

    public Vector3 Center { get; }
    Property Type
    Vector3
    | Improve this Doc View Source

    Children

    Gets the child nodes of this node

    public IEnumerable<NavMapGridNode> Children { get; }
    Property Type
    IEnumerable<NavMapGridNode>
    | Improve this Doc View Source

    ColorRgba

    Gets the color of the node in RGBA.

    public uint ColorRgba { get; }
    Property Type
    UInt32
    | Improve this Doc View Source

    Content

    Gets the content type in this node. Only leaf nodes have content, this is null for all other nodes.

    public NavNodeContentType? Content { get; }
    Property Type
    Nullable<NavNodeContentType>
    | Improve this Doc View Source

    Depth

    Gets the depth of this node (i.e. how far down the quad-tree it is).

    public int Depth { get; }
    Property Type
    Int32
    | Improve this Doc View Source

    HasChildren

    Gets a value indicating whether this instance has child nodes.

    public bool HasChildren { get; }
    Property Type
    Boolean
    | Improve this Doc View Source

    Parent

    Gets the parent of this node. Is null for the root node.

    public NavMapGridNode Parent { get; }
    Property Type
    NavMapGridNode
    | Improve this Doc View Source

    Size

    Gets the size (width or length) of this square node in mm.

    public float Size { get; }
    Property Type
    Single

    Methods

    | Improve this Doc View Source

    ContainsPoint(Single, Single)

    Test if the node contains the given x,y coordinates.

    public bool ContainsPoint(float x, float y)
    Parameters
    Type Name Description
    Single x

    The x coordinate for the point.

    Single y

    The y coordinate for the point.

    Returns
    Type Description
    Boolean

    true if the node contains point; otherwise, false.

    | Improve this Doc View Source

    GetContent(Single, Single)

    Get the node's content at the given x,y coordinates.

    public NavNodeContentType GetContent(float x, float y)
    Parameters
    Type Name Description
    Single x

    The x coordinate for the point.

    Single y

    The y coordinate for the point.

    Returns
    Type Description
    NavNodeContentType

    The content included at that point. Will be NavNodeUnknown if point is outside the map.

    | Improve this Doc View Source

    GetNode(Single, Single)

    Get the node at the given x, y coordinates.

    public NavMapGridNode GetNode(float x, float y)
    Parameters
    Type Name Description
    Single x

    The x coordinate for the point.

    Single y

    The y coordinate for the point.

    Returns
    Type Description
    NavMapGridNode

    The smallest node that includes the point. Will return null if point is outside the map.

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • Center
      • Children
      • ColorRgba
      • Content
      • Depth
      • HasChildren
      • Parent
      • Size
    • Methods
      • ContainsPoint(Single, Single)
      • GetContent(Single, Single)
      • GetNode(Single, Single)
    Back to top Copyright (c) 2019 by Wayne Venables