本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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;
}