transform

package
v0.0.0-...-e7326f8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transform

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

Transform implements ITransform interface. Do not use Transform directly! Use interface instead of. Do not change or get values directly.

This component does not need to be added to the GetComponents() function!

func New

func New(position, scale *vector2.Vector2, rotation, layer float64) *Transform

func (Transform) GetID

func (t Transform) GetID() string

Implementation of the goi.Component

func (*Transform) GetLayer

func (t *Transform) GetLayer() float64

Returns displaying layer of the object. Also known as Z coordinate.

func (*Transform) GetLocalLayer

func (t *Transform) GetLocalLayer() float64

Returns the local position of the object.

func (*Transform) GetLocalPosition

func (t *Transform) GetLocalPosition() *vector2.Vector2

Returns the local position of the object.

func (*Transform) GetLocalRotation

func (t *Transform) GetLocalRotation() float64

Returns the local rotation of the object.

func (*Transform) GetLocalScale

func (t *Transform) GetLocalScale() *vector2.Vector2

Returns the local scale of the object.

func (*Transform) GetParent

func (t *Transform) GetParent() interfaces.ITransform

Returns parent of the object. If there is no parent, nil will be returned.

func (*Transform) GetPosition

func (t *Transform) GetPosition() *vector2.Vector2

Returns current position of the object.

func (*Transform) GetRotation

func (t *Transform) GetRotation() float64

Returns rotation of the object.

func (*Transform) GetScale

func (t *Transform) GetScale() *vector2.Vector2

Returns current scale of the object.

func (*Transform) SetLayer

func (t *Transform) SetLayer(layer float64)

Changes displaying layer of the object. This also known as Z coordinate.

func (*Transform) SetLocalLayer

func (t *Transform) SetLocalLayer(layer float64)

Changes a local displaying layer of the object. This also known as Z coordinate.

func (*Transform) SetLocalPosition

func (t *Transform) SetLocalPosition(pos *vector2.Vector2)

Changes a local position of the object.

func (*Transform) SetLocalRotation

func (t *Transform) SetLocalRotation(rot float64)

Changes a local rotation of the object.

func (*Transform) SetLocalScale

func (t *Transform) SetLocalScale(scale *vector2.Vector2)

Changes a local scale of the object.

func (*Transform) SetParent

func (t *Transform) SetParent(parent interfaces.ITransform)

Changes parent of the transform.

func (*Transform) SetPosition

func (t *Transform) SetPosition(pos *vector2.Vector2)

Changes current position of the object.

func (*Transform) SetRotation

func (t *Transform) SetRotation(rot float64)

Changes rotation of the object.

func (*Transform) SetScale

func (t *Transform) SetScale(scale *vector2.Vector2)

Changes scale of the object.

Jump to

Keyboard shortcuts

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