Beispiel #1
0
func (this *Camera) RotateY(angle float64) {
	yaxis := this.Up
	mrot := mat4.RotationAxis(yaxis, angle)
	this.Dir = mrot.Mulv(this.Dir)
}
Beispiel #2
0
func (this *Camera) RotateX(angle float64) {
	xaxis := this.Dir.Cross(this.Up)
	mrot := mat4.RotationAxis(xaxis, angle)
	this.Dir = mrot.Mulv(this.Dir)
}