コード例 #1
0
ファイル: camera.go プロジェクト: walesey/go-engine
func (c *Camera) SetOrientation(orientation mgl32.Quat) {
	direction := orientation.Rotate(mgl32.Vec3{1, 0, 0})
	c.Lookat = c.Translation.Add(direction)
}
コード例 #2
0
ファイル: light.go プロジェクト: walesey/go-engine
func (l *Light) SetOrientation(orientation mgl32.Quat) {
	if l.LightType == DIRECTIONAL {
		l.Direction = orientation.Rotate(mgl32.Vec3{1, 0, 0})
	}
}