Changeset 4332 for trunk


Ignore:
Timestamp:
Apr 7, 2014, 6:18:11 AM (11 years ago)
Author:
ldelgass
Message:

Add param to 'camera go' for setting zoom ratio.

File:
1 edited

Legend:

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

    r4327 r4332  
    192192        return TCL_ERROR;
    193193    }
     194    double zoom = 1.0;
     195    if (objc > 4) {
     196        if (Tcl_GetDoubleFromObj(interp, objv[4], &zoom) != TCL_OK) {
     197            return TCL_ERROR;
     198        }
     199    }
    194200    double duration = 1.0;
    195     if (objc > 4) {
    196         if (Tcl_GetDoubleFromObj(interp, objv[4], &duration) != TCL_OK) {
     201    if (objc > 5) {
     202        if (Tcl_GetDoubleFromObj(interp, objv[5], &duration) != TCL_OK) {
    197203            return TCL_ERROR;
    198204        }
     
    205211        vpt.y() = mapPoint.y();
    206212        vpt.z() = mapPoint.z();
     213        vpt.setRange(vpt.getRange() * zoom);
    207214        g_renderer->setViewpoint(vpt, duration);
    208215    } else {
     
    399406    {"dist",    2, CameraSetDistanceOp,      3, 3, "distance"},
    400407    {"get",     2, CameraGetViewpointOp,     2, 2, ""},
    401     {"go",      2, CameraGoOp,               4, 5, "x y ?duration?"},
     408    {"go",      2, CameraGoOp,               4, 6, "x y ?zoomFactor? ?duration?"},
    402409    {"orient",  1, CameraOrientOp,           6, 6, "qw qx qy qz"},
    403410    {"pan",     1, CameraPanOp,              4, 4, "panX panY"},
     
    902909        osgEarth::Symbology::Style style;
    903910        osgEarth::Symbology::TextSymbol *ts = style.getOrCreateSymbol<osgEarth::Symbology::TextSymbol>();
    904         ts->halo()->color() = osgEarth::Symbology::Color::White;
     911        ts->halo()->color() = osgEarth::Symbology::Color::Black;
    905912        ts->halo()->width() = 2.0f;
    906         ts->fill()->color() = osgEarth::Symbology::Color::Black;
     913        ts->fill()->color() = osgEarth::Symbology::Color::White;
    907914        ts->content() = osgEarth::Symbology::StringExpression(content);
    908915        ts->priority() = osgEarth::Symbology::NumericExpression(priority);
Note: See TracChangeset for help on using the changeset viewer.