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