Documentation
¶
Index ¶
- Variables
- type Point2
- type Point3
- type Point4
- type SGrid
- func (g *SGrid[TCell, TEdge]) GetCell(x, y int) TCell
- func (g *SGrid[TCell, TEdge]) GetCellPt(pt Point2) TCell
- func (g *SGrid[TCell, TEdge]) GetEdges(x, y int) (TEdge, TEdge, TEdge, TEdge)
- func (g *SGrid[TCell, TEdge]) GetEdgesPt(pt Point2) (TEdge, TEdge, TEdge, TEdge)
- func (g *SGrid[TCell, TEdge]) GetNeighbors(x, y int) []TCell
- func (g *SGrid[TCell, TEdge]) GetNeighborsMap(x, y int) map[Point2]TCell
- func (g *SGrid[TCell, TEdge]) SetCell(x, y int, cell TCell)
- func (g *SGrid[TCell, TEdge]) SetEdges(x, y int, n, e, s, w TEdge)
- func (g *SGrid[TCell, TEdge]) Swap(x1, y1, x2, y2 int)
- type Vector2
- func (v Vector2) Norm() Vector2
- func (v Vector2) Offset(x, y float32) Vector2
- func (v Vector2) OffsetV(o Vector2) Vector2
- func (v Vector2) Scale(f float32) Vector2
- func (v Vector2) Vector2() Vector2
- func (v Vector2) Vector3() Vector3
- func (v Vector2) Vector4() Vector4
- func (v Vector2) X() float32
- func (v Vector2) XY() (float32, float32)
- func (v Vector2) Y() float32
- type Vector3
- func (v Vector3) Norm() Vector3
- func (v Vector3) Offset(x, y, z float32) Vector3
- func (v Vector3) OffsetV(o Vector3) Vector3
- func (v Vector3) Scale(f float32) Vector3
- func (v Vector3) Vector2() Vector2
- func (v Vector3) Vector3() Vector3
- func (v Vector3) Vector4() Vector4
- func (v Vector3) X() float32
- func (v Vector3) XYZ() (float32, float32, float32)
- func (v Vector3) Y() float32
- func (v Vector3) Z() float32
- type Vector4
- func (v Vector4) Norm() Vector4
- func (v Vector4) Offset(x, y, z, w float32) Vector4
- func (v Vector4) OffsetV(o Vector4) Vector4
- func (v Vector4) Scale(f float32) Vector4
- func (v Vector4) Vector2() Vector2
- func (v Vector4) Vector3() Vector3
- func (v Vector4) Vector4() Vector4
- func (v Vector4) W() float32
- func (v Vector4) X() float32
- func (v Vector4) XYZW() (float32, float32, float32, float32)
- func (v Vector4) Y() float32
- func (v Vector4) Z() float32
Constants ¶
This section is empty.
Variables ¶
View Source
var ( N = Point2{0, 1} S = Point2{0, -1} E = Point2{1, 0} W = Point2{-1, 0} )
Functions ¶
This section is empty.
Types ¶
type SGrid ¶ added in v0.0.22
func (*SGrid[TCell, TEdge]) GetEdges ¶ added in v0.0.22
GetEdges returns (northEdge, eastEdge, southEdge, westEdge)
func (*SGrid[TCell, TEdge]) GetEdgesPt ¶ added in v0.0.25
GetEdgesPt returns (northEdge, eastEdge, southEdge, westEdge)
func (*SGrid[TCell, TEdge]) GetNeighbors ¶ added in v0.0.22
GetNeighbors returns in NESW order
func (*SGrid[TCell, TEdge]) GetNeighborsMap ¶ added in v0.0.25
GetNeighborsMap returns in arbitrary order
Click to show internal directories.
Click to hide internal directories.