# NavMesh

# Description

The NavMesh namespace provides functionality related to the game map's navigation mesh, used for obtaining terrain information, height data, and collision detection.

# How to Use

#include "Noble.h"

// Get the height of a position
Vector position(1000, 1000);
float height = NavMesh::GetHeightForPosition(position);

// Check if a position is a wall
bool isWall = NavMesh::IsWall(position);

// Check if a position is in grass
bool isGrass = NavMesh::IsGrass(position);

# GetCollisionFlags

eCollisionFlags GetCollisionFlags(Vector const& position)

Gets the collision flags for a specified position.

Parameter Type Description
position Vector const& Coordinates of the position to check collision
Vector position(1000, 1000);
eCollisionFlags flags = NavMesh::GetCollisionFlags(position);

// Check if it contains the wall flag
if (flags & eCollisionFlags::Wall)
{
    // Position is a wall
}

# GetHeightForPosition

float GetHeightForPosition(Vector const& position)

Gets the terrain height at the specified position.

Parameter Type Description
position Vector const& Coordinates of the position to get height
Vector position(1000, 1000);
float height = NavMesh::GetHeightForPosition(position);

# GetHeightForPosition

float GetHeightForPosition(float x, float y)

Gets the terrain height at the specified position using X and Y coordinates.

Parameter Type Description
x float X coordinate
y float Y coordinate
float height = NavMesh::GetHeightForPosition(1000.0f, 1000.0f);

# IsGrass

bool IsGrass(Vector const& position)

Checks if the specified position is grass.

Parameter Type Description
position Vector const& Coordinates of the position to check
Vector position(1000, 1000);
bool isGrass = NavMesh::IsGrass(position);

# IsInFOW

bool IsInFOW(Vector const& position)

Checks if the specified position is in Fog of War.

Parameter Type Description
position Vector const& Coordinates of the position to check
Vector position(1000, 1000);
bool isInFOW = NavMesh::IsInFOW(position);

# IsRiver

bool IsRiver(Vector const& position)

Checks if the specified position is a river.

Parameter Type Description
position Vector const& Coordinates of the position to check
Vector position(1000, 1000);
bool isRiver = NavMesh::IsRiver(position);

# IsWall

bool IsWall(Vector const& position)

Checks if the specified position is a wall.

Parameter Type Description
position Vector const& Coordinates of the position to check
Vector position(1000, 1000);
bool isWall = NavMesh::IsWall(position);