Exemple #1
0
void MirrorMod::GetWorldBoundBox(
		TimeValue t,INode* inode, ViewExp *vpt, 
		Box3& box, ModContext *mc)
	{	
	GraphicsWindow *gw = vpt->getGW();
	Matrix3 tm = CompMatrix(t,inode,mc);
	BoxLineProc bproc(&tm);
	DrawGizmo(
		vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,bproc);
	box = bproc.Box();	
	}
Exemple #2
0
void SymmetryMod::GetWorldBoundBox (TimeValue t,INode* inode, ViewExp *vpt, Box3& box, ModContext *mc) {	

	if ( ! vpt || ! vpt->IsAlive() )
	{
		box.Init();
		return;
	}

	GraphicsWindow *gw = vpt->getGW();
	Matrix3 tm = CompMatrix(t,inode,mc);
	BoxLineProc bproc(&tm);
	DrawGizmo (vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE, bproc);
	box = bproc.Box();
}
Exemple #3
0
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];
}