*/
#include "vtkVectorsTensorsVisuBase.h"
-
-
#include "vtkObjectFactory.h"
-
-
-
vtkStandardNewMacro(vtkLookupTableDirectionVector);
// Construct with range=(0,1); and hsv ranges set up for rainbow color table
{
}
-
-
unsigned char *vtkLookupTableDirectionVector::MapValue(double v)
{
//int idx = this->GetIndex(v);
- //return (this->Table->GetPointer(0) + 4*idx);
-
+ //return (this->Table->GetPointer(0) + 4*idx);
return 0;
}
inIncr=3;
- printf("EED length %d %p\n", length,input);
+// printf("EED length %d %p\n", length,input);
// mag = new double[length];
for (i = 0; i < length; ++i)
{
sum = 0;
for (j = 0; j < inIncr; ++j)
{
- if (j==0) dirx= static_cast<double>(*input);
- if (j==1) diry= static_cast<double>(*input);
- if (j==2) dirz= static_cast<double>(*input);
- tmp = static_cast<double>(*input);
+ if (j==0) dirx= static_cast<T>(*input);
+ if (j==1) diry= static_cast<T>(*input);
+ if (j==2) dirz= static_cast<T>(*input);
+ tmp = static_cast<T>(*input);
sum += (tmp * tmp);
++input;
}
}
-
//----------------------------------------------------------------------------
void vtkLookupTableDirectionVector::MapScalarsThroughTable2(void *input,
unsigned char *output,
int inputIncrement,
int outputFormat)
{
- printf("vtkLookupTableEED::MapScalarsThroughTable2 inputIncrement=%d inputDataType=%d\n",inputIncrement,inputDataType);
+// printf("vtkLookupTableEED::MapScalarsThroughTable2 inputIncrement=%d inputDataType=%d\n",inputIncrement,inputDataType);
// if (this->UseMagnitude && inputIncrement > 1)
// {
switch (inputDataType)
vtkVectorsTensorsVisuBase::vtkVectorsTensorsVisuBase()
{
- _firsttime = true;
- _active = false;
- _scalefactor= 1;
+ _firsttime = true;
+ _active = false;
+ _scalefactor = 1;
_opacity = 1;
- _dataobject = NULL;
- _renderer = NULL;
- _typeForm = 0;
+ _dataobject = NULL;
+ _renderer = NULL;
+ _typeForm = 0;
+ _orientation = 0;
_LutEED = vtkLookupTableDirectionVector::New();
-// _LutEED->SetVectorMode(0);
-//_LutEED->SetVectorModeToMagnitude();
-//_LutEED->SetVectorModeToComponent();
-_LutEED->SetVectorModeToRGBColors();
+ //_LutEED->SetVectorMode(0);
+ //_LutEED->SetVectorModeToMagnitude();
+ //_LutEED->SetVectorModeToComponent();
+ _LutEED->SetVectorModeToRGBColors();
- _pdm = vtkPolyDataMapper::New();
+ _pdm = vtkPolyDataMapper::New();
_actor = vtkActor::New();
_actorAdded = false;
}
{
}
-
-
//------------------------------------------------------------------------------
void vtkVectorsTensorsVisuBase::VisibilityActor()
{
} // if _active==false
}
-
//------------------------------------------------------------------------------
void vtkVectorsTensorsVisuBase::SetColorLaw(int colorlaw)
{
}
}
+//------------------------------------------------------------------------------
+void vtkVectorsTensorsVisuBase::SetOrientation(int orientation)
+{
+ _orientation = orientation;
+}
+
+//------------------------------------------------------------------------------
+int vtkVectorsTensorsVisuBase::GetOrientation()
+{
+ return _orientation;
+}
+