| 68 | } |
| 69 | |
| 70 | void 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 | |
| 104 | CINDER_APP( slerpBasicApp, RendererGl ) |
nothing calls this directly
no test coverage detected