Example #1
0
func (c *Camera) SetOrientation(orientation mgl32.Quat) {
	direction := orientation.Rotate(mgl32.Vec3{1, 0, 0})
	c.Lookat = c.Translation.Add(direction)
}
Example #2
0
func (l *Light) SetOrientation(orientation mgl32.Quat) {
	if l.LightType == DIRECTIONAL {
		l.Direction = orientation.Rotate(mgl32.Vec3{1, 0, 0})
	}
}