Ignore:
Timestamp:
Mar 18, 2012 7:10:04 PM (12 years ago)
Author:
ldelgass
Message:

Use new custom vtk 3d axes (when USE_CUSTOM_AXES is defined). Fixes gridlines
in 3D.

File:
1 edited

Legend:

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

    r2759 r2865  
    519519{
    520520    TRACE("Initializing axes");
     521#ifdef USE_CUSTOM_AXES
     522    if (_cubeAxesActor == NULL)
     523        _cubeAxesActor = vtkSmartPointer<vtkRpCubeAxesActor>::New();
     524#else
    521525    if (_cubeAxesActor == NULL)
    522526        _cubeAxesActor = vtkSmartPointer<vtkCubeAxesActor>::New();
     527#endif
    523528    _cubeAxesActor->SetCamera(_renderer->GetActiveCamera());
    524529    _cubeAxesActor->GetProperty()->LightingOff();
     
    10881093 * \param[in] width Pixel width of legend (aspect controls orientation)
    10891094 * \param[in] height Pixel height of legend (aspect controls orientation)
     1095 * \param[in] opaque Flag to control if legend is rendered opaque or translucent
    10901096 * \param[in] numLabels Number of labels to render (includes min/max)
    10911097 * \param[in,out] imgData Pointer to array to fill with image bytes. Array
     
    11541160 * \param[in] width Pixel width of legend (aspect controls orientation)
    11551161 * \param[in] height Pixel height of legend (aspect controls orientation)
     1162 * \param[in] opaque Flag to control if legend is rendered opaque or translucent
    11561163 * \param[in] numLabels Number of labels to render (includes min/max)
    11571164 * \param[in,out] imgData Pointer to array to fill with image bytes. Array
     
    12171224 * \param[in] width Pixel width of legend (aspect controls orientation)
    12181225 * \param[in] height Pixel height of legend (aspect controls orientation)
     1226 * \param[in] opaque Flag to control if legend is rendered opaque or translucent
    12191227 * \param[in] numLabels Number of labels to render (includes min/max)
    12201228 * \param[in,out] imgData Pointer to array to fill with image bytes. Array
     
    19811989    outerGutter = (outerGutter > 15 ? 15 : outerGutter);
    19821990
     1991    int imgWidthPx = _windowWidth - pxOffsetX - outerGutter;
    19831992    int imgHeightPx = _windowHeight - pxOffsetY - outerGutter;
    1984     int imgWidthPx = _windowWidth - pxOffsetX - outerGutter;
    19851993
    19861994    double imgAspect = width / height;
     
    19901998
    19911999    if (imgAspect >= winAspect) {
    1992         pxToWorld = width / imgWidthPx;
     2000        pxToWorld = width / (double)imgWidthPx;
    19932001    } else {
    1994         pxToWorld = height / imgHeightPx;
     2002        pxToWorld = height / (double)imgHeightPx;
    19952003    }
    19962004
Note: See TracChangeset for help on using the changeset viewer.