Esempio n. 1
0
void LiveScene::relativeContentPath( SceneInterface::Path &path ) const
{
	path.clear();
	
	if ( !m_contentIndex )
	{
		return;
	}
	
	path.reserve( m_path.size() - m_contentIndex );
	path.insert( path.begin(), m_path.begin() + m_contentIndex, m_path.end() );
}
Esempio n. 2
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;
}