// ****************************************************************************
//  Method:  avtAxisRestrictionToolInterface::ResetNumberOfAxes
//
//  Purpose:
//    Sets the number of available axes.
//
//  Arguments:
//    n          the number of axes
//
//  Programmer:  Jeremy Meredith
//  Creation:    February  1, 2008
//
//  Modifications:
//    Jeremy Meredith, Fri Feb 15 13:21:20 EST 2008
//    Added axis names to the axis restriction attributes.
//
// ****************************************************************************
void
avtAxisRestrictionToolInterface::ResetNumberOfAxes(int n)
{
    AxisRestrictionAttributes *a = (AxisRestrictionAttributes *)atts;
    stringVector aname(n, "");
    doubleVector amin(n, -1e+37);
    doubleVector amax(n, +1e+37);
    a->SetNames(aname);
    a->SetMinima(amin);
    a->SetMaxima(amax);
}
Esempio n. 2
0
// ****************************************************************************
//  Method:  ParallelCoordinatesAttributes::CreateCompatible
//
//  Purpose:
//    Creates an object of the specified type initialized with the
//    attributes from this object.
//
//  Arguments:
//    tname : The typename of the object that we want to create.
//
//  Returns:    A new object of the type specified by tname or 0.
//
//  Programmer:  Jeremy Meredith
//  Creation:    February  8, 2008
//
//  Modifications:
//    Jeremy Meredith, Fri Feb 15 13:13:56 EST 2008
//    Added better support for axis names.
//
// ****************************************************************************
AttributeSubject *
ParallelCoordinatesAttributes::CreateCompatible(const std::string &tname) const
{
    AttributeSubject *retval = 0;

    if(TypeName() == tname)
    {
        retval = new ParallelCoordinatesAttributes(*this);
    }
    else if (tname == "AxisRestrictionAttributes" ||
             tname == "ThresholdAttributes")
    {
        // Note: my hope was that we could update the plot attributes
        // and have it connect with a threshold tool in another window.
        // Unfortunately, CreateCompatible("ThresholdAttributes") isn't
        // called, so there's a missing path issue.  We could probably
        // get rid of the support for Threshold here.
        AxisRestrictionAttributes *ar = new AxisRestrictionAttributes;

        ar->SetNames(visualAxisNames);
        ar->SetMinima(extentMinima);
        ar->SetMaxima(extentMaxima);

        if (tname == "AxisRestrictionAttributes")
        {
            retval = ar;
        }
        else
        {
            retval = ar->CreateCompatible(tname);
            delete ar;
        }
    }

    return retval;
}