Changeset 3683 for trunk/packages/vizservers/vtkvis/Arrow.cpp
- Timestamp:
- Jun 12, 2013, 2:51:11 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/Arrow.cpp
r3616 r3683 9 9 #include <vtkActor.h> 10 10 #include <vtkArrowSource.h> 11 #include <vtkPolyDataNormals.h> 12 #include <vtkReverseSense.h> 11 13 12 14 #include "Arrow.h" … … 37 39 } 38 40 41 vtkSmartPointer<vtkPolyDataNormals> normalFilter = vtkSmartPointer<vtkPolyDataNormals>::New(); 42 normalFilter->SetInputConnection(_arrow->GetOutputPort()); 43 normalFilter->AutoOrientNormalsOff(); 44 39 45 _pdMapper->SetInputConnection(_arrow->GetOutputPort()); 40 46 … … 44 50 _pdMapper->Update(); 45 51 } 52 53 void Arrow::flipNormals(bool state) 54 { 55 if (_arrow == NULL || _pdMapper == NULL) 56 return; 57 58 if (state) { 59 vtkSmartPointer<vtkReverseSense> filter = vtkSmartPointer<vtkReverseSense>::New(); 60 filter->ReverseCellsOn(); 61 filter->ReverseNormalsOn(); 62 filter->SetInputConnection(_arrow->GetOutputPort()); 63 64 _pdMapper->SetInputConnection(filter->GetOutputPort()); 65 } else { 66 _pdMapper->SetInputConnection(_arrow->GetOutputPort()); 67 } 68 }
Note: See TracChangeset
for help on using the changeset viewer.