geometry

package
v0.0.0-...-6e0df7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DegToRad

func DegToRad(angle float64) float64

Types

type Plane

type Plane struct {
	A, B, C, D Vector3
}

func (Plane) BiLerpWithinPlane

func (a Plane) BiLerpWithinPlane(u float64, v float64) Vector3

func (Plane) Equals

func (a Plane) Equals(b Plane) bool

type Point

type Point struct {
	X, Y, Z int
}

func FromGandalfPoint

func FromGandalfPoint(point gandalf_geo.Point) Point

func (*Point) ToVector3

func (p *Point) ToVector3() Vector3

type PointWithColour

type PointWithColour struct {
	Point  Point
	Colour byte
}

type Vector2

type Vector2 struct {
	X, Y float64
}

func (Vector2) Add

func (a Vector2) Add(b Vector2) Vector2

func (Vector2) DistanceSquared

func (a Vector2) DistanceSquared(b Vector2) float64

func (Vector2) DivideByVector

func (a Vector2) DivideByVector(by Vector2) Vector2

func (Vector2) Dot

func (a Vector2) Dot(b Vector2) float64

func (Vector2) LengthSquared

func (a Vector2) LengthSquared() float64

type Vector3

type Vector3 struct {
	X, Y, Z float64
}

func UnitX

func UnitX() Vector3

func UnitY

func UnitY() Vector3

func UnitZ

func UnitZ() Vector3

func Zero

func Zero() Vector3

func (Vector3) Add

func (a Vector3) Add(b Vector3) Vector3

func (Vector3) Cross

func (a Vector3) Cross(b Vector3) Vector3

func (Vector3) DivideByConstant

func (a Vector3) DivideByConstant(by float64) Vector3

func (Vector3) DivideByVector

func (a Vector3) DivideByVector(by Vector3) Vector3

func (Vector3) Dot

func (a Vector3) Dot(b Vector3) float64

func (Vector3) Equals

func (a Vector3) Equals(b Vector3) bool

func (Vector3) Length

func (a Vector3) Length() float64

func (Vector3) Lerp

func (a Vector3) Lerp(b Vector3, amt float64) Vector3

func (Vector3) MultiplyByConstant

func (a Vector3) MultiplyByConstant(by float64) Vector3

func (Vector3) MultiplyByVector

func (a Vector3) MultiplyByVector(by Vector3) Vector3

func (Vector3) Normalise

func (a Vector3) Normalise() Vector3

func (Vector3) Subtract

func (a Vector3) Subtract(b Vector3) Vector3

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL