Esempio n. 1
0
Imath::M44d SceneCacheNode<BaseType>::worldTransform( const std::string &fileName, const std::string &path, double time )
{
	ConstSceneInterfacePtr scene = this->scene( fileName, SceneInterface::rootName );
	
	SceneInterface::Path p;
	SceneInterface::stringToPath( path, p );
	Imath::M44d result = scene->readTransformAsMatrix( time );
	for ( SceneInterface::Path::const_iterator it = p.begin(); scene && it != p.end(); ++it )
	{
		scene = scene->child( *it, SceneInterface::NullIfMissing );
		if ( !scene )
		{
			break;
		}
		
		result = scene->readTransformAsMatrix( time ) * result;
	}
	
	return result;
}