本文整理汇总了C++中osg::BoundingBox::set方法的典型用法代码示例。如果您正苦于以下问题:C++ BoundingBox::set方法的具体用法?C++ BoundingBox::set怎么用?C++ BoundingBox::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::BoundingBox
的用法示例。
在下文中一共展示了BoundingBox::set方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getExtents
void TXPArchive::getExtents(osg::BoundingBox& extents)
{
TileInfo sw, ne;
trpg2iPoint tileExtents;
this->GetHeader()->GetLodSize(0, tileExtents);
this->getTileInfo(0, 0, 0, sw);
this->getTileInfo(tileExtents.x-1, tileExtents.y-1, 0, ne);
extents.set(sw.bbox._min, sw.bbox._max);
extents.expandBy(ne.bbox);
}
示例2: ComputeBoundingBoxByRotation
void ComputeBoundingBoxByRotation(osg::BoundingBox & InOut,osg::Vec3 BBCenter,float BBSize,osg::Matrixd Rotation)
{
osg::BoundingBox bb;
bb.set(BBCenter.x()-BBSize,BBCenter.y()-BBSize,BBCenter.z()-BBSize,BBCenter.x()+BBSize,BBCenter.y()+BBSize,BBCenter.z()+BBSize);
osg::BoundingBox Tbb;
for(unsigned int i=0;i<8;i++)
{
Tbb.expandBy(Rotation.preMult(bb.corner(i)));
}
InOut.set(Tbb.xMin(),Tbb.yMin(),Tbb.zMin(),Tbb.xMax(),Tbb.yMax(),Tbb.zMax());
}
示例3: GetBoundingBox
bool GetBoundingBox(osg::BoundingBox & BB, dtCore::DeltaDrawable & drawable)
{
osg::Node* node = drawable.GetOSGNode();
if (node != 0)
{
dtUtil::BoundingBoxVisitor bbv;
node->accept(bbv);
// no copy constructor for osg::BB...
BB.set(bbv.mBoundingBox._min, bbv.mBoundingBox._max);
return true;
}
LOG_WARNING("No valid osg node of drawable when asking for bounding box.");
return false;
}