Ejemplo n.º 1
0
func (s *Space) AddShape(shape *Shape) {
	C.cpSpaceAddShape(s.CPSpace, shape.CPShape)
}
Ejemplo n.º 2
0
// AddShape adds a collision shape to the simulation.
// If the shape is attached to a static body, it will be added as a static shape.
func (s *Space) AddShape(sh Shape) Shape {
	return cpShape(C.cpSpaceAddShape(s.c(), sh.c()))
}
Ejemplo n.º 3
0
func (s *Space) AddShape(shape Shape) Shape {
	return Shape{
		C.cpSpaceAddShape(s.s, shape.shape)}
}