// File : VISU_FieldTransform.cxx
// Module : VISU
-#include "VISU_FieldTransform.hxx"
-#include "SALOME_Transform.h"
+#include "VISU_FieldTransform.hxx"
+#include "VTKViewer_Transform.h"
#include <vtkObjectFactory.h>
#include <vtkFloatArray.h>
using namespace std;
-#ifdef DEBUG
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
vtkStandardNewMacro(VISU_FieldTransform);
-double VISU_FieldTransform::Ident(double theArg){
+double VISU_FieldTransform::Ident(double theArg){
return theArg;
}
-double VISU_FieldTransform::Log10(double theArg){
+double VISU_FieldTransform::Log10(double theArg){
if(theArg <= 0.0) return -VTK_LARGE_FLOAT;
return log10(theArg);
}
return vtkSource::GetMTime();
}
-void VISU_FieldTransform::SetScalarTransform(TTransformFun theFunction) {
+void VISU_FieldTransform::SetScalarTransform(TTransformFun theFunction) {
myFunction = theFunction;
if(myFunction == NULL) myFunction = &Ident;
Modified();
}
-void VISU_FieldTransform::SetSpaceTransform(SALOME_Transform* theTransform){
+void VISU_FieldTransform::SetSpaceTransform(VTKViewer_Transform* theTransform){
if(myTransform != theTransform){
if (myTransform != NULL) myTransform->UnRegister(this);
myTransform = theTransform;
}
-void VISU_FieldTransform::SetScalarRange(float theScalarRange[2]) {
+void VISU_FieldTransform::SetScalarRange(float theScalarRange[2]) {
myScalarRange[0] = theScalarRange[0];
myScalarRange[1] = theScalarRange[1];
Modified();
template<typename TypeData> void
-ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
- SALOME_Transform* theTransform,
- float theScalarRange[2], int theNbComponent,
+ExecVectors(VISU_FieldTransform::TTransformFun theFunction,
+ VTKViewer_Transform* theTransform,
+ float theScalarRange[2], int theNbComponent,
TypeData* theInputData, TypeData* theOutputData)
{
vtkDataArray *inVectors = theInputData->GetVectors();
- if ( !inVectors || theNbComponent < 1 ) return;
+ if ( !inVectors || theNbComponent < 1 ) return;
vtkFloatArray *newVectors = vtkFloatArray::New();
newVectors->SetNumberOfComponents(3);
newVectors->SetNumberOfTuples(theNbComponent);
int theNbComponent, TypeData* theInputData, TypeData* theOutputData)
{
vtkDataArray *inScalars = theInputData->GetScalars();
- if ( !inScalars || theNbComponent < 1 )
- return;
+ if ( !inScalars || theNbComponent < 1 )
+ return;
vtkFloatArray *newScalars = vtkFloatArray::New();
newScalars->SetNumberOfComponents(1);
newScalars->SetNumberOfTuples(theNbComponent);