示例#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)}
}