Documentation ¶
Index ¶
- func ACos(a float32) float32
- func ASin(a float32) float32
- func ATan(a float32) float32
- func ATan2(y float32, x float32) float32
- func Abs(a float32) float32
- func Ceil(x float32) float32
- func Cos(a float32) float32
- func Degree(radians float32) float32
- func Equals(f1 float32, f2 float32, threshold float32) bool
- func Floor(x float32) float32
- func Max(x float32, y float32) float32
- func Min(x float32, y float32) float32
- func Mod(x float32, y float32) float32
- func Pow(a float32, exp float32) float32
- func Radians(degree float32) float32
- func Round(x float32) float32
- func Sin(a float32) float32
- func Sqrt(a float32) float32
- func Tan(a float32) float32
- type EulerAngles
- type IMatrixConfig
- type IProjectionConfig
- type Matrix3x3
- type Matrix4x4
- func Identity() Matrix4x4
- func LookAt(eye Vector3, center Vector3, up Vector3) Matrix4x4
- func Orthographic(left float32, right float32, bottom float32, top float32, near float32, ...) Matrix4x4
- func Perspective(fovy float32, aspect float32, near float32, far float32) Matrix4x4
- func Rotate(a1 float32, v1 Vector3) Matrix4x4
- func RotateX(a1 float32) Matrix4x4
- func RotateY(a1 float32) Matrix4x4
- func RotateZ(a1 float32) Matrix4x4
- func Scale(v float32) Matrix4x4
- func Translate(v1 Vector3) Matrix4x4
- func (m1 Matrix4x4) Equals(m2 Matrix4x4, threshold float32) bool
- func (m1 Matrix4x4) Inverse() Matrix4x4
- func (m1 Matrix4x4) Mul(m2 Matrix4x4) Matrix4x4
- func (m1 Matrix4x4) MulScalar(scalar float32) Matrix4x4
- func (m1 Matrix4x4) MulVector(v1 Vector3) Vector3
- func (m1 Matrix4x4) MulVector4(v1 Vector4) Vector4
- func (m1 Matrix4x4) ToMatrix3x3() Matrix3x3
- func (m1 Matrix4x4) Transpose() Matrix4x4
- func (m1 *Matrix4x4) UnmarshalYAML(value *yaml.Node) error
- type OrthographicConfig
- func (config *OrthographicConfig) Decode() Matrix4x4
- func (config *OrthographicConfig) GetFar() float32
- func (config *OrthographicConfig) GetNear() float32
- func (config *OrthographicConfig) GetPlane(distance float32) (float32, float32)
- func (config OrthographicConfig) SetSize(width, height, near, far float32)
- type PerspectiveConfig
- func (config *PerspectiveConfig) Decode() Matrix4x4
- func (config *PerspectiveConfig) GetFar() float32
- func (config *PerspectiveConfig) GetNear() float32
- func (config *PerspectiveConfig) GetPlane(distance float32) (float32, float32)
- func (config *PerspectiveConfig) SetSize(width, height, near, far float32)
- type Plane3
- type Vector2
- func (v1 *Vector2) Add(v2 *Vector2) *Vector2
- func (v1 *Vector2) Dot(v2 *Vector2) float32
- func (v1 *Vector2) Invert() *Vector2
- func (v1 *Vector2) Length() float32
- func (v1 *Vector2) MulScalar(scalar float32) *Vector2
- func (v1 *Vector2) MulVector(v2 *Vector2) *Vector2
- func (v1 *Vector2) Normalize() *Vector2
- func (v1 *Vector2) Sub(v2 *Vector2) *Vector2
- func (v1 *Vector2) X() float32
- func (v1 *Vector2) Y() float32
- type Vector3
- func (v1 Vector3) Add(v2 Vector3) Vector3
- func (v1 Vector3) Cross(v2 Vector3) Vector3
- func (v1 Vector3) Dot(v2 Vector3) float32
- func (v1 Vector3) Invert() Vector3
- func (v1 Vector3) Length() float32
- func (v1 Vector3) MulScalar(scalar float32) Vector3
- func (v1 Vector3) MulVector(v2 Vector3) Vector3
- func (v1 Vector3) Normalize() Vector3
- func (v1 Vector3) Sub(v2 Vector3) Vector3
- func (v1 Vector3) X() float32
- func (v1 Vector3) Y() float32
- func (v1 Vector3) Z() float32
- type Vector4
- func (v1 *Vector4) Add(v2 *Vector4) *Vector4
- func (v1 *Vector4) Dot(v2 *Vector4) float32
- func (v1 *Vector4) Invert() *Vector4
- func (v1 *Vector4) Length() float32
- func (v1 *Vector4) MulScalar(scalar float32) *Vector4
- func (v1 *Vector4) MulVector(v2 *Vector4) *Vector4
- func (v1 *Vector4) Normalize() *Vector4
- func (v1 *Vector4) Sub(v2 *Vector4) *Vector4
- func (v1 *Vector4) W() float32
- func (v1 *Vector4) X() float32
- func (v1 *Vector4) Y() float32
- func (v1 *Vector4) Z() float32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EulerAngles ¶
func ExtractFromMatrix ¶
func ExtractFromMatrix(m Matrix4x4) []EulerAngles
type IMatrixConfig ¶
type IMatrixConfig interface {
Decode() Matrix4x4
}
type IProjectionConfig ¶
type Matrix4x4 ¶
type Matrix4x4 [4][4]float32
func Orthographic ¶
func Perspective ¶
func (Matrix4x4) MulVector4 ¶
func (Matrix4x4) ToMatrix3x3 ¶
func (*Matrix4x4) UnmarshalYAML ¶
type OrthographicConfig ¶
type OrthographicConfig struct { Left float32 `yaml:"left"` Right float32 `yaml:"right"` Bottom float32 `yaml:"bottom"` Top float32 `yaml:"top"` Near float32 `yaml:"near"` Far float32 `yaml:"far"` }
func (*OrthographicConfig) Decode ¶
func (config *OrthographicConfig) Decode() Matrix4x4
func (*OrthographicConfig) GetFar ¶
func (config *OrthographicConfig) GetFar() float32
func (*OrthographicConfig) GetNear ¶
func (config *OrthographicConfig) GetNear() float32
func (*OrthographicConfig) GetPlane ¶
func (config *OrthographicConfig) GetPlane(distance float32) (float32, float32)
func (OrthographicConfig) SetSize ¶
func (config OrthographicConfig) SetSize(width, height, near, far float32)
type PerspectiveConfig ¶
type PerspectiveConfig struct { Fovy float32 `yaml:"fovy"` Aspect float32 `yaml:"aspect"` Near float32 `yaml:"near"` Far float32 `yaml:"far"` }
func (*PerspectiveConfig) Decode ¶
func (config *PerspectiveConfig) Decode() Matrix4x4
func (*PerspectiveConfig) GetFar ¶
func (config *PerspectiveConfig) GetFar() float32
func (*PerspectiveConfig) GetNear ¶
func (config *PerspectiveConfig) GetNear() float32
func (*PerspectiveConfig) GetPlane ¶
func (config *PerspectiveConfig) GetPlane(distance float32) (float32, float32)
func (*PerspectiveConfig) SetSize ¶
func (config *PerspectiveConfig) SetSize(width, height, near, far float32)
type Plane3 ¶
func NewPlaneFromThreePoints ¶
Click to show internal directories.
Click to hide internal directories.