Changeset 4793


Ignore:
Timestamp:
Nov 26, 2014 12:52:50 AM (9 years ago)
Author:
ldelgass
Message:

Add flag to set if collected bounds are for visible objects only.

Location:
vtkvis/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vtkvis/trunk/Renderer.cpp

    r4649 r4793  
    8080    _cameraMode(PERSPECTIVE),
    8181    _cameraAspect(ASPECT_NATIVE),
     82    _computeOnlyVisibleBounds(true),
    8283    _imgCameraPlane(PLANE_XY),
    8384    _imgCameraOffset(0),
     
    509510            _axesAutoBounds[Y_AXIS] ||
    510511            _axesAutoBounds[Z_AXIS]) {
    511             collectBounds(newBounds, true);
     512            collectBounds(newBounds, _computeOnlyVisibleBounds);
    512513        }
    513514    }
     
    744745    double bounds[6];
    745746    if (_cameraMode == IMAGE) {
    746         collectBounds(bounds, true);
     747        collectBounds(bounds, _computeOnlyVisibleBounds);
    747748    } else
    748749        _cubeAxesActor->GetBounds(bounds);
    749750
    750751    double unscaledBounds[6];
    751     collectUnscaledBounds(unscaledBounds, true);
     752    collectUnscaledBounds(unscaledBounds, _computeOnlyVisibleBounds);
    752753
    753754    if (_axesRangeMode[X_AXIS] == RANGE_AUTO) {
     
    27442745        //setViewAngle(_windowHeight);
    27452746        //double bounds[6];
    2746         //collectBounds(bounds, false);
     2747        //collectBounds(bounds, _computeOnlyVisibleBounds);
    27472748        //_renderer->ResetCamera(bounds);
    27482749        if (_needsAxesReset) {
     
    42784279
    42794280    double bounds[6];
    4280     collectBounds(bounds, true);
     4281    collectBounds(bounds, _computeOnlyVisibleBounds);
    42814282    bool twod = is2D(bounds, &_imgCameraPlane, &_imgCameraOffset);
    42824283    if (twod) {
     
    45064507{
    45074508    double bounds[6];
    4508     collectBounds(bounds, true);
     4509    collectBounds(bounds, _computeOnlyVisibleBounds);
    45094510
    45104511    switch (axis) {
  • vtkvis/trunk/Renderer.h

    r4090 r4793  
    10881088    CameraMode _cameraMode;
    10891089    Aspect _cameraAspect;
     1090    bool _computeOnlyVisibleBounds;
    10901091    double _imgWorldOrigin[2];
    10911092    double _imgWorldDims[2];
Note: See TracChangeset for help on using the changeset viewer.