| 1143 | } |
| 1144 | |
| 1145 | virtual void invert (simple_trans_type &t) |
| 1146 | { |
| 1147 | // recompute the array parameters such that every per-instance transformation |
| 1148 | // is inverted. This code is somewhat complex to maintain the splitting between |
| 1149 | // the simple transformation part and the residual given by m_acos and m_mag. |
| 1150 | complex_trans_type r = complex_trans_type (t, m_acos, m_mag).inverted (); |
| 1151 | m_mag = r.mag (); |
| 1152 | m_acos = r.rcos (); |
| 1153 | |
| 1154 | t = simple_trans_type (r); |
| 1155 | this->m_box = box_type (); |
| 1156 | for (typename iterated_array<Coord>::iterator p = this->m_v.begin (); p != this->m_v.end (); ++p) { |
| 1157 | *p = -r (*p); |
| 1158 | this->m_box += point_type () + *p; |
| 1159 | } |
| 1160 | iterated_array<Coord>::sort (); |
| 1161 | } |
| 1162 | |
| 1163 | virtual bool equal (const ArrayBase *b) const |
| 1164 | { |