Example #1
0
func (s *Space) AddShape(shape *Shape) {
	C.cpSpaceAddShape(s.CPSpace, shape.CPShape)
}
Example #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()))
}
Example #3
0
func (s *Space) AddShape(shape Shape) Shape {
	return Shape{
		C.cpSpaceAddShape(s.s, shape.shape)}
}