cameras

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Create() Builder
	WithID(id *uuid.UUID) Builder
	WithLookAtVariable(lookAtVariable string) Builder
	WithLookAtEye(eye fl32.Vec3) Builder
	WithLookAtCenter(center fl32.Vec3) Builder
	WithLookAtUp(up fl32.Vec3) Builder
	WithProjectionVariable(projVariable string) Builder
	WithProjectionFieldofView(fov float32) Builder
	WithProjectionAspectRatio(aspectRatio float32) Builder
	WithProjectionNear(near float32) Builder
	WithProjectionFar(far float32) Builder
	WithIndex(index uint) Builder
	Now() (Camera, error)
}

Builder represents a camera builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type Camera

type Camera interface {
	ID() *uuid.UUID
	Index() uint
	Projection() Projection
	LookAt() LookAt
}

Camera represents a camera

type LookAt

type LookAt interface {
	Variable() string
	Eye() fl32.Vec3
	Center() fl32.Vec3
	Up() fl32.Vec3
}

LookAt represents the direction where the camera looks at

type Projection

type Projection interface {
	Variable() string
	FieldOfView() float32
	AspectRatio() float32
	Near() float32
	Far() float32
}

Projection represents the camera projection

Jump to

Keyboard shortcuts

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