Example #1
0
File: mass.go Project: krux02/gode
func (m *Mass) SetBox(density, lx, ly, lz Real) {
	C.dMassSetBox((*C.dMass)(m), C.dReal(density), C.dReal(lx), C.dReal(ly), C.dReal(lz))
}
Example #2
0
// SetBox sets the mass for a box of given properties.
func (m *Mass) SetBox(density float64, lens Vector3) {
	c := &C.dMass{}
	C.dMassSetBox(c, C.dReal(density),
		C.dReal(lens[0]), C.dReal(lens[1]), C.dReal(lens[2]))
	m.fromC(c)
}