Esempio n. 1
0
File: eng.go Progetto: toophy/vu
// NewPlane creates a plane located on the origin and oriented by the
// plane normal nx, ny, nz.
func NewPlane(nx, ny, nz float64) move.Body {
	return move.NewBody(move.NewPlane(nx, ny, nz))
}
Esempio n. 2
0
File: eng.go Progetto: toophy/vu
// NewSphere creates a ball shaped physics body located at the origin.
// The sphere size is defined by the radius.
func NewSphere(radius float64) move.Body {
	return move.NewBody(move.NewSphere(radius))
}
Esempio n. 3
0
File: eng.go Progetto: toophy/vu
// NewRay creates a ray located at the origin and pointing in the
// direction dx, dy, dz.
func NewRay(dx, dy, dz float64) move.Body {
	return move.NewBody(move.NewRay(dx, dy, dz))
}
Esempio n. 4
0
File: eng.go Progetto: toophy/vu
// NewBox creates a box shaped physics body located at the origin.
// The box size is w=2*hx, h=2*hy, d=2*hz.
func NewBox(hx, hy, hz float64) move.Body {
	return move.NewBody(move.NewBox(hx, hy, hz))
}