本文整理汇总了C++中Box3::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ Box3::IsEmpty方法的具体用法?C++ Box3::IsEmpty怎么用?C++ Box3::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box3
的用法示例。
在下文中一共展示了Box3::IsEmpty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetWorldBoundBox
/*
void ParticleMesherObject::GetWorldBoundBox(TimeValue t, INode * inode, ViewExp* vp, Box3& box )
{
box.Init();
Matrix3 mat = inode->GetObjectTM(t);
Point3 a(-10.0f,-10.0f,-10.0f);
Point3 b(10.0f,10.0f,10.0f);
a = a * mat;
b = b * mat;
box+= a;
box+= b;
}
void ParticleMesherObject::GetLocalBoundBox(TimeValue t, INode* inode, ViewExp* vp, Box3& box )
{
box.Init();
Point3 a(-10.0f,-10.0f,-10.0f);
Point3 b(10.0f,10.0f,10.0f);
box+= a;
box+= b;
}
*/
void ParticleMesherObject::GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm, BOOL useSel )
{
BOOL useBounds;
pblock2->GetValue(particlemesher_usecustombounds, 0, useBounds, FOREVER);
if (useBounds)
{
box.Init();
Point3 a(-10.0f,-10.0f,-10.0f);
Point3 b(10.0f,10.0f,10.0f);
pblock2->GetValue(particlemesher_customboundsa, 0, a, FOREVER);
pblock2->GetValue(particlemesher_customboundsb, 0, b, FOREVER);
if (tm)
{
a = a * *tm;
b = b * *tm;
}
box+= a;
box+= b;
if (box.IsEmpty())
SimpleObject2::GetDeformBBox(t,box,tm,useSel);
}
else
{
SimpleObject2::GetDeformBBox(t,box,tm,useSel);
}
}
示例2: UpdateUI
void ParticleMesherObject::UpdateUI()
{
Point3 min,max;
pblock2->GetValue(particlemesher_customboundsa,0,min,FOREVER);
pblock2->GetValue(particlemesher_customboundsb,0,max,FOREVER);
Box3 box;
box.Init();
box += min;
box += max;
TSTR text;
BOOL useBounds;
pblock2->GetValue(particlemesher_usecustombounds, 0, useBounds, FOREVER);
if (useBounds)
{
if (box.IsEmpty())
text.printf(_T("%s"),GetString(IDS_EMPTY));
else
{
text.printf(_T("(%0.0f,%0.0f,%0.0f)"),min.x,min.y,min.z);
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT),
text);
text.printf(_T("(%0.0f,%0.0f,%0.0f)"),max.x,max.y,max.z);
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT2),
text);
}
//make sure we only enable the button in the modify panel
// bug 257747 1/30/01 watje
if (ip)
{
ICustButton *iBut = GetICustButton(GetDlgItem(hParams,IDC_PICKBB));
if (ip->GetCommandPanelTaskMode()==TASK_MODE_MODIFY)
{
if (iBut) iBut->Enable(TRUE);
}
ReleaseICustButton(iBut);
}
}
else
{
text.printf(_T(" "));
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT),
text);
text.printf(_T(" "));
SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT2),
text);
ICustButton *iBut = GetICustButton(GetDlgItem(hParams,IDC_PICKBB));
if (iBut) iBut->Enable(FALSE);
ReleaseICustButton(iBut);
}
}
示例3: GetLocalBoundBox
void SimpleParticle::GetLocalBoundBox(TimeValue t, INode *inode,ViewExp* /*vpt*/, Box3& box )
{
Matrix3 mat = inode->GetObjTMBeforeWSM(t);
Box3 pbox;
Update(t,inode);
box = mesh.getBoundingBox();
pbox = parts.BoundBox();
if (!pbox.IsEmpty()) box += pbox * Inverse(mat);
}
示例4: GetWorldBoundBox
void SimpleParticle::GetWorldBoundBox(TimeValue t, INode *inode, ViewExp* vpt, Box3& box )
{
Box3 pbox;
Matrix3 mat = inode->GetObjTMBeforeWSM(t);
UpdateMesh(t);
box = mesh.getBoundingBox();
box = box * mat;
pbox = parts.BoundBox();
if (!pbox.IsEmpty()) box += pbox;
}
示例5: GetWorldBoundBox
void TriObject::GetWorldBoundBox(TimeValue t, INode *inode, ViewExp* vpt, Box3& box )
{
if ( ! vpt || ! vpt->IsAlive() )
{
box.Init();
return;
}
Box3 meshBox;
Matrix3 mat = inode->GetObjectTM(t);
GetLocalBoundBox(t,inode,vpt,meshBox);
if(meshBox.IsEmpty())
box = meshBox;
else {
box.Init();
for(int i = 0; i < 8; i++)
box += mat * meshBox[i];
}
}