// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- if ((bbGetInputPoint().size()==3) && (bbGetInputDirectionInPoint().size()==3) )
- {
- double point[3] , newPoint[3];
- point[0] = bbGetInputPoint()[0];
- point[1] = bbGetInputPoint()[1];
- point[2] = bbGetInputPoint()[2];
- bbGetInputTransform()->TransformPoint( point,newPoint );
- std::vector<double> out;
- out.push_back( newPoint[0] );
- out.push_back( newPoint[1] );
- out.push_back( newPoint[2] );
- bbSetOutputOut( out );
-
- double pointDir[3] , newPointDir[3];
- pointDir[0] = bbGetInputPoint()[0]+bbGetInputDirectionInPoint()[0];
- pointDir[1] = bbGetInputPoint()[1]+bbGetInputDirectionInPoint()[1];
- pointDir[2] = bbGetInputPoint()[2]+bbGetInputDirectionInPoint()[2];
- bbGetInputTransform()->TransformPoint( pointDir,newPointDir );
- std::vector<double> outDir;
- outDir.push_back( newPointDir[0]-newPoint[0] );
- outDir.push_back( newPointDir[1]-newPoint[1] );
- outDir.push_back( newPointDir[2]-newPoint[2] );
- bbSetOutputOutDirection( outDir );
- } else {
- printf("EED Warning! ApplyTransformToPoint3D::Process Incoherent sizes Point(3)=%d DirectionInPoint(3)=%d\n", bbGetInputPoint().size(),bbGetInputDirectionInPoint().size() );
- }// if Point size
+ if (bbGetInputTransform()!=NULL)
+ {
+ if ((bbGetInputPoint().size()==3) && (bbGetInputDirectionInPoint().size()==3) )
+ {
+ double point[3] , newPoint[3];
+ point[0] = bbGetInputPoint()[0];
+ point[1] = bbGetInputPoint()[1];
+ point[2] = bbGetInputPoint()[2];
+ bbGetInputTransform()->TransformPoint( point,newPoint );
+ std::vector<double> out;
+ out.push_back( newPoint[0] );
+ out.push_back( newPoint[1] );
+ out.push_back( newPoint[2] );
+ bbSetOutputOut( out );
+
+ double pointDir[3] , newPointDir[3];
+ pointDir[0] = bbGetInputPoint()[0]+bbGetInputDirectionInPoint()[0];
+ pointDir[1] = bbGetInputPoint()[1]+bbGetInputDirectionInPoint()[1];
+ pointDir[2] = bbGetInputPoint()[2]+bbGetInputDirectionInPoint()[2];
+ bbGetInputTransform()->TransformPoint( pointDir,newPointDir );
+ std::vector<double> outDir;
+ outDir.push_back( newPointDir[0]-newPoint[0] );
+ outDir.push_back( newPointDir[1]-newPoint[1] );
+ outDir.push_back( newPointDir[2]-newPoint[2] );
+ bbSetOutputOutDirection( outDir );
+ } else {
+ printf("EED Warning! ApplyTransformToPoint3D::Process Incoherent sizes Point(3)=%d DirectionInPoint(3)=%d\n", bbGetInputPoint().size(),bbGetInputDirectionInPoint().size() );
+ }// if Point size
+
+ } else {
+ printf("Warning! ApplyTransformToPoint3D::Process Transform not set.\n");
+ }// if Transform NULL
}
//=====