Example #1
0
File: mass.go Project: 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))
}
Example #2
0
// 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)
}