|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include <Inventor/nodes/SoNode.h>
15 #include <Inventor/nodes/SoSphere.h>
16 #include <Inventor/nodes/SoPerspectiveCamera.h>
17 #include <Inventor/nodes/SoGroup.h>
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);
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);
183 rootnode->unrefNoDelete();
203 r = perspective ? 13 : 7;
207 r = perspective ? 35 : 27;
212 r = perspective ? 95 : 73;
VP1ExaminerViewer * viewer
static bool deserializeSoCameraParameters(QByteArray &, SoCamera &)
AnimationSequence animationSequence
void startAnimating(bool skipFirstFrame=false)
void setMovieParameters(QString outdir, QString frameFileNamePrefix, int fps, int width, int height)
virtual SoNode * getSceneGraph()
void animationFinishedSuccessfully()
AnimationSequence & sequence()
double last_clipVolPercent
unsigned int getNumFrames() const
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)
static void messageVerbose(const QString &)
unsigned int animationFrameNumber
void nextAnimationFrame()
SoSphere * getRegionSphere(AnimationSequence::REGION, bool perspective)
static void messageDebug(const QString &)
AnimationSequencer(VP1ExaminerViewer *viewer)
QString frameFileNamePrefix
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)
void clipVolumePercentOfATLAS(double)
const Frame & getFrame(unsigned int i) const