void Checker::prepareForDisplay (const QList<Point> &points, int pointRadius, const DocumentModelAxesChecker &modelAxesChecker, const DocumentModelCoords &modelCoords, const Transformation &transformation) { LOG4CPP_INFO_S ((*mainCat)) << "Checker::prepareForDisplay " << " transformation=" << transformation; ENGAUGE_ASSERT (points.count () == NUM_AXES_POINTS); // Remove previous lines deleteSide (m_sideLeft); deleteSide (m_sideTop); deleteSide (m_sideRight); deleteSide (m_sideBottom); // Get the min and max of x and y double xFrom, xTo, yFrom, yTo; int i; for (i = 0; i < NUM_AXES_POINTS; i++) { if (i == 0) { xFrom = points.at(i).posGraph().x(); xTo = points.at(i).posGraph().x(); yFrom = points.at(i).posGraph().y(); yTo = points.at(i).posGraph().y(); } xFrom = qMin (xFrom, points.at(i).posGraph().x()); xTo = qMax (xTo , points.at(i).posGraph().x()); yFrom = qMin (yFrom, points.at(i).posGraph().y()); yTo = qMax (yTo , points.at(i).posGraph().y()); } // Min and max of angles needs special processing since periodicity introduces some ambiguity. This is a noop for rectangular coordinates // and for polar coordinates when periodicity is not an issue adjustPolarAngleRanges (modelCoords, transformation, points, xFrom, xTo, yFrom); // Draw the bounding box as four sides. In polar plots the bottom side is zero-length, with pie shape resulting createSide (pointRadius, points, modelCoords, xFrom, yFrom, xFrom, yTo , transformation, m_sideLeft); createSide (pointRadius, points, modelCoords, xFrom, yTo , xTo , yTo , transformation, m_sideTop); createSide (pointRadius, points, modelCoords, xTo , yTo , xTo , yFrom, transformation, m_sideRight); createSide (pointRadius, points, modelCoords, xTo , yFrom, xFrom, yFrom, transformation, m_sideBottom); updateModelAxesChecker (modelAxesChecker); }
void box::createDL(){ boxDL11 = glGenLists(1); glNewList(boxDL11,GL_COMPILE); createSide(size1,size1); glEndList(); boxDL12 = glGenLists(1); glNewList(boxDL12,GL_COMPILE); createSide(size1,size2); glEndList(); }