Ignore:
Timestamp:
May 20, 2015 3:22:40 PM (9 years ago)
Author:
ldelgass
Message:

Syncing with trunk: update clipping range in all camera methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.2/nanovis.cpp

    r5542 r5584  
    176176    _camera->y(def_eye.y + dy);
    177177    TRACE("set eye to %f %f", _camera->x(), _camera->y());
     178
     179    collectBounds();
     180    _camera->resetClippingRange(sceneBounds.min, sceneBounds.max);
    178181}
    179182
     
    189192
    190193    collectBounds();
    191 
    192194    _camera->resetClippingRange(sceneBounds.min, sceneBounds.max);
    193195}
     
    197199{
    198200    _camera->orient(phi, theta, psi);
     201
     202    collectBounds();
     203    _camera->resetClippingRange(sceneBounds.min, sceneBounds.max);
    199204}
    200205
     
    203208{
    204209    _camera->orient(quat);
     210
     211    collectBounds();
     212    _camera->resetClippingRange(sceneBounds.min, sceneBounds.max);
    205213}
    206214
     
    209217{
    210218    _camera->setPosition(pos);
     219
     220    collectBounds();
     221    _camera->resetClippingRange(sceneBounds.min, sceneBounds.max);
    211222}
    212223
     
    215226{
    216227    _camera->setUpdir(dir);
     228
     229    collectBounds();
     230    _camera->resetClippingRange(sceneBounds.min, sceneBounds.max);
    217231}
    218232
     
    754768    if (Flow::updatePending) {
    755769        setFlowRanges();
    756         grid->xAxis.setRange(xMin, xMax);
    757         grid->yAxis.setRange(yMin, yMax);
    758         grid->zAxis.setRange(zMin, zMax);
    759770    }
    760771
     
    934945        }
    935946    }
     947    if ((xMin < DBL_MAX) && (xMax > -DBL_MAX)) {
     948        grid->xAxis.setRange(xMin, xMax);
     949    }
     950    if ((yMin < DBL_MAX) && (yMax > -DBL_MAX)) {
     951        grid->yAxis.setRange(yMin, yMax);
     952    }
     953    if ((zMin < DBL_MAX) && (zMax > -DBL_MAX)) {
     954        grid->zAxis.setRange(zMin, zMax);
     955    }
    936956
    937957    TRACE("magMin=%g magMax=%g", Flow::magMin, Flow::magMax);
     
    10071027    if (Flow::updatePending) {
    10081028        setFlowRanges();
    1009         grid->xAxis.setRange(xMin, xMax);
    1010         grid->yAxis.setRange(yMin, yMax);
    1011         grid->zAxis.setRange(zMin, zMax);
    10121029    }
    10131030    if (HeightMap::updatePending) {
     
    10171034        setVolumeRanges();
    10181035    }
     1036
     1037    collectBounds();
    10191038
    10201039    // Start final rendering
Note: See TracChangeset for help on using the changeset viewer.