Documentation ¶
Index ¶
- func Base64ToBytes(base64String string) []byte
- func BoolBytes(w io.Writer, b bool) error
- func BoolFromBytes(r io.Reader) (bool, error)
- func FacingOrientation(rotation float32, direction, normal, tangent mgl32.Vec3) mgl32.Quat
- func FacingOrientation64(rotation float64, direction, normal, tangent mgl64.Vec3) mgl64.Quat
- func Float32bytes(w io.Writer, float float32) error
- func Float32frombytes(r io.Reader) (float32, error)
- func Float64bytes(w io.Writer, float float64) error
- func Float64frombytes(r io.Reader) (float64, error)
- func ImageColor(r, g, b, a uint8) image.Image
- func Mat4From(scale, translation mgl32.Vec3, orientation mgl32.Quat) mgl32.Mat4
- func Mat4From64(scale, translation mgl64.Vec3, orientation mgl64.Quat) mgl64.Mat4
- func Max(values ...float64) float64
- func MaxF32(values ...float32) float32
- func Min(values ...float64) float64
- func MinF32(values ...float32) float32
- func PointLiesInsideAABB(a, b, point mgl32.Vec2) bool
- func PointLiesInsideTriangle(a, b, c, point mgl32.Vec3) bool
- func PointToLineDist(a, b, point mgl32.Vec3) float32
- func PointToPlaneDist(a, b, c, point mgl32.Vec3) float32
- func Quat_32_from(q mgl64.Quat) mgl32.Quat
- func Quat_64_from(q mgl32.Quat) mgl64.Quat
- func RayTriangleIntersect(a, b, c, start, direction mgl32.Vec3) (point mgl32.Vec3, ok bool)
- func Round(val float32, roundOn float32, places int) float32
- func RoundHalfUp(val float32) (newVal int)
- func SegmentCircleIntersect(radius float32, center, start, finish mgl32.Vec2) (mgl32.Vec2, error)
- func SerializeArgs(args ...interface{}) ([]byte, error)
- func SetInterval(fn func(), interval time.Duration) func()
- func Stringbytes(w io.Writer, str string) error
- func Stringfrombytes(r io.Reader) (string, error)
- func TwoSegmentIntersect(p11, p12, p21, p22 mgl32.Vec2) (mgl32.Vec2, error)
- func UInt16Bytes(w io.Writer, i uint16) error
- func UInt16frombytes(r io.Reader) (uint16, error)
- func UInt32Bytes(w io.Writer, i uint32) error
- func UInt32frombytes(r io.Reader) (uint32, error)
- func UInt64Bytes(w io.Writer, i uint64) error
- func UInt64frombytes(r io.Reader) (uint64, error)
- func UInt8Bytes(w io.Writer, i uint8) error
- func UInt8frombytes(r io.Reader) (uint8, error)
- func Vec2AngleBetween(v1, v2 mgl32.Vec2) float32
- func Vec2Cross(v1, v2 mgl32.Vec2) float32
- func Vec2LenSq(v1 mgl32.Vec2) float32
- func Vec2LenSq64(v1 mgl64.Vec2) float64
- func Vec2Rotate(v mgl32.Vec2, angle float32) mgl32.Vec2
- func Vec3LenSq(v1 mgl32.Vec3) float32
- func Vec3LenSq64(v1 mgl64.Vec3) float64
- func Vec3Lerp(start, end mgl32.Vec3, amount float32) mgl32.Vec3
- func Vec3Lerp64(start, end mgl64.Vec3, amount float64) mgl64.Vec3
- func Vec3_32_from(v mgl64.Vec3) mgl32.Vec3
- func Vec3_64_from(v mgl32.Vec3) mgl64.Vec3
- func Vector2bytes(w io.Writer, vector mgl32.Vec2) error
- func Vector2bytes64(w io.Writer, vector mgl64.Vec2) error
- func Vector2frombytes(r io.Reader) (mgl32.Vec2, error)
- func Vector2frombytes64(r io.Reader) (mgl64.Vec2, error)
- func Vector3bytes(w io.Writer, vector mgl32.Vec3) error
- func Vector3bytes64(w io.Writer, vector mgl64.Vec3) error
- func Vector3frombytes(r io.Reader) (mgl32.Vec3, error)
- func Vector3frombytes64(r io.Reader) (mgl64.Vec3, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64ToBytes ¶
func FacingOrientation ¶
FacingOrientation - return an orientation that always faces the given direction with rotation
func FacingOrientation64 ¶
func ImageColor ¶
ImageColor - returns an image with a single pixel
func PointLiesInsideAABB ¶
PointLiesInsideAABB - return true if the point lies within the rectan formed by points a and b
func PointLiesInsideTriangle ¶
PointLiesInsideTriangle - return true if the point lies within the triangle formed by points (a,b,c)
func PointToLineDist ¶
PointToLineDist distance from line (a,b) to point
func PointToPlaneDist ¶
PointToPlaneDist distance from plane (a,b,c) to point
func RayTriangleIntersect ¶
RayTriangleIntersect - return true if the ray formed by start and direction intersects with the triangle formed by points (a,b,c)
func RoundHalfUp ¶
func SegmentCircleIntersect ¶
func SerializeArgs ¶
func SetInterval ¶
func TwoSegmentIntersect ¶
TwoSegmentIntersect - find the intersection point of two line segments <p11-p12> and <p21-p22>
func Vec2AngleBetween ¶
func Vec2LenSq64 ¶
func Vec3LenSq64 ¶
Types ¶
This section is empty.