camera

package
v0.0.0-...-0f9c8cb Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Yaw   = float32(270.0)
	Pitch = float32(-60.0)
)
View Source
const (
	Perspective = Projection(iota)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	*graphic.Transform
	// contains filtered or unexported fields
}

func NewPerspectiveCamera

func NewPerspectiveCamera(fov, aspect, near, far float32) *Camera

func (Camera) ProjectionMatrix

func (c Camera) ProjectionMatrix() mgl32.Mat4

func (*Camera) ResetAngleAndY

func (c *Camera) ResetAngleAndY(windowWidth, windowHeight uint32)

func (*Camera) Rotate

func (c *Camera) Rotate(yaw float32, pitch float32)

func (*Camera) SetY

func (c *Camera) SetY(y float32)

func (*Camera) UpdateVisibleZRange

func (c *Camera) UpdateVisibleZRange(width uint32, height uint32)

func (*Camera) ViewMatrix

func (c *Camera) ViewMatrix() mgl32.Mat4

type Projection

type Projection int

Jump to

Keyboard shortcuts

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