예제 #1
0
func (s *Space) AddShape(shape *Shape) {
	C.cpSpaceAddShape(s.CPSpace, shape.CPShape)
}
예제 #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()))
}
예제 #3
0
파일: chipmunk.go 프로젝트: andrebq/exp
func (s *Space) AddShape(shape Shape) Shape {
	return Shape{
		C.cpSpaceAddShape(s.s, shape.shape)}
}