Program: wxMaracas
Module: $RCSfile: CutModelData.cxx,v $
Language: C++
- Date: $Date: 2011/02/07 09:16:29 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2011/02/07 10:30:05 $
+ Version: $Revision: 1.9 $
Copyright: (c) 2002, 2003
License:
=========================================================================*/
#include "CutModelData.h"
-
+#include "vtkRenderWindow.h"
/**
** Start of the manager class
**/
createActor();
createShapes();
ChangeShape(0);
+ interactor->GetRenderWindow ()->Render();
checkInvariant();
}
matrix->SetElement(1,1,(ext[3]-ext[2])/4*spc[1]);
matrix->SetElement(2,2,(ext[5]-ext[4])/4*spc[2]);
- double orgx = (ori[0] + (ext[1]-ext[0])/2)*spc[0];
- double orgy = (ori[1] + (ext[3]-ext[2])/2)*spc[1];
- double orgz = (ori[2] + (ext[5]-ext[4])/2)*spc[2];
+ double orgx = (ext[1]+ext[0])/2.*spc[0];
+ double orgy = (ext[3]+ext[2])/2.*spc[1];
+ double orgz = (ext[5]+ext[4])/2.*spc[2];
matrix->SetElement(0,3,orgx);
matrix->SetElement(1,3,orgy);
copyimage->GetExtent(ext);
- for (xx=ext[0];xx<ext[1]; xx++)
+ for (xx=ext[0];xx<=ext[1]; xx++)
{
- for (yy=ext[2];yy<ext[3]; yy++)
+ for (yy=ext[2];yy<=ext[3]; yy++)
{
- for (zz=ext[4];zz<ext[5];zz++)
+ for (zz=ext[4];zz<=ext[5];zz++)
{
inside=actualCuttingModel->IfPointInside(xx,yy,zz);
if ( ((inside==true)&&(isinside==true)) || ((!inside==true)&&(!isinside)) )
copyimage->GetExtent(ext);
- for (xx=ext[0];xx<ext[1]; xx++)
+ for (xx=ext[0];xx<=ext[1]; xx++)
{
- for (yy=ext[2];yy<ext[3]; yy++)
+ for (yy=ext[2];yy<=ext[3]; yy++)
{
- for (zz=ext[4];zz<ext[5];zz++)
+ for (zz=ext[4];zz<=ext[5];zz++)
{
inside=actualCuttingModel->IfPointInside(xx,yy,zz);
if ( ((inside==true)&&(isinside==true)) || ((!inside==true)&&(!isinside)) )