100 if (
m_c->animationFrameNumber>=
sequence().getNumFrames()) {
106 SoNode * rootnode =
m_c->viewer->getSceneGraph();
108 VP1Msg::messageDebug(
"AnimationSequencer::nextAnimationFrame WARNING: No scenegraph set. Ignoring.");
111 if ( ! ( rootnode->getTypeId().isDerivedFrom(SoGroup::getClassTypeId())) ) {
112 VP1Msg::messageDebug(
"AnimationSequencer::nextAnimationFrame WARNING: Root node does not derive from SoGroup. Ignoring.");
122 SoCamera * camera =
m_c->viewer->getCamera();
124 VP1Msg::messageDebug(
"AnimationSequencer::nextAnimationFrame WARNING: Could not get camera. Ignoring.");
129 SoGroup * root =
static_cast<SoGroup*
>(rootnode);
131 unsigned int i =
m_c->animationFrameNumber;
138 if (f.time==0.0&&!f.camState.isEmpty())
146 if (f.camState.isEmpty()) {
149 bool notifyenabled = root->enableNotify(
false);
151 camera->getTypeId().isDerivedFrom(SoPerspectiveCamera::getClassTypeId()));
152 camera->unrefNoDelete();
154 SbVec3f lookat=f.dir, upvec = f.upvec;
155 root->insertChild(regionsphere,0);
157 helper =
VP1CameraHelper::animatedZoomToSubTree(camera,root,regionsphere,f.time,f.clipVolPercent,
m_c->last_clipVolPercent,0.1,lookat,upvec,f.variableSpeed,f.forceCircular);
159 root->removeChild(regionsphere);
162 root->enableNotify(
true);
171 if (
m_c->movieEnabled)
172 helper->setOutputImagesMode(
m_c->viewer,
m_c->movieOutdir,
m_c->movieWidth,
m_c->movieHeight,
m_c->movieFPS,
m_c->frameFileNamePrefix);
175 connect(helper,SIGNAL(animationFinishedAbnormally()),
this, SLOT(
abortAnimation()));
180 m_c->last_clipVolPercent = f.clipVolPercent;
183 rootnode->unrefNoDelete();
184 m_c->animationFrameNumber++;
static VP1CameraHelper * animatedZoomToSubTree(SoCamera *camera, SoGroup *sceneroot, SoNode *subtreeroot, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, double slack=1.0, const SbVec3f &lookat=SbVec3f(999, 999, 999), const SbVec3f &upvec=SbVec3f(999, 999, 999), bool varySpeed=true, bool forceCircular=false)
static VP1CameraHelper * animatedZoomToCameraState(SoCamera *camera, SoGroup *sceneroot, const QByteArray &camstate, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, bool varySpeed=true, bool forceCircular=false)