示例#1
0
文件: mass.go 项目: krux02/gode
func (m *Mass) Translate(v Vector3) {
	C.dMassTranslate((*C.dMass)(m), C.dReal(v[0]), C.dReal(v[1]), C.dReal(v[2]))
}
示例#2
0
文件: mass.go 项目: bfosberry/ode
// Translate translates the mass by vec.
func (m *Mass) Translate(vec Vector3) {
	c := &C.dMass{}
	m.toC(c)
	C.dMassTranslate(c, C.dReal(vec[0]), C.dReal(vec[1]), C.dReal(vec[2]))
	m.fromC(c)
}