MCPcopy Create free account
hub / github.com/SpartanJ/eepp / make_ball

Function make_ball

src/examples/physics/physics.cpp:113–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113Shape* make_ball( cpFloat x, cpFloat y ) {
114 Body* body = Body::New( 1.0, INFINITY );
115
116 body->setPos( cVectNew( x, y ) );
117
118 ShapePoint* shape = ShapePoint::New( body, 0.95, cVectZero );
119
120 shape->setDrawRadius( 4 );
121 shape->setElasticity( 0.0 );
122 shape->setFriction( 0.0 );
123
124 return shape;
125}
126
127static int bodyCount = 0;
128

Callers 1

demo1CreateFunction · 0.85

Calls 5

setPosMethod · 0.80
setDrawRadiusMethod · 0.80
NewFunction · 0.50
setElasticityMethod · 0.45
setFrictionMethod · 0.45

Tested by

no test coverage detected