Esempio n. 1
0
// SetCone sets the Source's directional volume cones with the inner angle, outer
// angle, and outer volume
func (s *Source) SetCone(innerAngle, outerAngle, outerVolume float32) {
	s.cone = al.Cone{
		InnerAngle:  int32(mgl32.RadToDeg(innerAngle)),
		OuterAngle:  int32(mgl32.RadToDeg(outerAngle)),
		OuterVolume: outerVolume,
	}
	s.reset()
}
Esempio n. 2
0
//DotAngle computes the angle between the current position and the previous position
func (v *Vertex) DotAngle() float32 {
	return mgl32.RadToDeg(float32(math.Acos(float64(v.cvec.Dot(v.oldvec) / (v.cvec.Len() * v.oldvec.Len())))))
}
Esempio n. 3
0
//Spherical returns the spherical coordinates of the current Position
func (v *Vertex) Spherical() (r, theta, phi float32) {
	r, theta, phi = mgl32.CartesianToSpherical(v.cvec)
	theta = mgl32.RadToDeg(theta)
	phi = mgl32.RadToDeg(phi)
	return
}