本文整理汇总了C++中OP_Node::getBoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ OP_Node::getBoundingBox方法的具体用法?C++ OP_Node::getBoundingBox怎么用?C++ OP_Node::getBoundingBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OP_Node
的用法示例。
在下文中一共展示了OP_Node::getBoundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: context
Imath::Box3d HoudiniScene::readBound( double time ) const
{
OP_Node *node = retrieveNode( true );
Imath::Box3d bounds;
UT_BoundingBox box;
OP_Context context( time );
/// \todo: this doesn't account for SOPs containing multiple shapes
/// if we fix it, we need to fix the condition below as well
if ( node->getBoundingBox( box, context ) )
{
bounds = IECore::convert<Imath::Box3d>( box );
}
// paths embedded within a sop already have bounds accounted for
if ( m_contentIndex )
{
return bounds;
}
NameList children;
childNames( children );
for ( NameList::iterator it=children.begin(); it != children.end(); ++it )
{
ConstSceneInterfacePtr childScene = child( *it );
Imath::Box3d childBound = childScene->readBound( time );
if ( !childBound.isEmpty() )
{
bounds.extendBy( Imath::transform( childBound, childScene->readTransformAsMatrix( time ) ) );
}
}
return bounds;
}