示例#1
0
文件: mass.go 项目: 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))
}
示例#2
0
文件: mass.go 项目: bfosberry/ode
// 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)
}