graphics

package
v0.0.0-...-02723c8 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const LookResolution float64 = 0.002

Variables

View Source
var CameraShader uint32
View Source
var Offset = mgl32.Vec3{0, 0.65, 0}
View Source
var RotXMatLoc int32
View Source
var RotYMatLoc int32
View Source
var RotZMatLoc int32
View Source
var TrMatLoc int32
View Source
var WorldCamera = Camera{}

Functions

func Init

func Init()

func PollMouse

func PollMouse(window *glfw.Window)

func UpdateCamera

func UpdateCamera(position mgl32.Vec3)

Types

type Camera

type Camera struct {
	Rotation mgl32.Vec3
	// contains filtered or unexported fields
}

func (Camera) GetTranslationMatrix

func (self Camera) GetTranslationMatrix() *mgl32.Mat4

func (Camera) GetXRotationMatrix

func (self Camera) GetXRotationMatrix() *mgl32.Mat4

func (Camera) GetYRotationMatrix

func (self Camera) GetYRotationMatrix() *mgl32.Mat4

func (Camera) GetZRotationMatrix

func (self Camera) GetZRotationMatrix() *mgl32.Mat4

func (*Camera) RotateBy

func (self *Camera) RotateBy(pitch, yaw float32)

func (*Camera) Translate

func (self *Camera) Translate(translation mgl32.Vec3)

func (*Camera) TranslateBy

func (self *Camera) TranslateBy(translationDelta mgl32.Vec3)

func (*Camera) Translation

func (self *Camera) Translation() mgl32.Vec3

Jump to

Keyboard shortcuts

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