p0[1] = 0;
p0[2] = 0;
+
+ bool byNormal=true;
double size=350;
// xy
if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==1) )
{
+ byNormal= false;
p1[0] = size;
p1[1] = 0;
p1[2] = 0;
// xz
if ((bbGetInputNormal()[0]==0) && (bbGetInputNormal()[1]==1) && (bbGetInputNormal()[2]==0) )
{
+ byNormal= false;
p1[0] = size;
p1[1] = 0;
p1[2] = 0;
// yz
if ((bbGetInputNormal()[0]==1) && (bbGetInputNormal()[1]==0) && (bbGetInputNormal()[2]==0) )
{
+ byNormal= false;
p1[0] = 0;
p1[1] = size;
p1[2] = 0;
p2[2] = size;
}
-
-
-/*
- p1[0] = 100;
- p1[1] = 0;
- p1[2] = 0;
- p2[0] = 0;
- p2[1] = 100;
- p2[2] = 0;
-*/
plane->SetResolution( bbGetInputXResolution(), bbGetInputYResolution() );
- plane->SetOrigin( p0 );
- plane->SetPoint1( p1 );
- plane->SetPoint2( p2 );
-// plane->Update( );
- plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
-// plane->Update( );
- plane->SetCenter( c );
+ if (byNormal==false)
+ {
+ plane->SetOrigin( p0 );
+ plane->SetPoint1( p1 );
+ plane->SetPoint2( p2 );
+ } else {
+ plane->SetNormal( bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2] );
+ printf("EED PlaneSource. Missing mechanism to define the size of the plane\n");
+ }
+ plane->SetCenter( c );
+
plane->Update( );
bbSetOutputPlane( (vtkDataSet*)plane );
bbSetOutputPolyData( plane->GetOutput() );