MCPcopy Create free account
hub / github.com/cinder/Cinder / DrawPolygon

Method DrawPolygon

samples/FallingGears/src/Box2dUtils.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void DebugDraw::DrawPolygon( const b2Vec2 *vertices, int32 vertexCount, const b2Color &color )
41{
42 gl::color( toCinder( color ) );
43
44 Path2d path;
45 path.moveTo( toCinder( vertices[0] ) );
46 for( size_t i = 1; i < vertexCount; i++ )
47 path.lineTo( toCinder( vertices[i] ) );
48
49 gl::draw( path );
50}
51
52void DebugDraw::DrawSolidPolygon( const b2Vec2 *vertices, int32 vertexCount, const b2Color &color )
53{

Callers 1

DrawDebugDataMethod · 0.80

Calls 5

toCinderFunction · 0.85
colorFunction · 0.50
drawFunction · 0.50
moveToMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected