trs

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TRS

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

func New

func New(position vector3.Float64, rotation quaternion.Quaternion, scale vector3.Float64) TRS

Create a new TRS

func Position

func Position(position vector3.Float64) TRS

Create a new TRS with a specified position, with a scale of (1, 1, 1) and a identity rotation

func Rotation

func Rotation(rotation quaternion.Quaternion) TRS

Create a new TRS with a specified rotation, a position of (0, 0, 0) and a scale of (1, 1, 1)

func Scale

func Scale(scale vector3.Float64) TRS

Create a new TRS with a specified scale, with a position of (0, 0, 0) and a identity rotation

func (TRS) Position

func (trs TRS) Position() vector3.Float64

The position of the TRS

func (TRS) Rotation

func (trs TRS) Rotation() quaternion.Quaternion

The rotation of the TRS

func (TRS) Scale

func (trs TRS) Scale() vector3.Float64

The scale of the TRS

func (TRS) Transform

func (trs TRS) Transform(in vector3.Float64) vector3.Float64

Transform a point by the TRS

func (TRS) TransformArray

func (trs TRS) TransformArray(in []vector3.Float64) []vector3.Float64

Transform an array of points by the TRS

func (TRS) TransformInPlace

func (trs TRS) TransformInPlace(in []vector3.Float64)

Transform an array of points by the TRS and store those changes in the array passed in

func (TRS) Translate

func (trs TRS) Translate(in vector3.Float64) TRS

Create a new TRS with the position translated by "in"

Jump to

Keyboard shortcuts

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