Ignore:
Timestamp:
Jul 24, 2013 2:00:22 PM (11 years ago)
Author:
ldelgass
Message:

Add preinterp command to polydata for controlling interpolation when using
colormapping.

Location:
trunk/packages/vizservers/vtkvis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/RendererCmd.cpp

    r3818 r3835  
    88908890
    88918891static int
     8892PolyDataPreInterpOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8893                    Tcl_Obj *const *objv)
     8894{
     8895    bool state;
     8896    if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
     8897        return TCL_ERROR;
     8898    }
     8899    if (objc == 4) {
     8900        const char *name = Tcl_GetString(objv[3]);
     8901        g_renderer->setGraphicsObjectInterpolateBeforeMapping<PolyData>(name, state);
     8902    } else {
     8903        g_renderer->setGraphicsObjectInterpolateBeforeMapping<PolyData>("all", state);
     8904    }
     8905    return TCL_OK;
     8906}
     8907
     8908static int
    88928909PolyDataScaleOp(ClientData clientData, Tcl_Interp *interp, int objc,
    88938910                Tcl_Obj *const *objv)
     
    89849001    {"origin",    4, PolyDataOriginOp, 5, 6, "x y z ?name?"},
    89859002    {"pos",       2, PolyDataPositionOp, 5, 6, "x y z ?dataSetName?"},
     9003    {"preinterp", 2, PolyDataPreInterpOp, 3, 4, "bool ?dataSetName?"},
    89869004    {"ptsize",    2, PolyDataPointSizeOp, 3, 4, "size ?dataSetName?"},
    89879005    {"scale",     2, PolyDataScaleOp, 5, 6, "sx sy sz ?dataSetName?"},
  • trunk/packages/vizservers/vtkvis/protocol.txt

    r3834 r3835  
    708708polydata origin <x> <y> <z> <?name?>
    709709polydata pos <x> <y> <z> <?dataSetName?>
     710polydata preinterp <bool> <?dataSetName?>
     711         Controls if VTK's InterpolateScalarsBeforeMapping option is set.
     712         Setting this on will give more correct colors, as the interpolation
     713         is done on texture coordinates that lookup into a 1D texture instead
     714         of using color interpolation from triangle vertices.
    710715polydata ptsize <size> <?dataSetName?>
    711716polydata scale <sx> <sy> <sz> <?dataSetName?>
Note: See TracChangeset for help on using the changeset viewer.