tempest

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package tempest contains 3D models and formulas.

Index

Constants

This section is empty.

Variables

View Source
var Infinity = math32.Inf(1)

Functions

This section is empty.

Types

type C2Vector

type C2Vector struct {
	X float32
	Y float32
}

func DecodeC2Vector

func DecodeC2Vector(r io.Reader) (C2Vector, error)

func (C2Vector) Encode

func (c2 C2Vector) Encode(wr io.Writer) error

func (C2Vector) String

func (c2 C2Vector) String() string

type C2iVector

type C2iVector struct {
	X int32
	Y int32
}

func DecodeC2iVector

func DecodeC2iVector(r io.Reader) (C2iVector, error)

type C3Vector

type C3Vector struct {
	X float32
	Y float32
	Z float32
}

func DecodeC3Vector

func DecodeC3Vector(r io.Reader) (C3Vector, error)

func (C3Vector) C2

func (c3 C3Vector) C2() C2Vector

func (C3Vector) C4

func (c3 C3Vector) C4() C4Vector

func (C3Vector) Distance

func (c3 C3Vector) Distance(oc3 C3Vector) float32

func (*C3Vector) Dot

func (c3 *C3Vector) Dot(oc3 C3Vector) float32

func (C3Vector) Encode

func (c3 C3Vector) Encode(wr io.Writer) error

func (C3Vector) Mag

func (c3 C3Vector) Mag() float32

func (*C3Vector) Multiply

func (c3 *C3Vector) Multiply(a float32)

func (*C3Vector) Normalize

func (c3 *C3Vector) Normalize()

func (*C3Vector) SquaredMag

func (c3 *C3Vector) SquaredMag() float32

func (*C3Vector) Sub

func (c3 *C3Vector) Sub(oc3 C3Vector) C3Vector

type C4Quaternion

type C4Quaternion C4Vector

func (*C4Quaternion) Decode

func (cq *C4Quaternion) Decode(reader io.Reader) (err error)

func (*C4Quaternion) DecodePacked

func (cq *C4Quaternion) DecodePacked(reader io.Reader) error

func (*C4Quaternion) EncodePacked

func (cq *C4Quaternion) EncodePacked(writer io.Writer) (err error)

func (*C4Quaternion) Pack

func (cq *C4Quaternion) Pack() (raw C4QuaternionCompressed)

type C4QuaternionCompressed

type C4QuaternionCompressed uint64

func (*C4QuaternionCompressed) Unpack

func (c4 *C4QuaternionCompressed) Unpack() C4Quaternion

type C4Vector

type C4Vector struct {
	X float32
	Y float32
	Z float32
	W float32
}

func DecodeC4Vector

func DecodeC4Vector(r io.Reader) (C4Vector, error)

func ParseC4Vector

func ParseC4Vector(in string) (C4Vector, error)

func (C4Vector) C2

func (c4 C4Vector) C2() C2Vector

func (C4Vector) C3

func (c4 C4Vector) C3() C3Vector

func (C4Vector) Distance

func (c4 C4Vector) Distance(oc4 C4Vector) float32

func (C4Vector) Encode

func (c4 C4Vector) Encode(wr io.Writer) error

type CAaBox

type CAaBox struct {
	Min C3Vector
	Max C3Vector
}

type CAaSphere

type CAaSphere struct {
	Position C3Vector
	Radius   float32
}

func (*CAaSphere) Contains

func (sphere *CAaSphere) Contains(point C3Vector) bool

Jump to

Keyboard shortcuts

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