Skip to content
  • Cory Quammen's avatar
    Handle coloring by field data · a07731a2
    Cory Quammen authored
    Some level of support was previously available for coloring by field
    data, but this was restricted to drawing triangle strips. This patch
    adds another mode to coloring by field data that enables coloring the
    entire data set by a particular tuple in the field data. The field
    data tuple gets mapped through the color map, and that color is used
    to color the entire data set. The default behavior for triangle strips
    is retained by setting this tuple index to -1, the default value.
    
    The motivation for this change is to make it possible to color blocks
    in a multi-block dataset according to a value in that block's field
    data array, e.g., an initial condition, block ID, etc. Vector values
    (arrays with more than one component) are fully supported.
    
    Several other improvements were also made:
    
    - Added test for existing capability of coloring by field data.
    
    - Added test for coloring by tuple of field data.
    
    - Modified vtkMapper::GetScalarModeAsString() to return
      string for field data scalar mode.
    
    - Fixed vtkDataSetSurfaceFilter::UnstructuredGridExecute(...) and
      vtkUnstructuredGridGeometryFilter::RequestData(...)
      to pass field data through to output
    
    Change-Id: I0d97e84ec77e7ea01ca1b1350acce73cb6c4c15b
    a07731a2