Navarea
CCSNavArea
Methods
uint32_t Id()
Nav area identifier.
const Vector& Center()
Centre of the area.
const Vector& Normal()
Surface normal, which is what gives the area its slope.
Vector Min()
Corner with the smaller components on every axis.
Vector Max()
Corner with the larger components on every axis.
float Width()
Extent along X.
float Height()
Extent along Y.
float Area2D()
Width times height; the area ignoring slope.
float GetHeightAtPosition(x, y)
Height of the area's surface directly under a world position.
- x float
- y float
bool ContainsPoint(vecPosition, flZTolerance)
Whether a position sits on this area, within flZTolerance of its surface.
- vecPosition const Vector&
- flZTolerance float
bool ContainsBox(vecMins, vecMaxs, flZTolerance)
Whether a box sits entirely on this area.
- vecMins const Vector&
- vecMaxs const Vector&
- flZTolerance float
bool IntersectsBox(vecMins, vecMaxs, flZTolerance)
Whether a box overlaps this area at all.
- vecMins const Vector&
- vecMaxs const Vector&
- flZTolerance float
Vector GetClosestPoint(vecPosition)
Point of this area nearest a world position.
- vecPosition const Vector&
float GetDistanceToPoint(vecPosition)
Distance from a world position to this area.
- vecPosition const Vector&
float GetDistanceSquaredToPoint(vecPosition)
Squared distance, for comparing without the square root.
- vecPosition const Vector&
std::vector<CCSNavArea*> GetAllNavAreas()
Every area of the current nav mesh, or empty when there is none.
CCSNavArea* GetClosestNavArea(vecPosition, flMaximumDistance)
Area nearest a position, or null when the mesh is missing or nothing is in range. Search limit; zero or less means no limit.
- vecPosition const Vector&
- flMaximumDistance float
bool IsValidNavMesh()
As above, and writes the distance it found to pflDistanceOut. Whether the game has a nav mesh loaded.