本文整理汇总了C++中scenenode::ScenePath::size方法的典型用法代码示例。如果您正苦于以下问题:C++ ScenePath::size方法的具体用法?C++ ScenePath::size怎么用?C++ ScenePath::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scenenode::ScenePath
的用法示例。
在下文中一共展示了ScenePath::size方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hashChildNames
void Grid::hashChildNames( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
SceneNode::hashChildNames( path, context, parent, h );
h.append( (uint64_t)path.size() );
if( path.size() == 0 )
{
namePlug()->hash( h );
}
}
示例2: hashObject
void Grid::hashObject( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
if( path.size() == 2 )
{
SceneNode::hashObject( path, context, parent, h );
h.append( path.back() );
dimensionsPlug()->hash( h );
if( path.back() == g_gridLinesName )
{
spacingPlug()->hash( h );
gridColorPlug()->hash( h );
}
else if( path.back() == g_centerLinesName )
{
centerColorPlug()->hash( h );
}
else if( path.back() == g_borderLinesName )
{
borderColorPlug()->hash( h );
}
}
else
{
h = outPlug()->objectPlug()->defaultValue()->hash();
}
}
示例3: if
Imath::Box3f ObjectSource::computeBound( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
Imath::Box3f result;
IECore::ConstObjectPtr object = sourcePlug()->getValue();
if( const IECore::VisibleRenderable *renderable = IECore::runTimeCast<const IECore::VisibleRenderable>( object.get() ) )
{
result = renderable->bound();
}
else if( object->isInstanceOf( IECore::Camera::staticTypeId() ) )
{
result = Imath::Box3f( Imath::V3f( -0.5, -0.5, 0 ), Imath::V3f( 0.5, 0.5, 2.0 ) );
}
else if( object->isInstanceOf( IECore::CoordinateSystem::staticTypeId() ) )
{
result = Imath::Box3f( Imath::V3f( 0 ), Imath::V3f( 1 ) );
}
else
{
result = Imath::Box3f( Imath::V3f( -0.5 ), Imath::V3f( 0.5 ) );
}
if( path.size() == 0 )
{
result = Imath::transform( result, transformPlug()->matrix() );
}
return result;
}
示例4: transformPlug
Imath::M44f ObjectSource::computeTransform( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
if( path.size() == 1 )
{
return transformPlug()->matrix();
}
return Imath::M44f();
}
示例5: hashTransform
void ObjectSource::hashTransform( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
SceneNode::hashTransform( path, context, parent, h );
if( path.size() == 1 )
{
transformPlug()->hash( h );
}
}
示例6: hashBound
void Light::hashBound( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
SceneNode::hashBound( path, context, parent, h );
if( path.size() == 0 )
{
transformPlug()->hash( h );
}
}
示例7: transformPlug
Imath::M44f Grid::computeTransform( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
if( path.size() == 1 )
{
return transformPlug()->matrix();
}
return outPlug()->transformPlug()->defaultValue();
}
示例8: transformPlug
Imath::Box3f Light::computeBound( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
Imath::Box3f result = Imath::Box3f( Imath::V3f( -.5 ), Imath::V3f( .5 ) );
if( path.size() == 0 )
{
result = Imath::transform( result, transformPlug()->matrix() );
}
return result;
}
示例9: computeObject
IECore::ConstObjectPtr ObjectSource::computeObject( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
if( path.size() != 1 )
{
return parent->objectPlug()->defaultValue();
}
return sourcePlug()->getValue();
}
示例10: hashChildNames
void ObjectSource::hashChildNames( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
if( path.size() == 0 )
{
SceneNode::hashChildNames( path, context, parent, h );
namePlug()->hash( h );
return;
}
h = parent->childNamesPlug()->defaultValue()->Object::hash();
}
示例11: sourcePlug
Imath::Box3f ObjectSource::computeBound( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
IECore::ConstObjectPtr object = sourcePlug()->getValue();
Imath::Box3f result = bound( object.get() );
if( path.size() == 0 )
{
result = Imath::transform( result, transformPlug()->matrix() );
}
return result;
}
示例12: hashObject
void ObjectSource::hashObject( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
if( path.size() != 1 )
{
h = parent->objectPlug()->defaultValue()->hash();
return;
}
SceneNode::hashObject( path, context, parent, h );
sourcePlug()->hash( h );
}
示例13: computeChildNames
IECore::ConstInternedStringVectorDataPtr Grid::computeChildNames( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
if( path.size() <= 1 )
{
InternedStringVectorDataPtr resultData = new InternedStringVectorData;
std::vector<InternedString> &result = resultData->writable();
if( path.size() == 0 )
{
result.push_back( namePlug()->getValue() );
}
else
{
result.push_back( g_gridLinesName );
result.push_back( g_centerLinesName );
result.push_back( g_borderLinesName );
}
return resultData;
}
return outPlug()->childNamesPlug()->defaultValue();
}
示例14: hashBound
void Grid::hashBound( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const
{
if( path.size() == 0 )
{
h = hashOfTransformedChildBounds( path, parent );
}
else
{
Source::hashBound( path, context, parent, h );
dimensionsPlug()->hash( h );
}
}
示例15: unionOfTransformedChildBounds
Imath::Box3f Grid::computeBound( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const
{
if( path.size() == 0 )
{
return unionOfTransformedChildBounds( path, parent );
}
else
{
const V2f halfDimensions = dimensionsPlug()->getValue() / 2.0f;
const V3f d( halfDimensions.x, halfDimensions.y, 0 );
return Box3f( -d, d );
}
}