draw

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Frame     int
	Time      float32
	Delta     float32
	Camera    Camera
	Transform mat4.T
}

Args holds the arguments used to perform a draw pass. Includes the various transformation matrices and position of the camera.

func (Args) Apply

func (d Args) Apply(t mat4.T) Args

Apply the effects of a transform

type Camera

type Camera struct {
	Proj        mat4.T
	View        mat4.T
	ViewProj    mat4.T
	ProjInv     mat4.T
	ViewInv     mat4.T
	ViewProjInv mat4.T
	Position    vec3.T
	Forward     vec3.T
	Viewport    Viewport
	Near        float32
	Far         float32
	Aspect      float32
	Fov         float32
}

type Pass

type Pass interface {
	Name() string
	Record(command.Recorder, Args, object.Component)
	Destroy()
}

type Viewport

type Viewport struct {
	Width  int
	Height int
	Scale  float32
}

func (Viewport) Aspect

func (s Viewport) Aspect() float32

func (Viewport) NormalizeCursor

func (s Viewport) NormalizeCursor(cursor vec2.T) vec2.T

func (Viewport) Size

func (s Viewport) Size() vec2.T

Jump to

Keyboard shortcuts

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