本文整理汇总了C++中Box3::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ Box3::isEmpty方法的具体用法?C++ Box3::isEmpty怎么用?C++ Box3::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box3
的用法示例。
在下文中一共展示了Box3::isEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderVisual
/******************************************************************************
* Renders the modifier's visual representation and computes its bounding box.
******************************************************************************/
Box3 SliceModifier::renderVisual(TimePoint time, ObjectNode* contextNode, SceneRenderer* renderer)
{
TimeInterval interval;
Box3 bb = contextNode->localBoundingBox(time);
if(bb.isEmpty())
return Box3();
Plane3 plane = slicingPlane(time, interval);
FloatType sliceWidth = 0;
if(_widthCtrl) sliceWidth = _widthCtrl->getFloatValue(time, interval);
ColorA color(0.8f, 0.3f, 0.3f);
if(sliceWidth <= 0) {
return renderPlane(renderer, plane, bb, color);
}
else {
plane.dist += sliceWidth / 2;
Box3 box = renderPlane(renderer, plane, bb, color);
plane.dist -= sliceWidth;
box.addBox(renderPlane(renderer, plane, bb, color));
return box;
}
}
示例2: extendBy
/*
void extendBy(const XfBox3<Type> &bb)
{
}
bool intersect(const Vec3<Type> &pt) const
{
Vec3<Type> p;
m_invertedMatrix.multVecMatrix(pt, p);
return Box3<Type>::intersect(p);
}
bool intersect(const Box3<Type> &bb) const
{
return false;
}
bool intersect (const XfBox3<Type> &bb) const
{
return false;
}
*/
Box3<Type> project () const
{
Box3<Type> box = (Box3<Type>)*this;
if (!box.isEmpty()) box.transform(m_matrix);
return box;
}
示例3: orbitCenter
/******************************************************************************
* Returns the world space point around which the viewport camera orbits.
******************************************************************************/
Point3 ViewportConfiguration::orbitCenter()
{
// Update orbiting center.
if(orbitCenterMode() == ORBIT_SELECTION_CENTER) {
Box3 selectionBoundingBox;
for(SceneNode* node : dataset()->selection()->nodes()) {
selectionBoundingBox.addBox(node->worldBoundingBox(dataset()->animationSettings()->time()));
}
if(!selectionBoundingBox.isEmpty())
return selectionBoundingBox.center();
else {
Box3 sceneBoundingBox = dataset()->sceneRoot()->worldBoundingBox(dataset()->animationSettings()->time());
if(!sceneBoundingBox.isEmpty())
return sceneBoundingBox.center();
}
}
else if(orbitCenterMode() == ORBIT_USER_DEFINED) {
return _userOrbitCenter;
}
return Point3::Origin();
}