Documentation ¶
Overview ¶
Package siface .
Package siface .
Package siface .
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISearch ¶
type ISearch interface { // Add adds an entity to the search tree. Add(entity ISpatial) bool // Remove removes an entity from the search tree by its ID. Remove(entityId int64) bool // GetSurroundingEntities finds entities within a certain radius of a center point. GetSurroundingEntities(center []float32, radius float32, filters ...func(entity ISpatial) bool) []ISpatial // ToDot generates a dot file for the search tree. ToDot() error }
ISearch interface for search, like Octree, QuadTree, RTree, etc.
type ISpatial ¶
type ISpatial interface { GetID() int64 // GetID returns the ID of the spatial entity. GetLocation() geo.Vec3Int // returns the location of the spatial entity. // GetBound returns the boundary of the spatial entity. // //it is meaningless in octree and quadtree, because octree and quadtree treat all entities as a point, // but it is meaningful in rtree GetBound() bounds.Bound }
ISpatial spatial entity interface.
Click to show internal directories.
Click to hide internal directories.