Documentation
¶
Index ¶
- func Draw[T Drawable](shape T, d displayer, clr color.Color)
- func Fill[T Drawable](shape T, d displayer, clr color.Color)
- type Circle
- type Collision
- type Drawable
- type Line
- type Normal
- type Point
- type Ray
- type Rect
- func (r Rect) ContainsPoint(p Point) bool
- func (r Rect) Dimension(i int) float64
- func (r Rect) Dimensions() int
- func (r Rect) Draw(d displayer, clr color.Color)
- func (r Rect) Filled(d displayer, clr color.Color)
- func (r Rect) GetCenter() (float64, float64)
- func (r Rect) GetOverlap(other Rect) (float64, float64)
- func (r Rect) HasRayIntersection(ray Ray, collision *Collision) bool
- func (r Rect) IsAxisAlignedCollision(other Rect) bool
- type Segment
- type Triangle
- type Vector
- func (v Vector) Add(other Vector) Vector
- func (v Vector) Divide(other Vector) Vector
- func (v Vector) GetDirection(b Vector) float64
- func (v Vector) GetDistance(b Vector) float64
- func (v Vector) Multiply(other Vector) Vector
- func (v Vector) Offset(o Vector) Vector
- func (v Vector) String() string
- func (v Vector) Subtract(other Vector) Vector
- func (v Vector) ToPoint() Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
func (Line) IsParrallel ¶
type Rect ¶
type Rect [4]float64
Rect a float64 slice with 4 elements []float64{x, y, width, height}
func (Rect) ContainsPoint ¶
func (Rect) Dimensions ¶
Dimensions returns the total number of dimensions
func (Rect) HasRayIntersection ¶
HasRayIntersection returns true if an intersection exists the collision argument will contain information about the collision
func (Rect) IsAxisAlignedCollision ¶
type Vector ¶
type Vector [2]float64
Vector a float64 slice with 2 elements [2]float64{x, y}
func MakeVector ¶
func (Vector) GetDirection ¶
func (Vector) GetDistance ¶
Click to show internal directories.
Click to hide internal directories.