//------------------------------------------------------------------------
vtkTensorsVisu::vtkTensorsVisu() : vtkVectorsTensorsVisuBase()
{
- ss = vtkSphereSource::New();
+ ss = vtkSphereSource::New();
superquadratic = vtkSuperquadricSource::New();
- cs = vtkCubeSource::New();
- tg = vtkTensorGlyph::New();
- pdn = vtkPolyDataNormals::New();
- pd = vtkPolyData::New();
- pod = vtkPointData::New();
+ cs = vtkCubeSource::New();
+ tg = vtkTensorGlyph::New();
+ pdn = vtkPolyDataNormals::New();
+ pd = vtkPolyData::New();
+ pod = vtkPointData::New();
}
//------------------------------------------------------------------------
printf("EED vtkTensorsVisu::Process Start\n");
- if (_active==true){
-// std::string source="sphere";
- std::string source="superquadratic";
- if(source=="sphere")
+ if (_active==true)
+ {
+
+ if(GetTypeForm()==2) // source superquadratic
{
- tg->SetSource(ss->GetOutput());
- } else if(source=="cube") {
- tg->SetSource(cs->GetOutput());
- }else if(source=="superquadratic") {
superquadratic->SetThetaResolution(20);
superquadratic->SetPhiResolution(20);
tg->SetSource(superquadratic->GetOutput());
- } else {
+ } else if(GetTypeForm()==1) { // source sphere
+ tg->SetSource(ss->GetOutput());
+ } else { // source cube
+ tg->SetSource(cs->GetOutput());
}
_pdm->SetInput( pdn->GetOutput() );
_pdm->ImmediateModeRenderingOn();
- _pdm->ScalarVisibilityOn();
- _pdm->SetScalarModeToUsePointFieldData();
+ _pdm->ScalarVisibilityOn();
+ _pdm->SetScalarModeToUsePointFieldData();
//EED _pdm->Update();
_actor->SetMapper( _pdm );
- _actor->GetProperty()->SetOpacity( GetOpacity() );
+ _actor->GetProperty()->SetOpacity( GetOpacity() );
tg->ColorGlyphsOn();
// tg->ExtractEigenvaluesOn();
tg->SetColorModeToEigenvalues();
- _pdm->SetLookupTable( _LutEED );
- _pdm->SelectColorArray( "Normals" );
+ _pdm->SetLookupTable( _LutEED );
+ _pdm->SelectColorArray( "Normals" );
//int tcg = tg->GetColorGlyphs();