COPASI API
4.16.103
|
#include <CLCurve.h>
Public Member Functions | |
void | addCurveSegment (const CLLineSegment &ls) |
void | addCurveSegment (const CLLineSegment *pLs) |
CLBoundingBox | calculateBoundingBox () const |
CLCurve () | |
CLCurve (const CLCurve &c) | |
CLCurve (const Curve &sbmlcurve) | |
void | clear () |
void | exportToSBML (Curve *c, const std::map< const CCopasiObject *, SBase * > &copasimodelmap) const |
const std::vector < CLLineSegment > & | getCurveSegments () const |
std::vector< CLPoint > | getListOfPoints () const |
size_t | getNumCurveSegments () const |
const CLLineSegment * | getSegmentAt (size_t i) const |
CLLineSegment * | getSegmentAt (size_t i) |
bool | isContinuous () const |
virtual void | moveBy (const CLPoint &p) |
bool | operator== (const CLCurve &rhs) const |
void | scale (const double &scaleFactor) |
~CLCurve () | |
![]() | |
CLBase () | |
CLBase (const CLBase &b) | |
CLBase (const SBase &) | |
const std::string & | getTag () const |
bool | hasTag () const |
void | setTag (const std::string &tag) |
virtual | ~CLBase () |
Protected Attributes | |
std::vector< CLLineSegment > | mvCurveSegments |
![]() | |
std::string | mTag |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CLCurve &c) |
CLCurve::CLCurve | ( | const CLCurve & | c | ) |
CLCurve::CLCurve | ( | const Curve & | sbmlcurve | ) |
constructor from libsbml object
Definition at line 79 of file CLCurve.cpp.
References C_INT32, and mvCurveSegments.
CLCurve::~CLCurve | ( | ) |
Definition at line 98 of file CLCurve.cpp.
void CLCurve::addCurveSegment | ( | const CLLineSegment & | ls | ) |
add a copy of the line segment to the curve
Definition at line 101 of file CLCurve.cpp.
References mvCurveSegments.
Referenced by CCopasiXMLParser::CurveElement::end(), CCopasiSpringLayout::finalizeState(), and CLLayoutRenderer::revert_curve().
void CLCurve::addCurveSegment | ( | const CLLineSegment * | pLs | ) |
add a copy of the line segment to the curve
Definition at line 106 of file CLCurve.cpp.
References mvCurveSegments.
CLBoundingBox CLCurve::calculateBoundingBox | ( | ) | const |
Calculates the bounding box for the curve. Basepoints for cubic beziers are considered to belong inside the bounding box.
Definition at line 218 of file CLCurve.cpp.
References CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLLineSegment::getEnd(), getNumCurveSegments(), getSegmentAt(), CLLineSegment::getStart(), CLPoint::getX(), CLPoint::getY(), CLLineSegment::isBezier(), and max.
Referenced by CLayout::calculateBoundingBox().
void CLCurve::clear | ( | ) |
Definition at line 112 of file CLCurve.cpp.
References mvCurveSegments.
Referenced by CCopasiSpringLayout::finalizeState(), and CCopasiXMLParser::CurveElement::start().
void CLCurve::exportToSBML | ( | Curve * | c, |
const std::map< const CCopasiObject *, SBase * > & | copasimodelmap | ||
) | const |
This method writes the information of the copasi layout object into the corresponding sbml object
Definition at line 148 of file CLCurve.cpp.
References mvCurveSegments.
Referenced by CLMetabReferenceGlyph::exportToSBML(), CLGeneralGlyph::exportToSBML(), and CLReactionGlyph::exportToSBML().
|
inline |
Definition at line 154 of file CLCurve.h.
References mvCurveSegments.
Referenced by CCopasiSpringLayout::addReactionVariables(), CQGLNetworkPainter::createGraph(), CQGLNetworkPainter::drawEdge(), operator<<(), and CCopasiXML::saveCurve().
std::vector< CLPoint > CLCurve::getListOfPoints | ( | ) | const |
This method should only be called if isContinuous() is true. It returns the curve as a list of points rather than a list of line segments.
Definition at line 130 of file CLCurve.cpp.
References isContinuous(), and mvCurveSegments.
Referenced by CQGLNetworkPainter::checkCurve(), and fillItemFromCurve().
|
inline |
Definition at line 168 of file CLCurve.h.
References mvCurveSegments.
Referenced by CQLayoutScene::addGlyph(), CCopasiSpringLayout::addReactionVariables(), CLayout::calculateBoundingBox(), calculateBoundingBox(), CQConnectionGraphicsItem::CQConnectionGraphicsItem(), CLLayoutRenderer::draw_curve(), CLLayoutRenderer::draw_layout(), CQGLNetworkPainter::drawEdge(), fillItemFromCurve(), CCopasiSpringLayout::finalizeState(), CLLayoutRenderer::getCurveBoundingBox(), CLLayoutRenderer::getObjectsAt(), CLLayoutRenderer::getObjectsInBoundingBox(), CQConnectionGraphicsItem::getPath(), CLLayoutRenderer::is_curve_visible(), CQGLLayoutPainter::mouseMoveEvent(), CLLayoutRenderer::move_curve_object(), CLLayoutRenderer::move_reaction_glyph(), CLLayoutRenderer::move_selection(), CLLayoutRenderer::move_species_reference_glyph(), moveBy(), compareGraphicalObjectsBySize::operator()(), operator<<(), CLLayoutRenderer::revert_curve(), CCopasiXML::saveCurve(), CCopasiXML::saveLayoutList(), CQGLNetworkPainter::setNodeSize(), CLLayoutRenderer::update_associations(), CQGLLayoutPainter::update_status_and_cursor(), and CLLayoutRenderer::update_textures_and_colors().
|
inline |
Definition at line 156 of file CLCurve.h.
References mvCurveSegments.
Referenced by calculateBoundingBox(), CLLayoutRenderer::draw_curve(), fillItemFromCurve(), CLLayoutRenderer::getCurveBoundingBox(), CLLayoutRenderer::getObjectsAt(), CQConnectionGraphicsItem::getPath(), CLLayoutRenderer::is_curve_visible(), CQGLLayoutPainter::mouseMoveEvent(), CLLayoutRenderer::move_curve_object(), moveBy(), CLLayoutRenderer::revert_curve(), CQGLNetworkPainter::setNodeSize(), CLLayoutRenderer::update_associations(), and CQGLLayoutPainter::update_status_and_cursor().
|
inline |
bool CLCurve::isContinuous | ( | ) | const |
this method tells whether the curve is a continuous set of line segments, i.e. if the end point of one line segment is identical to the starting point of the following one.
Definition at line 117 of file CLCurve.cpp.
References mvCurveSegments.
Referenced by fillItemFromCurve(), and getListOfPoints().
Reimplemented from CLBase.
Definition at line 187 of file CLCurve.cpp.
References CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLLineSegment::getEnd(), getNumCurveSegments(), getSegmentAt(), CLLineSegment::getStart(), CLLineSegment::isBezier(), and CLPoint::moveBy().
Referenced by CLGlyphWithCurve::moveBy().
|
inline |
Two curves are supposed to be equal iff all there line segments including their order are equal
Definition at line 201 of file CLCurve.h.
References mvCurveSegments.
|
inline |
|
friend |
insert operator
Definition at line 173 of file CLCurve.cpp.
|
protected |
Definition at line 135 of file CLCurve.h.
Referenced by addCurveSegment(), CLCurve(), clear(), exportToSBML(), getCurveSegments(), getListOfPoints(), getNumCurveSegments(), getSegmentAt(), CGraphCurve::invertOrderOfPoints(), isContinuous(), operator==(), CGraphCurve::scale(), and scale().