Exemple #1
0
Fichier : eng.go Projet : 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))
}
Exemple #2
0
Fichier : eng.go Projet : 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))
}
Exemple #3
0
Fichier : eng.go Projet : 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))
}
Exemple #4
0
Fichier : eng.go Projet : 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))
}