// (the one provided in the attribute 'type' of the tag 'input')
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
// (the one provided in the attribute 'type' of the tag 'input')
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
meanNormal[0] = meanNormal[0] + pValue[0];
meanNormal[1] = meanNormal[1] + pValue[1];
meanNormal[2] = meanNormal[2] + pValue[2];
meanNormal[0] = meanNormal[0] + pValue[0];
meanNormal[1] = meanNormal[1] + pValue[1];
meanNormal[2] = meanNormal[2] + pValue[2];
if (size!=0)
{
meanNormal[0] = meanNormal[0] / size;
meanNormal[1] = meanNormal[1] / size;
meanNormal[2] = meanNormal[2] / size;
if (size!=0)
{
meanNormal[0] = meanNormal[0] / size;
meanNormal[1] = meanNormal[1] / size;
meanNormal[2] = meanNormal[2] / size;
+ double magnitude = sqrt( meanNormal[0]*meanNormal[0] + meanNormal[1]*meanNormal[1] + meanNormal[2]*meanNormal[2] );
+ meanNormal[0] = meanNormal[0] / magnitude;
+ meanNormal[1] = meanNormal[1] / magnitude;
+ meanNormal[2] = meanNormal[2] / magnitude;
meanN[0] = meanNormal[0];
meanN[1] = meanNormal[1];
meanN[2] = meanNormal[2];
meanN[0] = meanNormal[0];
meanN[1] = meanNormal[1];
meanN[2] = meanNormal[2];
int i , size=dataarray->GetNumberOfTuples();
for (i=0; i<size; i++)
{
pValue = dataarray->GetTuple3( i );
ang = vtkMath::AngleBetweenVectors( pValue, meanN );
int i , size=dataarray->GetNumberOfTuples();
for (i=0; i<size; i++)
{
pValue = dataarray->GetTuple3( i );
ang = vtkMath::AngleBetweenVectors( pValue, meanN );
vtkMath::Cross(meanN,pValue,crossResult);
wxyz[0] = ang * bbGetInputParam();
wxyz[1] = crossResult[0];
wxyz[2] = crossResult[1];
wxyz[3] = crossResult[2];
vtkMath::RotateVectorByWXYZ(meanN, wxyz ,meanNormalresult);
vtkMath::Cross(meanN,pValue,crossResult);
wxyz[0] = ang * bbGetInputParam();
wxyz[1] = crossResult[0];
wxyz[2] = crossResult[1];
wxyz[3] = crossResult[2];
vtkMath::RotateVectorByWXYZ(meanN, wxyz ,meanNormalresult);
+ magnitude = sqrt( meanNormalresult[0]*meanNormalresult[0] + meanNormalresult[1]*meanNormalresult[1] + meanNormalresult[2]* meanNormalresult[2] );
+ meanNormalresult[0] = meanNormalresult[0] / magnitude;
+ meanNormalresult[1] = meanNormalresult[1] / magnitude;
+ meanNormalresult[2] = meanNormalresult[2] / magnitude;
dataarray->SetTuple3( i , meanNormalresult[0], meanNormalresult[1], meanNormalresult[2] );
} // for
dataarray->SetTuple3( i , meanNormalresult[0], meanNormalresult[1], meanNormalresult[2] );
} // for
} // if Type==1 && dataarray
bbSetOutputMeanNormal( meanNormal );
bbSetOutputOut( normal->GetOutput() );
} // if Type==1 && dataarray
bbSetOutputMeanNormal( meanNormal );
bbSetOutputOut( normal->GetOutput() );
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void PolyDataNormals::bbUserInitializeProcessing()
{
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void PolyDataNormals::bbUserInitializeProcessing()
{
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void PolyDataNormals::bbUserFinalizeProcessing()
{
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
void PolyDataNormals::bbUserFinalizeProcessing()
{
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any