geom2d

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 [2]float32, b [2]float32) [2]float32

func BBoxAddPoint

func BBoxAddPoint(bbox *[2][2]float32, v [2]float32)

func BBoxCenter

func BBoxCenter(b [2][2]float32) [2]float32

func BBoxInit

func BBoxInit() [2][2]float32

func BBoxInside

func BBoxInside(b [2][2]float32, v [2]float32) bool

func BBoxIsSet

func BBoxIsSet(b [2][2]float32) bool

func BBoxMerge

func BBoxMerge(b1 [2][2]float32, b2 [2][2]float32) [2][2]float32

func BBoxSize

func BBoxSize(b [2][2]float32) [2]float32

func CrossAB

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

func IsCCW

func IsCCW(v0 [2]float32, v1 [2]float32, v2 [2]float32) bool

func IsPointInside

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

func Length

func Length(v [2]float32) float32

func Normalize

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

func SubAB

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

Types

type Matrix3

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

func NewMatrix3

func NewMatrix3() *Matrix3

func (*Matrix3) Copy

func (self *Matrix3) Copy() *Matrix3

func (*Matrix3) GetElements

func (self *Matrix3) GetElements() *[9]float32

func (*Matrix3) MultiplyToTheLeft

func (self *Matrix3) MultiplyToTheLeft(matrix *Matrix3) *Matrix3

func (*Matrix3) MultiplyToTheRight

func (self *Matrix3) MultiplyToTheRight(matrix *Matrix3) *Matrix3

func (*Matrix3) MultiplyVector2

func (self *Matrix3) MultiplyVector2(v [2]float32) [2]float32

func (*Matrix3) Set

func (self *Matrix3) Set(v00 float32, v01 float32, v02 float32, v10 float32, v11 float32, v12 float32, v20 float32, v21 float32, v22 float32) *Matrix3

func (*Matrix3) SetCopy

func (self *Matrix3) SetCopy(m *Matrix3) *Matrix3

func (*Matrix3) SetIdentity

func (self *Matrix3) SetIdentity() *Matrix3

func (*Matrix3) SetMultiplyMatrices

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

func (*Matrix3) SetRotation

func (self *Matrix3) SetRotation(angle_in_degree float32) *Matrix3

func (*Matrix3) SetScaling

func (self *Matrix3) SetScaling(sx float32, sy float32) *Matrix3

func (*Matrix3) SetTranslation

func (self *Matrix3) SetTranslation(tx float32, ty float32) *Matrix3

func (*Matrix3) SetTranspose

func (self *Matrix3) SetTranspose() *Matrix3

func (*Matrix3) Transpose

func (self *Matrix3) Transpose() *Matrix3

Jump to

Keyboard shortcuts

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