geom3d

package
v0.0.0-...-be50a85 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAB

func AddAB(a [3]float32, b [3]float32) [3]float32

func AverageAB

func AverageAB(a [3]float32, b [3]float32) [3]float32

func AverageAll

func AverageAll(all [][3]float32) [3]float32

func CrossAB

func CrossAB(a [3]float32, b [3]float32) [3]float32

func DotAB

func DotAB(a [3]float32, b [3]float32) float32

func GetFaceNormal

func GetFaceNormal(v0 [3]float32, v1 [3]float32, v2 [3]float32) bool

func IsPointInside

func IsPointInside(p [3]float32, v0 [3]float32, v1 [3]float32, v2 [3]float32) bool

func Length

func Length(v [3]float32) float32

func Normalize

func Normalize(v [3]float32) [3]float32

func SubAB

func SubAB(a [3]float32, b [3]float32) [3]float32

func SumAll

func SumAll(all [][3]float32) [3]float32

Types

type Matrix4

type Matrix4 struct {
	// contains filtered or unexported fields
}

func NewMatrix4

func NewMatrix4() *Matrix4

func (*Matrix4) Copy

func (self *Matrix4) Copy() *Matrix4

func (*Matrix4) GetElements

func (self *Matrix4) GetElements() *[16]float32

func (*Matrix4) MultiplyToTheLeft

func (self *Matrix4) MultiplyToTheLeft(matrix *Matrix4) *Matrix4

func (*Matrix4) MultiplyToTheRight

func (self *Matrix4) MultiplyToTheRight(matrix *Matrix4) *Matrix4

func (*Matrix4) MultiplyVector3

func (self *Matrix4) MultiplyVector3(v [3]float32) [3]float32

func (*Matrix4) Set

func (self *Matrix4) Set(
	v00 float32, v01 float32, v02 float32, v03 float32,
	v10 float32, v11 float32, v12 float32, v13 float32,
	v20 float32, v21 float32, v22 float32, v23 float32,
	v30 float32, v31 float32, v32 float32, v33 float32) *Matrix4

func (*Matrix4) SetCopy

func (self *Matrix4) SetCopy(m *Matrix4) *Matrix4

func (*Matrix4) SetIdentity

func (self *Matrix4) SetIdentity() *Matrix4

func (*Matrix4) SetMultiplyMatrices

func (self *Matrix4) SetMultiplyMatrices(matrices ...*Matrix4) *Matrix4

func (*Matrix4) SetRotationByAxis

func (self *Matrix4) SetRotationByAxis(axis [3]float32, angle_in_degree float32) *Matrix4

func (*Matrix4) SetScaling

func (self *Matrix4) SetScaling(sx float32, sy float32, sz float32) *Matrix4

func (*Matrix4) SetTranslation

func (self *Matrix4) SetTranslation(tx float32, ty float32, tz float32) *Matrix4

func (*Matrix4) SetTranspose

func (self *Matrix4) SetTranspose() *Matrix4

func (*Matrix4) Transpose

func (self *Matrix4) Transpose() *Matrix4

Jump to

Keyboard shortcuts

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