本文整理汇总了C++中nlmisc::CAABBox::setHalfSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CAABBox::setHalfSize方法的具体用法?C++ CAABBox::setHalfSize怎么用?C++ CAABBox::setHalfSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nlmisc::CAABBox
的用法示例。
在下文中一共展示了CAABBox::setHalfSize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSelectBox
// *********************************************************************************************************
NLMISC::CAABBox CDisplayerVisualEntity::getSelectBox() const
{
//H_AUTO(R2_NLMISC_CAABBox )
if (!_Entity)
{
if (_PlaceHolder)
{
return _PlaceHolder->getSelectBox();
}
return CDisplayerVisual::getSelectBox();
}
if (getSelectionType() == ISelectableObject::LocalSelectBox ||
getSelectionType() == ISelectableObject::GroundProjected
)
{
if (_Entity->isAsyncLoading())
{
NLMISC::CAABBox result;
result.setCenter(CVector::Null);
result.setHalfSize(CVector::Null);
return result;
}
return getEditor().getLocalSelectBox(*_Entity);
}
else
{
return getEditor().getSelectBox(*_Entity);
}
}
示例2: decBbox
void CParticleSystemPage::decBbox()
{
NLMISC::CAABBox b;
_Node->getPSPointer()->computeBBox(b);
b.setHalfSize(0.9f * b.getHalfSize());
_Node->getPSPointer()->setPrecomputedBBox(b);
updatePrecomputedBBoxParams();
}
示例3: setZBbox
void CParticleSystemPage::setZBbox(double value)
{
NLMISC::CAABBox b;
_Node->getPSPointer()->computeBBox(b);
NLMISC::CVector h;
h.x = b.getHalfSize().x;
h.y = b.getHalfSize().y;
h.z = value;
b.setHalfSize(h);
_Node->getPSPointer()->setPrecomputedBBox(b);
}
示例4:
///===========================================================================
void CParticleSystemShape::getAABBox(NLMISC::CAABBox &bbox) const
{
if (!_UsePrecomputedBBox)
{
bbox.setCenter(NLMISC::CVector::Null);
bbox.setHalfSize(NLMISC::CVector(1, 1, 1));
}
else
{
bbox = _PrecomputedBBox;
}
}
示例5:
// ***************************************************************************
void CTransformShape::getAABBox(NLMISC::CAABBox &bbox) const
{
if(Shape)
{
Shape->getAABBox(bbox);
}
else
{
bbox.setCenter(CVector::Null);
bbox.setHalfSize(CVector::Null);
}
}
示例6: main
//.........这里部分代码省略.........
// Progress
progress ("Build bounding boxes", (float)(x+y*lastX)/(float)(lastX*lastY));
// Make a zone file name
string zoneName;
getZoneNameByCoord (x, y, zoneName);
// Open the file
CIFile file;
if (file.open (dir+zoneName+ext))
{
// The zone
CZone zone;
try
{
// Serial the zone
file.serial (zone);
/// get bbox from the ig of this zone
CLightingBBox igBBox;
if (computeDependenciesWithIgs)
{
computeZoneIGBBox(zoneName.c_str(), igBBox, shapeMap, villagesBBox);
}
// Create a zone descriptor
NLMISC::CAABBox zoneBox;
zoneBox.setCenter(zone.getZoneBB().getCenter());
zoneBox.setHalfSize(zone.getZoneBB().getHalfSize());
CLightingBBox zoneLBox;
zoneLBox.OccludingBox = zoneLBox.ReceivingBox = zoneBox; // can't be void
zoneLBox.makeUnion(igBBox);
nlassert(!zoneLBox.ReceivingBox.IsVoid);
//
CZoneDescriptorBB zoneDesc;
zoneDesc.X=x;
zoneDesc.Y=y;
zoneDesc.BBox=zoneLBox.ReceivingBox.Box;
//
if (!zoneLBox.OccludingBox.IsVoid)
{
quadGrid.insert (zoneLBox.ReceivingBox.Box.getMin(), zoneLBox.ReceivingBox.Box.getMax(), zoneDesc);
}
// Insert in the dependencies
// Index
uint index=(x-firstX)+(y-firstY)*(lastX-firstX+1);
// Loaded
dependencies[index].Loaded=true;
dependencies[index].X=x;
dependencies[index].Y=y;
dependencies[index].BBox=zoneLBox.OccludingBox.Box;
// ZMin
float newZ=zoneLBox.ReceivingBox.Box.getMin().z;
if (newZ<minZ)
minZ=newZ;
}
示例7:
//***************************************************************************************************************
void CFlareShape::getAABBox(NLMISC::CAABBox &bbox) const
{
// the flare himself is a point
bbox.setCenter(CVector::Null);
bbox.setHalfSize(CVector::Null);
}
示例8:
//============================================
void CWaveMakerShape::getAABBox(NLMISC::CAABBox &bbox) const
{
// its just a point
bbox.setCenter(NLMISC::CVector::Null);
bbox.setHalfSize(NLMISC::CVector::Null);
}