#include <vtkInformation.h>
#include <vtkInformationVector.h>
-static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT;
+static double Tolerance = 1.0 / VTK_LARGE_FLOAT;
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_FieldTransform);
//----------------------------------------------------------------------------
void
VISU_FieldTransform
-::SetScalarRange(vtkFloatingPointType theScalarRange[2])
+::SetScalarRange(double theScalarRange[2])
{
if(VISU::CheckIsSameRange(theScalarRange, myScalarRange))
return;
//----------------------------------------------------------------------------
void
VISU_FieldTransform
-::SetScalarMin(vtkFloatingPointType theValue)
+::SetScalarMin(double theValue)
{
- vtkFloatingPointType aScalarRange[2] = {theValue, GetScalarRange()[1]};
+ double aScalarRange[2] = {theValue, GetScalarRange()[1]};
SetScalarRange(aScalarRange);
}
//----------------------------------------------------------------------------
void
VISU_FieldTransform
-::SetScalarMax(vtkFloatingPointType theValue)
+::SetScalarMax(double theValue)
{
- vtkFloatingPointType aScalarRange[2] = {GetScalarRange()[0], theValue};
+ double aScalarRange[2] = {GetScalarRange()[0], theValue};
SetScalarRange(aScalarRange);
}
LinearTransformVectors(TValueType* theInputPtr,
TValueType* theOutputPtr,
vtkIdType theNbOfTuples,
- vtkFloatingPointType theScale[3])
+ double theScale[3])
{
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
for(vtkIdType aComponentId = 0; aComponentId < 3; aComponentId++){
TValueType* theInputPtr,
TValueType* theOutputPtr,
vtkIdType theNbOfTuples,
- vtkFloatingPointType theScale[3],
+ double theScale[3],
VISU_FieldTransform::TTransformFun theFunction,
- vtkFloatingPointType theModifiedScalarMin,
- vtkFloatingPointType theModifiedScalarDelta,
- vtkFloatingPointType theSourceScalarMax)
+ double theModifiedScalarMin,
+ double theModifiedScalarDelta,
+ double theSourceScalarMax)
{
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
- vtkFloatingPointType anInputVector[3];
+ double anInputVector[3];
theInputVectors->GetTuple(aTupleId, anInputVector);
- vtkFloatingPointType aMagnification = vtkMath::Norm(anInputVector);
+ double aMagnification = vtkMath::Norm(anInputVector);
if(aMagnification > Tolerance)
aMagnification =
((*theFunction)(aMagnification) - theModifiedScalarMin) /
void
ExecuteVectors(VISU_FieldTransform::TTransformFun theFunction,
VTKViewer_Transform* theTransform,
- vtkFloatingPointType theScalarRange[2],
+ double theScalarRange[2],
vtkIdType theNbOfTuples,
TDataSetAttributesType* theInputData,
TDataSetAttributesType* theOutputData)
if(!anInputVectors || theNbOfTuples < 1)
return;
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
aScalarRange[0] = (*theFunction)(theScalarRange[0]);
aScalarRange[1] = (*theFunction)(theScalarRange[1]);
- vtkFloatingPointType aScalarDelta = aScalarRange[1] - aScalarRange[0];
- vtkFloatingPointType aScale[3] = {1.0, 1.0, 1.0};
+ double aScalarDelta = aScalarRange[1] - aScalarRange[0];
+ double aScale[3] = {1.0, 1.0, 1.0};
if(theTransform){
aScale[0] = theTransform->GetScale()[0];
TValueType* theOutputPtr,
vtkIdType theNbOfTuples,
VISU_FieldTransform::TTransformFun theFunction,
- vtkFloatingPointType theModifiedScalarMin)
+ double theModifiedScalarMin)
{
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
- vtkFloatingPointType aScalar = (*theFunction)(vtkFloatingPointType(*theInputPtr));
+ double aScalar = (*theFunction)(double(*theInputPtr));
if(aScalar < theModifiedScalarMin)
aScalar = theModifiedScalarMin;
*theOutputPtr = TValueType(aScalar);
template<typename TDataSetAttributesType>
void
ExecuteScalars(VISU_FieldTransform::TTransformFun theFunction,
- vtkFloatingPointType theScalarRange[2],
+ double theScalarRange[2],
vtkIdType theNbOfTuples,
TDataSetAttributesType* theInputData,
TDataSetAttributesType* theOutputData)
if(!anInputScalars || theNbOfTuples < 1)
return;
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
aScalarRange[0] = (*theFunction)(theScalarRange[0]);
aScalarRange[1] = (*theFunction)(theScalarRange[1]);