Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Camera ¶
type Camera struct { Type Type Pos gglm.Vec3 Forward gglm.Vec3 WorldUp gglm.Vec3 NearClip float32 FarClip float32 // Perspective data Fov float32 AspectRatio float32 // Ortho data Left, Right, Top, Bottom float32 // Matrices ViewMat gglm.Mat4 ProjMat gglm.Mat4 }
func NewOrthographic ¶
func NewPerspective ¶
func (*Camera) Update ¶
func (c *Camera) Update()
Update recalculates view matrix and projection matrix. Should be called whenever a camera parameter changes
func (*Camera) UpdateRotation ¶
UpdateRotation calculates a new forward vector and then calls camera.Update()
Click to show internal directories.
Click to hide internal directories.