| 183 | } |
| 184 | |
| 185 | bool GrannyBoneOffset::ApplyToLocal( unsigned joint, Quaternion& rotation, Vector3& position ) const |
| 186 | { |
| 187 | if( const float* const t = m_riggedTransforms[joint] ) |
| 188 | { |
| 189 | Matrix matrix = *reinterpret_cast<const Matrix*>( t ); |
| 190 | Vector3 offsetScale; |
| 191 | Quaternion offsetRotation; |
| 192 | Vector3 offsetPosition; |
| 193 | Decompose( offsetScale, offsetRotation, offsetPosition, matrix ); |
| 194 | |
| 195 | rotation = offsetRotation * rotation; |
| 196 | position = position + offsetPosition; |
| 197 | return true; |
| 198 | } |
| 199 | |
| 200 | return false; |
| 201 | } |
| 202 | |
| 203 | #endif /* GAMEWORLD_64 */ |