示例#1
0
文件: mass.go 项目: krux02/gode
func (m *Mass) SetSphere(density, radius Real) {
	C.dMassSetSphere((*C.dMass)(m), C.dReal(density), C.dReal(radius))
}
示例#2
0
文件: mass.go 项目: bfosberry/ode
// SetSphere sets the mass for a sphere of given properties.
func (m *Mass) SetSphere(density, radius float64) {
	c := &C.dMass{}
	C.dMassSetSphere(c, C.dReal(density), C.dReal(radius))
	m.fromC(c)
}