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

Method draw

samples/slerpBasic/src/slerpBasicApp.cpp:70–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void slerpBasicApp::draw()
71{
72 // clear out the window with black
73 gl::clear( Color( 0, 0, 0 ) );
74 gl::enableAlphaBlending();
75
76 gl::setMatrices( mCam );
77 gl::rotate( mSpinTheWholeWorld );
78
79 // draw the globe
80 gl::enableWireframe();
81 gl::color( ColorA( 1, 1, 0, 0.25f ) );
82 gl::drawSphere( vec3( 0 ), 1, 20 );
83 gl::disableWireframe();
84
85 // draw the path
86 gl::color( Color::white() );
87 drawPathBetweenVectors( mVecA, mVecB );
88
89 const float smallSphereRadius = 0.05f;
90 const int smallSphereSegments = 20;
91 // draw vector A
92 gl::color( ColorA( 1, 0, 0, 1 ) );
93 gl::drawSphere( mVecA, smallSphereRadius, smallSphereSegments );
94
95 // draw vector B
96 gl::color( ColorA( 0, 0, 1, 1 ) );
97 gl::drawSphere( mVecB, smallSphereRadius, smallSphereSegments );
98
99 // draw slerped vector
100 gl::color( ColorA( 0, 1, 1, 1 ) );
101 gl::drawSphere( slerp( mVecA, mVecB, mSlerpAmt ), smallSphereRadius, smallSphereSegments );
102}
103
104CINDER_APP( slerpBasicApp, RendererGl )

Callers

nothing calls this directly

Calls 10

enableAlphaBlendingFunction · 0.85
setMatricesFunction · 0.85
enableWireframeFunction · 0.85
drawSphereFunction · 0.85
disableWireframeFunction · 0.85
whiteFunction · 0.85
clearFunction · 0.50
ColorFunction · 0.50
rotateFunction · 0.50
colorFunction · 0.50

Tested by

no test coverage detected