Documentation
¶
Index ¶
- type Axis
- type Box
- type Item
- type Placement
- type Result
- type SpatialHash
- type SpatialKey
- type SpatialValue
- type Vector
- func (a Vector) Add(b Vector) Vector
- func (a Vector) Fits(b Vector) bool
- func (a Vector) GreaterThanOrEqual(b Vector) bool
- func (a Vector) LessThanOrEqual(b Vector) bool
- func (a Vector) Max(b Vector) Vector
- func (a Vector) Min(b Vector) Vector
- func (a Vector) Negate() Vector
- func (a Vector) Sort() Vector
- func (a Vector) Sub(b Vector) Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpatialHash ¶
type SpatialHash struct {
CellSize int
Cells map[SpatialKey][]*SpatialValue
}
func NewSpatialHash ¶
func NewSpatialHash(cellSize int) *SpatialHash
func (*SpatialHash) Add ¶
func (h *SpatialHash) Add(min, max Vector, result Result)
func (*SpatialHash) KeyForVector ¶
func (h *SpatialHash) KeyForVector(v Vector) SpatialKey
type SpatialKey ¶
type SpatialKey struct {
X, Y, Z int
}
type SpatialValue ¶
type Vector ¶
type Vector struct {
X, Y, Z int
}
func (Vector) GreaterThanOrEqual ¶
func (Vector) LessThanOrEqual ¶
Click to show internal directories.
Click to hide internal directories.