Documentation
¶
Overview ¶
Package navigation provides pathfinding for the bot, supporting primarily an embedded mmap-based pathfinder (vendored). Remote gRPC is optional and deprioritized (stubbed here; full support can be added behind a build tag).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Navigator ¶
type Navigator interface {
FindPath(mapID uint32, start, dest Point3D) (*PathResult, error)
FindRandomPath(mapID uint32, center Point3D, radius float32) (*PathResult, error)
GetHeight(mapID uint32, x, y, z float32) (float32, bool)
GetTerrainHeight(mapID uint32, x, y float32) (float32, bool)
Close()
}
Navigator is the interface for pathfinding.
func NewEmbeddedNavigator ¶
NewEmbeddedNavigator creates a navigator using a single data directory root (containing mmaps/, maps/, vmaps/ subdirectories). All navigators for the same dataDir share a single underlying service.
func NewRemoteNavigator ¶
NewRemoteNavigator creates a navigator that connects to a remote pathfinding service. In this extraction, remote is deprioritized in favor of embedded. Full gRPC support (requiring gen/pb + grpc deps) can be restored behind a build tag or separate optional package if needed for bridge scenarios.
type PathResult ¶
PathResult holds the result of a pathfinding query.
type Point3D ¶
type Point3D struct {
X, Y, Z float32
}
Point3D is a 3D position in game world coordinates.
func (Point3D) DistanceTo ¶
DistanceTo computes 3D distance.
func (Point3D) DistanceTo2D ¶
DistanceTo2D computes 2D distance (ignoring Z).