void BendManip::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) { Matrix3 mat = inode->GetObjectTM(t); GetLocalBoundBox(t, inode, vpt, box); box = box * mat; }
void WindObject::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) { if ( ! vpt || ! vpt->IsAlive() ) { box.Init(); return; } Box3 meshBox; Matrix3 mat = inode->GetObjectTM(t); box.Init(); int hoopson; pblock2->GetValue(PB_HOOPSON,t,hoopson,FOREVER); if (hoopson) { float decay; pblock2->GetValue(PB_DECAY,t,decay,FOREVER); if (decay>0.0f) { float range,xy; range=2.0f*(decay > 0.0f?0.6931472f / decay:0.0f); int type;pblock2->GetValue(PB_TYPE,t,type,ivalid); if (type==FORCE_PLANAR) { pblock2->GetValue(PB_DISPLENGTH,t,xy,FOREVER); xy*=3.0f; } else xy=range; Box3 rangeBox(Point3(-xy,-xy,-range),Point3(xy,xy,range)); for(int i = 0; i < 8; i++) box += mat * rangeBox[i]; } } GetLocalBoundBox(t,inode,vpt,meshBox); for(int i = 0; i < 8; i++) box += mat * meshBox[i]; }
void PointHelpObject::GetWorldBoundBox( TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) { if ( ! vpt || ! vpt->IsAlive() ) { box.Init(); return; } Matrix3 tm; tm = inode->GetObjectTM(t); Box3 lbox; GetLocalBoundBox(t, inode, vpt, lbox); box = Box3(tm.GetTrans(), tm.GetTrans()); for (int i=0; i<8; i++) { box += lbox * tm; } /* if(!(extDispFlags & EXT_DISP_ZOOM_EXT) && showAxis) box = GetAxisBox(vpt,tm,showAxis?axisLength:0.0f, FALSE); else box = Box3(tm.GetTrans(), tm.GetTrans()); */ }
void TriPatchObject::GetWorldBoundBox(TimeValue t, INode *inode, ViewExp* vpt, Box3& box ) { Box3 patchBox; Matrix3 mat = inode->GetObjectTM(t); GetLocalBoundBox(t,inode,vpt,patchBox); box.Init(); for(int i = 0; i < 8; i++) box += mat * patchBox[i]; }
void Cal3DObject::GetWorldBoundBox(TimeValue t, INode *inode, ViewExp *vpt, Box3 &box) { Matrix3 tm; GetMat(t, inode, vpt, tm); GetLocalBoundBox(t, inode, vpt, box); int nv = mesh.getNumVerts(); box = box * tm; }
void BendManip::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) { if ( ! vpt || ! vpt->IsAlive() ) { box.Init(); return; } Matrix3 mat = inode->GetObjectTM(t); GetLocalBoundBox(t, inode, vpt, box); box = box * mat; }
void PBombObject::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) { Box3 meshBox; Matrix3 mat = inode->GetObjectTM(t); box.Init(); int hoopson,dorange; pblock->GetValue(PB_RANGEON,t,hoopson,FOREVER); pblock->GetValue(PB_DECAYTYPE,0,dorange,FOREVER); if ((hoopson)&&(dorange)) { float decay; pblock->GetValue(PB_DECAY,t,decay,FOREVER); if (decay>0.0f) { float range; range=2.0f*decay; Box3 rangeBox(Point3(-range,-range,-range),Point3(range,range,range)); for(int i = 0; i < 8; i++) box += mat * rangeBox[i]; } } GetLocalBoundBox(t,inode,vpt,meshBox); for(int i = 0; i < 8; i++) box += mat * meshBox[i]; }
void BombObject::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp* vpt, Box3& box ) { if ( ! vpt || ! vpt->IsAlive() ) { box.Init(); return; } Box3 meshBox; Matrix3 mat = inode->GetObjectTM(t); box.Init(); if (hParam && GetWindowLongPtr(hParam,GWLP_USERDATA)==(LONG_PTR)this && GetFalloffOn(t)) { BoxLineProc bproc(&mat); DrawFalloffSphere(GetFalloff(t),bproc); box = bproc.Box(); } GetLocalBoundBox(t,inode,vpt,meshBox); for(int i = 0; i < 8; i++) box += mat * meshBox[i]; }
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]; } }
void BendManip::GetDeformBBox(TimeValue t, Box3& box, Matrix3 *tm, BOOL useSel) { GetLocalBoundBox(t, NULL, NULL, box); }