当前位置: 首页>>代码示例>>C++>>正文


C++ Box3::IsEmpty方法代码示例

本文整理汇总了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);
      }

   }
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:51,代码来源:particlemesher.cpp

示例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);

      }
   
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:59,代码来源:particlemesher.cpp

示例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);
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:9,代码来源:simpobj.cpp

示例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;	
	}
开发者ID:2asoft,项目名称:xray,代码行数:10,代码来源:simpobj.cpp

示例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];
		}
	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:22,代码来源:triobj.cpp


注:本文中的Box3::IsEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。