| 127 | } |
| 128 | |
| 129 | void TransformStack::concatenate( const Imath::M44f &matrix ) |
| 130 | { |
| 131 | Samples &samples = m_stack.top(); |
| 132 | if( m_motionIndex >= 0 ) |
| 133 | { |
| 134 | if( m_motionIndex >= (int)samples.size() ) |
| 135 | { |
| 136 | throw Exception( "TransformStack::concatenate() called too many times for motion block" ); |
| 137 | } |
| 138 | samples[m_motionIndex].matrix = matrix * samples[m_motionIndex].matrix; |
| 139 | m_motionIndex++; |
| 140 | } |
| 141 | else |
| 142 | { |
| 143 | for( Samples::iterator it = samples.begin(), eIt = samples.end(); it != eIt; ++it ) |
| 144 | { |
| 145 | it->matrix = matrix * it->matrix; |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | Imath::M44f TransformStack::get() const |
| 151 | { |