Documentation
¶
Index ¶
- type Point
- func (l Point) Cross(r Point) Point
- func (v Point) DividedBy(a float64) Point
- func (l Point) Dot(r Point) float64
- func (l Point) Equal(r Point) bool
- func (p Point) Length() float64
- func (v Point) Lerp(a Point, t float64) Point
- func (v Point) Minus(a Point) Point
- func (p Point) Mul(M matrix.Matrix) Point
- func (v Point) Negated() Point
- func (p Point) Normalize() Point
- func (p Point) Perpendicular() Point
- func (v Point) Plus(a Point) Point
- func (p Point) PointAngle(angle float64) quaternion.Quat
- func (p Point) Round() Point
- func (v Point) Times(a float64) Point
- func (v Point) Unit() Point
- type Points
- func (points Points) Barycenter() Point
- func (points Points) Clip(m matrix.Matrix, Z float64, clippedPoints Points) bool
- func (points Points) Mul(m matrix.Matrix) Points
- func (points Points) MulB(m matrix.Matrix, outPoints Points) (barycenter Point)
- func (points Points) Normal() Point
- func (points Points) Round()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point struct {
X, Y, Z float64
}
Point is an object used for specifying the outline of a face.
func (Point) Normalize ¶
Normalize returns a pointer to a copy of the Point after normalizing the copy so the vector length is 1.0
func (Point) Perpendicular ¶
func (Point) PointAngle ¶
func (p Point) PointAngle(angle float64) quaternion.Quat
PointAngle returns a quaternion representing a rotation around the axis defined by the point p. The rotation angle is specified in radians.
type Points ¶
type Points []Point
func (Points) Barycenter ¶
Barycenter of the points is used in sorting faces in the painters algorithm.
Click to show internal directories.
Click to hide internal directories.