17 #include <sbml/packages/layout/sbml/Curve.h>
18 #include <sbml/packages/layout/sbml/CubicBezier.h>
24 mStart(*ls.getStart()),
31 const CubicBezier * cb =
dynamic_cast<const CubicBezier *
>(&ls);
54 const std::map<const CCopasiObject*, SBase*> & )
const
64 os <<
"[" << ls.
mStart <<
"->" << ls.
mEnd <<
"]";
76 mvCurveSegments(c.mvCurveSegments)
84 C_INT32 i, imax = sbmlcurve.getListOfCurveSegments()->size();
86 for (i = 0; i < imax; ++i)
88 const LineSegment* tmp
89 =
dynamic_cast<const LineSegment*
>(sbmlcurve.getListOfCurveSegments()->get(i));
123 for (i = 0; i < imax; ++i)
132 std::vector <CLPoint> ret;
140 for (i = 0; i < imax; ++i)
153 size_t i, imax = c->getListOfCurveSegments()->size();
155 for (i = 0; i < imax; ++i)
delete c->getListOfCurveSegments()->remove(0);
160 for (i = 0; i < imax; ++i)
164 mvCurveSegments[i].exportToSBMLBezier(c->createCubicBezier(), copasimodelmap);
168 mvCurveSegments[i].exportToSBMLLineSegment(c->createLineSegment(), copasimodelmap);
180 for (i = 0; i < imax; ++i)
193 for (i = 0; i < iMax; ++i)
229 for (i = 0; i < iMax; ++i)
235 xMin = (xMin < x) ? xMin : x;
236 yMin = (yMin < y) ? yMin : y;
237 xMax = (xMax > x) ? xMax : x;
238 yMax = (yMax > y) ? yMax : y;
242 xMin = (xMin < x) ? xMin : x;
243 yMin = (yMin < y) ? yMin : y;
244 xMax = (xMax > x) ? xMax : x;
245 yMax = (yMax > y) ? yMax : y;
252 xMin = (xMin < x) ? xMin : x;
253 yMin = (yMin < y) ? yMin : y;
254 xMax = (xMax > x) ? xMax : x;
255 yMax = (yMax > y) ? yMax : y;
259 xMin = (xMin < x) ? xMin : x;
260 yMin = (yMin < y) ? yMin : y;
261 xMax = (xMax > x) ? xMax : x;
262 yMax = (yMax > y) ? yMax : y;
CLBoundingBox calculateBoundingBox() const
void exportToSBML(Curve *c, const std::map< const CCopasiObject *, SBase * > &copasimodelmap) const
const std::vector< CLLineSegment > & getCurveSegments() const
void exportToSBMLLineSegment(LineSegment *l, const std::map< const CCopasiObject *, SBase * > &copasimodelmap) const
void exportToSBMLBezier(CubicBezier *c, const std::map< const CCopasiObject *, SBase * > &copasimodelmap) const
virtual void moveBy(const CLPoint &p)
const CLPoint & getBase1() const
const CLPoint & getBase2() const
const CLPoint & getEnd() const
std::ostream & operator<<(std::ostream &os, const CLLineSegment &ls)
const C_FLOAT64 & getX() const
void addCurveSegment(const CLLineSegment &ls)
std::vector< CLPoint > getListOfPoints() const
const C_FLOAT64 & getY() const
const CLLineSegment * getSegmentAt(size_t i) const
size_t getNumCurveSegments() const
virtual void moveBy(const CLPoint &p)
bool isContinuous() const
const CLPoint & getStart() const
std::vector< CLLineSegment > mvCurveSegments