AttributeSubject * ThreeSliceAttributes::CreateCompatible(const std::string &tname) const { AttributeSubject *retval = 0; if(TypeName() == tname) retval = new ThreeSliceAttributes(*this); if(tname == "PointAttributes" && interactive) { PointAttributes *p = new PointAttributes; double pt[3]; pt[0] = GetX(); pt[1] = GetY(); pt[2] = GetZ(); p->SetPoint(pt); retval = p; } return retval; }
void avtPointToolInterface::SetPoint(double x, double y, double z) { PointAttributes *p = (PointAttributes *)atts; double d[3] = {x, y, z}; if (const_cast<VisWindow*>(visWindow)->GetFullFrameMode()) { // // If in full-frame mode, the point was computed in the scaled // full-frame space. Reverse the scaling to get the correct point. // double scale; int type; const_cast<VisWindow*>(visWindow)->GetScaleFactorAndType(scale, type); if ( type == 0 && scale > 0.) d[0] /= scale; else if ( type == 1 && scale > 0.) d[1] /= scale; } p->SetPoint(d); }