ATLAS Offline Software
AnimationSequence.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef VP1BASE_ANIMATIONSEQUENCE_H
6 #define VP1BASE_ANIMATIONSEQUENCE_H
7 #include <vector>
8 //_________________class AnimationSequence and AnimationSequence::Frame________
9 //
10 // These classes allow you to specify a time sequence of camera postions and
11 // orientations.
12 //
13 // Joe Boudreau May 2008
14 //
15 //_____________________________________________________________________________
16 #include <Inventor/C/errors/debugerror.h>
17 #include <Inventor/SbLinear.h>
18 
19 #include <QByteArray>
20 
22 
23  public:
24 
25  // Region definitions:
27 
28  // A frame class:
29  class Frame {
30  public:
31  Frame(const REGION &r, const SbVec3f &d, const SbVec3f & u, const double& t,bool vs, bool fc, double c)
33  Frame(QByteArray cs, const double& t,bool vs,bool fc, double c)
35  camState(cs), reg(VERTEX),dir(SbVec3f(0,0,0)),upvec(SbVec3f(0,0,0)){}
36 
37  double time; // time
38  double clipVolPercent; // Percentage of ATLAS Vol used as clipping volume.
41 
42  //If camstate is not empty, (reg,dir,upvec) defines the frame. Otherwise those three are ignored.
43  QByteArray camState;
44  REGION reg; // region
45  SbVec3f dir; // direction
46  SbVec3f upvec; // direction
47 
48  };
49 
50  void clearAllFrames() { m_sequence.clear(); }
51 
52  // Add a frame:
53  void addFrame(REGION reg, const SbVec3f & dir, const SbVec3f & upvec, double t,
54  bool variableSpeed = false, bool forceCircular = false, double clip=100.0 ) {
55  m_sequence.push_back(Frame(reg, dir, upvec, t, variableSpeed, forceCircular, clip));
56  }
57  void addFrame(REGION reg, const SbVec3f & dir, double t,
58  bool variableSpeed = false, bool forceCircular = false, double clip=100.0 ) {//default upvec along y-axis
59  m_sequence.push_back(Frame(reg, dir, SbVec3f(0,1,0), t, variableSpeed, forceCircular, clip));
60  }
61  void addFrame(const QByteArray& camState, double t,
62  bool variableSpeed = true, bool forceCircular = false, double clip=100.0 ) {//default upvec along y-axis
63  m_sequence.push_back(Frame(camState, t, variableSpeed, forceCircular, clip));
64  }
65 
66  // Get number of frames;
67  unsigned int getNumFrames() const { return m_sequence.size();}
68 
69  // Get a frame:
70  const Frame & getFrame(unsigned int i) const { return m_sequence.at(i);}
71 
72  private:
73 
74  // Storage for frames:
75  std::vector<Frame> m_sequence;
76 
77 };
78 
79 
80 #endif
AnimationSequence::addFrame
void addFrame(REGION reg, const SbVec3f &dir, double t, bool variableSpeed=false, bool forceCircular=false, double clip=100.0)
Definition: AnimationSequence.h:57
beamspotman.r
def r
Definition: beamspotman.py:676
AnimationSequence::Frame::dir
SbVec3f dir
Definition: AnimationSequence.h:45
AnimationSequence::INDET
@ INDET
Definition: AnimationSequence.h:26
hist_file_dump.d
d
Definition: hist_file_dump.py:137
AnimationSequence::Frame::reg
REGION reg
Definition: AnimationSequence.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AnimationSequence::addFrame
void addFrame(const QByteArray &camState, double t, bool variableSpeed=true, bool forceCircular=false, double clip=100.0)
Definition: AnimationSequence.h:61
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
AnimationSequence::Frame::Frame
Frame(const REGION &r, const SbVec3f &d, const SbVec3f &u, const double &t, bool vs, bool fc, double c)
Definition: AnimationSequence.h:31
AnimationSequence::Frame::forceCircular
bool forceCircular
Definition: AnimationSequence.h:40
AnimationSequence::m_sequence
std::vector< Frame > m_sequence
Definition: AnimationSequence.h:75
lumiFormat.i
int i
Definition: lumiFormat.py:85
AnimationSequence::Frame::time
double time
Definition: AnimationSequence.h:37
AnimationSequence::addFrame
void addFrame(REGION reg, const SbVec3f &dir, const SbVec3f &upvec, double t, bool variableSpeed=false, bool forceCircular=false, double clip=100.0)
Definition: AnimationSequence.h:53
beamspotman.dir
string dir
Definition: beamspotman.py:623
AnimationSequence::getNumFrames
unsigned int getNumFrames() const
Definition: AnimationSequence.h:67
AnimationSequence::Frame::variableSpeed
bool variableSpeed
Definition: AnimationSequence.h:39
AnimationSequence::Frame
Definition: AnimationSequence.h:29
AnimationSequence::VERTEX
@ VERTEX
Definition: AnimationSequence.h:26
AnimationSequence::Frame::upvec
SbVec3f upvec
Definition: AnimationSequence.h:46
AnimationSequence::Frame::camState
QByteArray camState
Definition: AnimationSequence.h:43
AnimationSequence::clearAllFrames
void clearAllFrames()
Definition: AnimationSequence.h:50
AnimationSequence::REGION
REGION
Definition: AnimationSequence.h:26
AnimationSequence::CALO
@ CALO
Definition: AnimationSequence.h:26
Trk::Frame
@ Frame
Definition: TargetSurfaces.h:49
AnimationSequence
Definition: AnimationSequence.h:21
AnimationSequence::Frame::clipVolPercent
double clipVolPercent
Definition: AnimationSequence.h:38
python.compressB64.c
def c
Definition: compressB64.py:93
AnimationSequence::getFrame
const Frame & getFrame(unsigned int i) const
Definition: AnimationSequence.h:70
AnimationSequence::Frame::Frame
Frame(QByteArray cs, const double &t, bool vs, bool fc, double c)
Definition: AnimationSequence.h:33