Exemplo n.º 1
0
Arquivo: eng.go Projeto: 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))
}
Exemplo n.º 2
0
Arquivo: eng.go Projeto: 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))
}
Exemplo n.º 3
0
Arquivo: eng.go Projeto: 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))
}
Exemplo n.º 4
0
Arquivo: eng.go Projeto: 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))
}