//------------------------------------------------------------------------
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());
}