Esempio n. 1
0
File: mass.go Progetto: krux02/gode
func (m *Mass) SetCapsule(density Real, direction int, radius, length Real) {
	C.dMassSetCapsule((*C.dMass)(m), C.dReal(density), C.int(direction), C.dReal(radius), C.dReal(length))
}
Esempio n. 2
0
// SetCapsule sets the mass for a capsule of given properties.
func (m *Mass) SetCapsule(density float64, direction int, radius, length float64) {
	c := &C.dMass{}
	C.dMassSetCapsule(c, C.dReal(density), C.int(direction), C.dReal(radius),
		C.dReal(length))
	m.fromC(c)
}