예제 #1
0
파일: source.go 프로젝트: tanema/amore
// 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()
}
예제 #2
0
파일: vertex.go 프로젝트: bvandre/object
//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())))))
}
예제 #3
0
파일: vertex.go 프로젝트: bvandre/object
//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
}