trs

package
v0.22.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayNode added in v0.22.2

type ArrayNode = nodes.Struct[[]TRS, ArrayNodeData]

type ArrayNodeData added in v0.22.2

type ArrayNodeData struct {
	Position nodes.NodeOutput[[]vector3.Float64]
	Scale    nodes.NodeOutput[[]vector3.Float64]
	Rotation nodes.NodeOutput[[]quaternion.Quaternion]
}

func (ArrayNodeData) Process added in v0.22.2

func (tnd ArrayNodeData) Process() ([]TRS, error)

type NewNode added in v0.22.2

type NewNode = nodes.Struct[TRS, NewNodeData]

type NewNodeData added in v0.22.2

type NewNodeData struct {
	Position nodes.NodeOutput[vector3.Float64]
	Scale    nodes.NodeOutput[vector3.Float64]
	Rotation nodes.NodeOutput[quaternion.Quaternion]
}

func (NewNodeData) Process added in v0.22.2

func (tnd NewNodeData) Process() (TRS, error)

type TRS

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

func Identity added in v0.22.2

func Identity() TRS

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) Multiply added in v0.22.1

func (trs TRS) Multiply(other TRS) TRS

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