00001 /*************************************************************************** 00002 seqrotmatrixvector.h - description 00003 ------------------- 00004 begin : Wed Jul 30 2003 00005 copyright : (C) 2003 by Thies H. Jochimsen and Michael v. Mengershausen 00006 email : jochimse@cns.mpg.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef SEQROTMATRIXVECTOR_H 00019 #define SEQROTMATRIXVECTOR_H 00020 00021 #include <odinseq/seqvec.h> 00022 00023 class SeqGradChanList; // forward declaration 00024 00034 class SeqRotMatrixVector : public SeqVector, public Handled<const SeqRotMatrixVector* > { 00035 00036 public: 00040 SeqRotMatrixVector(const STD_string& object_label = "unnamedSeqRotMatrixVector"); 00041 00045 SeqRotMatrixVector(const SeqRotMatrixVector& srmv); 00046 00047 00051 ~SeqRotMatrixVector(); 00052 00056 SeqRotMatrixVector& operator = (const SeqRotMatrixVector& srmv); 00057 00061 const RotMatrix& operator [] (unsigned long index) const; 00062 00066 const RotMatrix& get_current_matrix () const; 00067 00073 SeqRotMatrixVector& create_inplane_rotation(unsigned int nsegments); 00074 00078 SeqRotMatrixVector& clear() { 00079 rotMatrixList.clear(); 00080 return *this; 00081 }; 00082 00083 00087 SeqRotMatrixVector& append(const RotMatrix& srm) { 00088 // srm.check_and_correct(); 00089 rotMatrixList.push_back(srm); 00090 return *this; 00091 }; 00092 00093 00097 RotMatrix get_maxMatrix () const; 00098 00099 00100 00101 // implemented virtual from SeqVector 00102 unsigned int get_vectorsize() const {return rotMatrixList.size();}; 00103 bool needs_unrolling_check() const {return get_vectorsize()>1;} 00104 bool is_qualvector() const {return false;} 00105 bool prep_iteration() const; 00106 svector get_vector_commands(const STD_string& iterator) const {iterator_cache=iterator; return svector();} 00107 00108 // return stored iterator, quick hack for EPIC rotmats 00109 const STD_string& get_iterator() const {return iterator_cache;} 00110 00111 private: 00112 friend class SeqGradChan; 00113 00114 mutable STD_string iterator_cache; 00115 00116 STD_list<RotMatrix> rotMatrixList; 00117 RotMatrix dummyrotmat; 00118 00119 }; 00120 00121 #endif
1.5.6