Changeset 2236 for trunk


Ignore:
Timestamp:
Apr 29, 2011 5:19:10 PM (13 years ago)
Author:
ldelgass
Message:

Reduce log spam on dataset visibility change, disable computing world coords
of screen for 3D camera for now (may use it later) as it requires a matrix
inversion and currently we aren't using this.

File:
1 edited

Legend:

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

    r2230 r2236  
    16641664}
    16651665
     1666/**
     1667 * \brief Set the orientation of the camera from a quaternion
     1668 *
     1669 * \param[in] quat A quaternion with scalar part first: w,x,y,z
     1670 */
    16661671void Renderer::setCameraOrientation(double quat[4])
    16671672{
     
    17071712}
    17081713
     1714/**
     1715 * \brief Set the position and orientation of the camera
     1716 *
     1717 * \param[in] position x,y,z position of camera in world coordinates
     1718 * \param[in] focalPoint x,y,z look-at point in world coordinates
     1719 * \param[in] viewUp x,y,z up vector of camera
     1720 */
    17091721void Renderer::setCameraOrientationAndPosition(double position[3],
    17101722                                               double focalPoint[3],
     
    17191731}
    17201732
     1733/**
     1734 * \brief Get the position and orientation of the camera
     1735 *
     1736 * \param[out] position x,y,z position of camera in world coordinates
     1737 * \param[out] focalPoint x,y,z look-at point in world coordinates
     1738 * \param[out] viewUp x,y,z up vector of camera
     1739 */
    17211740void Renderer::getCameraOrientationAndPosition(double position[3],
    17221741                                               double focalPoint[3],
     
    18991918        _renderer->ResetCameraClippingRange();
    19001919        storeCameraOrientation();
    1901         computeScreenWorldCoords();
     1920        //computeScreenWorldCoords();
    19021921    }
    19031922
     
    19451964        _renderer->ResetCameraClippingRange();
    19461965        storeCameraOrientation();
     1966        //computeScreenWorldCoords();
    19471967    }
    19481968
     
    20322052}
    20332053
     2054/**
     2055 * \brief Convert pixel/display coordinates to world coordinates based on current camera
     2056 */
    20342057void Renderer::computeDisplayToWorld(double x, double y, double z, double worldPt[4])
    20352058{
     
    20452068}
    20462069
     2070/**
     2071 * \brief Convert world coordinates to pixel/display coordinates based on current camera
     2072 */
    20472073void Renderer::computeWorldToDisplay(double x, double y, double z, double displayPt[3])
    20482074{
     
    20522078}
    20532079
     2080/**
     2081 * \brief Compute the world coordinate bounds of the display rectangle
     2082 */
    20542083void Renderer::computeScreenWorldCoords()
    20552084{
     
    23322361void Renderer::setOpacity(const DataSetId& id, double opacity)
    23332362{
    2334     setPseudoColorOpacity(id, opacity);
    2335     setContourOpacity(id, opacity);
    2336     setPolyDataOpacity(id, opacity);
     2363    if (id.compare("all") == 0 || getPseudoColor(id) != NULL)
     2364        setPseudoColorOpacity(id, opacity);
     2365    if (id.compare("all") == 0 || getContour2D(id) != NULL)
     2366        setContourOpacity(id, opacity);
     2367    if (id.compare("all") == 0 || getPolyData(id) != NULL)
     2368        setPolyDataOpacity(id, opacity);
    23372369}
    23382370
     
    23612393    } while (doAll && ++itr != _dataSets.end());
    23622394
    2363     setPseudoColorVisibility(id, state);
    2364     setContourVisibility(id, state);
    2365     setPolyDataVisibility(id, state);
     2395    if (id.compare("all") == 0 || getPseudoColor(id) != NULL)
     2396        setPseudoColorVisibility(id, state);
     2397    if (id.compare("all") == 0 || getContour2D(id) != NULL)
     2398        setContourVisibility(id, state);
     2399    if (id.compare("all") == 0 || getPolyData(id) != NULL)
     2400        setPolyDataVisibility(id, state);
    23662401}
    23672402
Note: See TracChangeset for help on using the changeset viewer.