Skip to content

Commit

Permalink
Render the pendulum the right way up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jun 23, 2017
1 parent a948511 commit 0dc63d9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/plugins/simulation/PendulumWindow/src/pendulumwindowwindow.cpp
Expand Up @@ -411,14 +411,26 @@ void PendulumWindowWindow::graphicsInitialized()
{
// Set our 'new' scene viewer's description

mZincWidget->sceneViewer().readDescription(mZincSceneViewerDescription);
OpenCMISS::Zinc::Sceneviewer sceneViewer = mZincWidget->sceneViewer();

sceneViewer.readDescription(mZincSceneViewerDescription);

// Our Zinc widget has had its graphics initialised, so now we can set its
// background colour

double backgroundColor[4] = { 1.0, 1.0, 1.0, 1.0 };

mZincWidget->sceneViewer().setBackgroundColourRGBA(backgroundColor);
sceneViewer.setBackgroundColourRGBA(backgroundColor);

// Our initial look at and eye positions, and up vector

const double lookAtPosition[] = { 5.0, 0.0, 0.0 };
const double eyePosition[] = { 5.0, 0.0, -25.0 };
const double upVector[] = { -1.0, 0.0, 0.0 };

sceneViewer.setLookatPosition(lookAtPosition);
sceneViewer.setEyePosition(eyePosition);
sceneViewer.setUpVector(upVector);
}

//==============================================================================
Expand Down

0 comments on commit 0dc63d9

Please sign in to comment.