1. 01 Aug, 2019 2 commits
    • Cory Quammen's avatar
      vtkUnstructuredGrid: Handle null DistinctCellTypes member variable · 8424b7ab
      Cory Quammen authored
      Handle DistinctCellTypes member variable being nullptr in
      vtkUnstructuredGrid::GetCellTypes() in case the Types array is not
      modified prior to calling
      vtkUnstructuredGrid::GetCellTypes(vtkCellTypes *types). Change
      the comparison of MTimes to a greater than to determine if the
      distinct cell types array should be updated.
      8424b7ab
    • David Gobbi's avatar
      Change MultiplyPoint from float to double · ac729397
      David Gobbi authored
      The method 'float *vtkMatrix4x4::MultiplyPoint(const float[4])'
      should use 'double' instead of 'float'.  Not only is the use of
      single-precision unexpected to most users of this method, but the
      similar 'double *vtkTransform::TransformPoint(const double[3])'
      method already uses double precision.
      
      This is, unfortunately, an API-breaking change but is worthwhile
      nonetheless.
      ac729397
  2. 30 Jul, 2019 1 commit
  3. 18 Jul, 2019 2 commits
  4. 16 Jul, 2019 3 commits
  5. 15 Jul, 2019 3 commits
  6. 12 Jul, 2019 3 commits
    • Ken Martin's avatar
      Fixes to translucent Rendering · 9c70c2b9
      Ken Martin authored
      Try to fix some issues show in
      vtk/vtk#17404 as well as
      other transparency issues with vtkCompositePolyDataMapper2
      
      Previously mappers could only report GetIsOpaque which would render them
      as opaque or transparent. With this change mappers can report if they
      have TranslucentPolygonalGeometry as well as OpaqueGeometry and they can
      report both. If they report both they will get invoked on both passes.
      This allows complex mapperssuch as CPDM2 to do render some blocks during
      the opaque pass and other blocks during the translucent pass.
      
      Create better logic in vtkScalarsToColors to report If the scalar
      mapping would produce translucent results and use that logic in a couple
      places where it had been duplicated.
      9c70c2b9
    • Allison Vacanti's avatar
      Add helper functions to create smart / weak pointers. · 0aba7003
      Allison Vacanti authored
      Three new functions have been added to the vtk namespace:
      
      1) vtkSmartPointer<T> vtk::MakeSmartPointer(T*)
      2) vtkSmartPointer<T> vtk::TakeSmartPointer(T*)
      3) vtkWeakPointer<T> vtk::TakeWeakPointer(T*)
      
      (1) takes an object of type T (which inherits vtkObject), increments
      its reference count, and returns the object wrapped in a
      vtkSmartPointer<T>.
      (2) does the same as (1), but without incrementing the reference count.
      (3) takes returns the object in a vtkWeakPointer without incrementing
      the reference count.
      
      These are intended to simplify using VTK's smart pointer with the auto
      keyword. Now, instead of:
      
      vtkSmartPointer<vtkInsertNameOfSomeVtkObjectHere> smartObj;
      smartObj = someObj;
      
      just do:
      
      auto myObj = vtk::MakeSmartPointer(someObj);
      
      The Take variant can be used to handle objects that already have a
      borrowed reference, such as a cell iterator. Instead of:
      
      auto cellIter = vtkSmartPointer<vtkCellIterator>::Take(myDataSet->NewCellIterator());
      
      or:
      
      vtkSmartPointer<vtkCellIterator> cellIter;
      cellIter.TakeReference(myDataSet->NewCellIterator());
      
      just write:
      
      auto cellIter = vtk::TakeSmartPointer(myDataSet->NewCellIterator());
      0aba7003
    • Ken Martin's avatar
      handle mixes of idtype and unsigned int better · 0fbb15bf
      Ken Martin authored
      handle case where we have 32bit IDs better
      fix warning
      0fbb15bf
  7. 11 Jul, 2019 1 commit
  8. 09 Jul, 2019 2 commits
    • Sunderlandkyl's avatar
      Fix Windows multitouch and MacOS trackpad gesture interactions · c654847d
      Sunderlandkyl authored
      Previously the touch interactions in Qt worked for touchpad on MacOS, but not on Windows touchscreens.
      This commit adds support for multi-touch gestures on Windows touchscreens and fixes some errors in MacOS trackpad gestures.
      
      List of gestures supported:
      - Tap
      - Tap And Hold
      - Pinch
      - Rotate
      - Pan
      - Swipe
      
      Added new example QVTKTouchscreenRenderWindows to demonstrate the use of gesture events in a QVTKOpenGLNativeWidget. See demonstration video here: https://youtu.be/fpnqsDmJ0Y8
      
      Implementation details:
      
      Modified QVTKInteractorAdapter to invoke events using widget local coordinates
      - Qt coordinates are inconsistent between gestures, and even within the same gesture on different platforms (Windows touchscreen vs MacOS touchpad)
      - VTK expects the invoked events to be in the local coordinate frame
      
      Updated vtkInteractorStyleMultiTouchCamera to utilize the updated events
      - Calls StartGesture() to switch interactor states when a Pinch/Rotate/Pan gesture is started. This prevents other states such as rotate from interfering with the gestures.
      - Adjusted behavior of the different gestures. Pinch and rotate are now performed relative to the position of the gesture on the screen, instead of dollying/rotating around the focal point.
      
      Fixes made to support gestures:
      - Pass widget as parent to InteractorAdapter in QVTKRenderWindowAdapter. Without a widget, we cannot calculate local coordinates from QWidget::mapFromGlobal().
      - Pass -DQt5_DIR=${Qt5_DIR} to examples with the add_example CMake function. Qt examples would not build since they were missing Qt5_DIR.
      c654847d
    • Will Schroeder's avatar
      Dashboard warnings related to addition of vtkStaticCellLinks · 8c54a36f
      Will Schroeder authored
      Cleaned up some leftover warnings indicated by dashboard.
      8c54a36f
  9. 08 Jul, 2019 1 commit
    • Will Schroeder's avatar
      Reworking cell links classes for performance and consistent API · 88efc809
      Will Schroeder authored
      vtkStaticCellLinks has been rewritten using std::atomic and vtkSMPTools for
      an ~10x speed improvement. Some clean up and improvements to the API, including
      classes that use cell links were also made. An additional construct is the
      notion of a dataset being "editable". That is, after a dataset is constructed,
      it is assumed non-editable if no further modifications to the geometry and topology
      are made. This allows the use of static locators and cell links classes. If editable,
      then the old vtkCellLinks and vtkPointLocators are used, and certain editing methods
      in the dataset API are allowed.
      88efc809
  10. 03 Jul, 2019 2 commits
  11. 02 Jul, 2019 1 commit
    • Robert Maynard's avatar
      Correct possible ODR violations in the AutoInit generated code · 5a148ce8
      Robert Maynard authored
      The previous `AutoInit` approach generated a class in each TU
      for a VTK-module. That class would have the same name and
      the same contents for the constructor. This was fine as long
      as the VTK-module was built dynamically.
      
      This constructor would look like:
      
      ```cxx
      AuotInit()
      {
        InitFactory1();
        InitFactory2();
      }
      ```
      
      The problem arised when VTK-module's are built statically. In
      that case we would get multiple differing implementations
      of the same class. This happens as VTK-module deeper in the
      hierarchy would would need initialize more factories than
      VTK-modules they depended on.
      
      ```cxx
      AuotInit() //from VTK-module A
      {
        InitFactory1();
        InitFactory2();
      }
      
      AuotInit() //from VTK-module B
      {
        InitFactory1();
        InitFactory2();
        InitFactory3();
        InitFactory4();
      }
      ```
      
      These ODR violations are problematic because it meant that the linker
      would select a single implementation for `AutoInit` which could
      be one that would only initialized 2 modules instead of one that
      initialized 4 modules.
      
      To solve this problem we have gone with an approach where each
      AuotInit is placed into an anonymous namespace making them all
      unique and not an ODR violation.
      5a148ce8
  12. 28 Jun, 2019 1 commit
  13. 25 Jun, 2019 1 commit
    • Will Schroeder's avatar
      Speed up process obtaining maximum cell size. · 7f63f80a
      Will Schroeder authored
      This is a general computation for speeding up the operation of obtaining maximum cell size.
      (This is typically used for allocation of temporary storage during computation.)  Longer-term,
      this is in support of speeding up streamline generation.
      7f63f80a
  14. 24 Jun, 2019 2 commits
  15. 21 Jun, 2019 1 commit
  16. 20 Jun, 2019 2 commits
  17. 19 Jun, 2019 4 commits
  18. 12 Jun, 2019 1 commit
  19. 11 Jun, 2019 1 commit
  20. 10 Jun, 2019 3 commits
  21. 08 Jun, 2019 2 commits
  22. 06 Jun, 2019 1 commit