| 107 | } |
| 108 | |
| 109 | void TransformStack::set( const Imath::M44f &matrix ) |
| 110 | { |
| 111 | Samples &samples = m_stack.top(); |
| 112 | if( m_motionIndex >= 0 ) |
| 113 | { |
| 114 | if( m_motionIndex >= (int)samples.size() ) |
| 115 | { |
| 116 | throw Exception( "TransformStack::set() called too many times for motion block" ); |
| 117 | } |
| 118 | samples[m_motionIndex++].matrix = matrix; |
| 119 | } |
| 120 | else |
| 121 | { |
| 122 | for( Samples::iterator it = samples.begin(), eIt = samples.end(); it != eIt; ++it ) |
| 123 | { |
| 124 | it->matrix = matrix; |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | void TransformStack::concatenate( const Imath::M44f &matrix ) |
| 130 | { |