当前位置: 首页>>代码示例>>C++>>正文


C++ ConstCompoundDataPtr::get方法代码示例

本文整理汇总了C++中ConstCompoundDataPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstCompoundDataPtr::get方法的具体用法?C++ ConstCompoundDataPtr::get怎么用?C++ ConstCompoundDataPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConstCompoundDataPtr的用法示例。


在下文中一共展示了ConstCompoundDataPtr::get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: computeObject

IECore::ConstObjectPtr BranchCreator::computeObject( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
	ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
	ScenePath parentPath, branchPath;
	Filter::Result parentMatch = parentAndBranchPaths( mapping.get(), path, parentPath, branchPath );

	if( parentMatch == Filter::AncestorMatch )
	{
		return computeBranchObject( parentPath, branchPath, context );
	}
	else
	{
		return inPlug()->objectPlug()->getValue();
	}
}
开发者ID:cedriclaunay,项目名称:gaffer,代码行数:15,代码来源:BranchCreator.cpp

示例2: hashObject

void BranchCreator::hashObject( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
	ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
	ScenePath parentPath, branchPath;
	Filter::Result parentMatch = parentAndBranchPaths( mapping.get(), path, parentPath, branchPath );

	if( parentMatch == Filter::AncestorMatch )
	{
		hashBranchObject( parentPath, branchPath, context, h );
	}
	else
	{
		h = inPlug()->objectPlug()->hash();
	}
}
开发者ID:cedriclaunay,项目名称:gaffer,代码行数:15,代码来源:BranchCreator.cpp

示例3: computeChildNames

IECore::ConstInternedStringVectorDataPtr BranchCreator::computeChildNames( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
	ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
	ScenePath parentPath, branchPath;
	Filter::Result parentMatch = parentAndBranchPaths( mapping.get(), path, parentPath, branchPath );

	if( parentMatch == Filter::AncestorMatch )
	{
		return computeBranchChildNames( parentPath, branchPath, context );
	}
	else if( parentMatch == Filter::ExactMatch )
	{
		return mapping->member<InternedStringVectorData>( g_childNamesKey );
	}
	else
	{
		return inPlug()->childNamesPlug()->getValue();
	}
}
开发者ID:cedriclaunay,项目名称:gaffer,代码行数:19,代码来源:BranchCreator.cpp

示例4: hashChildNames

void BranchCreator::hashChildNames( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
	ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
	ScenePath parentPath, branchPath;
	Filter::Result parentMatch = parentAndBranchPaths( mapping.get(), path, parentPath, branchPath );

	if( parentMatch == Filter::AncestorMatch )
	{
		hashBranchChildNames( parentPath, branchPath, context, h );
	}
	else if( parentMatch == Filter::ExactMatch )
	{
		h = mapping->member<InternedStringVectorData>( g_childNamesKey )->Object::hash();
	}
	else
	{
		h = inPlug()->childNamesPlug()->hash();
	}
}
开发者ID:cedriclaunay,项目名称:gaffer,代码行数:19,代码来源:BranchCreator.cpp

示例5: computeBranchBound

Imath::Box3f BranchCreator::computeBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
	ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
	ScenePath parentPath, branchPath;
	Filter::Result parentMatch = parentAndBranchPaths( mapping.get(), path, parentPath, branchPath );

	if( parentMatch == Filter::AncestorMatch )
	{
		return computeBranchBound( parentPath, branchPath, context );
	}
	else if( parentMatch == Filter::ExactMatch || parentMatch == Filter::DescendantMatch )
	{
		Box3f result = inPlug()->boundPlug()->getValue();
		result.extendBy( unionOfTransformedChildBounds( path, outPlug() ) );
		return result;
	}
	else
	{
		return inPlug()->boundPlug()->getValue();
	}
}
开发者ID:cedriclaunay,项目名称:gaffer,代码行数:21,代码来源:BranchCreator.cpp

示例6: hashBound

void BranchCreator::hashBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
	ConstCompoundDataPtr mapping = boost::static_pointer_cast<const CompoundData>( mappingPlug()->getValue() );
	ScenePath parentPath, branchPath;
	Filter::Result parentMatch = parentAndBranchPaths( mapping.get(), path, parentPath, branchPath );

	if( parentMatch == Filter::AncestorMatch )
	{
		hashBranchBound( parentPath, branchPath, context, h );
	}
	else if( parentMatch == Filter::ExactMatch || parentMatch == Filter::DescendantMatch )
	{
		SceneProcessor::hashBound( path, context, parent, h );
		inPlug()->boundPlug()->hash( h );
		h.append( hashOfTransformedChildBounds( path, outPlug() ) );
	}
	else
	{
		h = inPlug()->boundPlug()->hash();
	}
}
开发者ID:cedriclaunay,项目名称:gaffer,代码行数:21,代码来源:BranchCreator.cpp

示例7: image

IECoreImage::ImagePrimitivePtr ImagePlug::image() const
{
	Format format = formatPlug()->getValue();
	Box2i dataWindow = dataWindowPlug()->getValue();
	Box2i newDataWindow( Imath::V2i( 0 ) );

	if( !BufferAlgo::empty( dataWindow ) )
	{
		newDataWindow = format.toEXRSpace( dataWindow );
	}
	else
	{
		dataWindow = newDataWindow;
	}

	Box2i newDisplayWindow = format.toEXRSpace( format.getDisplayWindow() );

	IECoreImage::ImagePrimitivePtr result = new IECoreImage::ImagePrimitive( newDataWindow, newDisplayWindow );

	ConstCompoundDataPtr metadata = metadataPlug()->getValue();
	result->blindData()->Object::copyFrom( metadata.get() );

	ConstStringVectorDataPtr channelNamesData = channelNamesPlug()->getValue();
	const vector<string> &channelNames = channelNamesData->readable();

	vector<float *> imageChannelData;
	for( vector<string>::const_iterator it = channelNames.begin(), eIt = channelNames.end(); it!=eIt; it++ )
	{
		FloatVectorDataPtr cd = new FloatVectorData;
		vector<float> &c = cd->writable();
		c.resize( result->channelSize(), 0.0f );
		result->channels[*it] = cd;
		imageChannelData.push_back( &(c[0]) );
	}

	CopyTile copyTile( imageChannelData, channelNames, dataWindow );
	ImageAlgo::parallelProcessTiles( this, channelNames, copyTile, dataWindow );

	return result;
}
开发者ID:ImageEngine,项目名称:gaffer,代码行数:40,代码来源:ImagePlug.cpp


注:本文中的ConstCompoundDataPtr::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。