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

Method draw

samples/FallingGears/src/SceneObjects.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31// ----------------------------------------------------------------------------------------------------
32
33void Gear::draw()
34{
35 if( ! mImageTex )
36 return;
37
38 float pointsPerMeter = SceneController::getPointsPerMeter();
39
40 Rectf imageDest( - mRadius, - mRadius, mRadius, mRadius );
41
42 vec2 pos = vec2( mBody->GetPosition().x, mBody->GetPosition().y ) * pointsPerMeter;
43 float t = mBody->GetAngle();
44
45 gl::ScopedModelMatrix modelScope;
46 gl::translate( pos );
47 gl::rotate( t );
48 gl::draw( mImageTex, imageDest );
49}
50
51// ----------------------------------------------------------------------------------------------------
52// MARK: - Wall

Callers

nothing calls this directly

Calls 15

getWindowHeightFunction · 0.85
grayFunction · 0.85
drawSolidFunction · 0.85
drawSolidRectFunction · 0.85
toCinderFunction · 0.85
translateFunction · 0.50
rotateFunction · 0.50
drawFunction · 0.50
colorFunction · 0.50
GetAngleMethod · 0.45
moveToMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected