camera

package
v0.0.0-...-f623fcb Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ViewMatrix

func ViewMatrix(pos, lookAt, up math.Vector) math.Matrix

ViewMatrix is a handy function for computing view matrix.

Types

type Interface

type Interface interface {
	object.Object

	Position() math.Vector
	ViewMatrix() math.Matrix
	ProjMatrix() math.Matrix
}

func NewOrthographic

func NewOrthographic(
	pos, lookAt, up math.Vector,
	left, right, bottom, top, near, far float64,
) Interface

func NewPerspective

func NewPerspective(pos, lookAt, up math.Vector, fov, aspect, near, far float64) Interface

type Orthographic

type Orthographic struct {
	math.TransformContext
	// contains filtered or unexported fields
}

func (*Orthographic) Position

func (c *Orthographic) Position() math.Vector

func (*Orthographic) ProjMatrix

func (c *Orthographic) ProjMatrix() math.Matrix

func (*Orthographic) Type

func (c *Orthographic) Type() object.Type

func (*Orthographic) ViewMatrix

func (c *Orthographic) ViewMatrix() math.Matrix

type Perspective

type Perspective struct {
	math.TransformContext
	// contains filtered or unexported fields
}

func (*Perspective) Position

func (c *Perspective) Position() math.Vector

func (*Perspective) ProjMatrix

func (c *Perspective) ProjMatrix() math.Matrix

func (*Perspective) Type

func (c *Perspective) Type() object.Type

func (*Perspective) ViewMatrix

func (c *Perspective) ViewMatrix() math.Matrix

Jump to

Keyboard shortcuts

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