Documentation ¶
Index ¶
- type Brute
- func (s *Brute[D]) Add(entity *Entity[D])
- func (s *Brute[D]) Collisions(flags util.Match[Flags], callback CollisionCallback[D])
- func (s *Brute[D]) Contains(query Query[D], callback SearchCallback[D]) int
- func (s *Brute[D]) Intersects(query Query[D], callback SearchCallback[D]) int
- func (s *Brute[D]) Nearest(query Query[D], nearest []Nearest[D]) int
- func (s *Brute[D]) Raytrace(query Query[D], callback SearchCallback[D]) int
- func (s *Brute[D]) Update()
- type CollisionCallback
- type Dimensional
- type Entity
- type Flags
- type Nearest
- type Query
- type SearchCallback
- type Shape
- type Space
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Brute ¶
type Brute[D Dimensional] struct { // contains filtered or unexported fields }
func (*Brute[D]) Collisions ¶
func (s *Brute[D]) Collisions(flags util.Match[Flags], callback CollisionCallback[D])
func (*Brute[D]) Contains ¶
func (s *Brute[D]) Contains(query Query[D], callback SearchCallback[D]) int
func (*Brute[D]) Intersects ¶
func (s *Brute[D]) Intersects(query Query[D], callback SearchCallback[D]) int
type CollisionCallback ¶
type Dimensional ¶
type Nearest ¶
type Nearest[D Dimensional] struct { Entity *Entity[D] Distance float32 }
type SearchCallback ¶
type Shape ¶
type Shape[D Dimensional] interface { GetExtent(position D) (min, max D) GetCircle(position D) (center D, radius float32) }
type Space ¶
type Space[D Dimensional] interface { Add(entity *Entity[D]) Update() Collisions(flags util.Match[Flags], callback CollisionCallback[D]) Intersects(query Query[D], callback SearchCallback[D]) int Contains(query Query[D], callback SearchCallback[D]) int Raytrace(query Query[D], callback SearchCallback[D]) int Nearest(query Query[D], nearest []Nearest[D]) int }
Click to show internal directories.
Click to hide internal directories.