COPASI API  4.40.278
CLCurve Class Reference

#include <CLCurve.h>

Inheritance diagram for CLCurve:
[legend]

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 CDataObject *, SBase * > &copasimodelmap) const
 
const std::vector< CLLineSegment > & getCurveSegments () const
 
std::vector< CLPointgetListOfPoints () const
 
size_t getNumCurveSegments () const
 
CLLineSegmentgetSegmentAt (size_t i)
 
const CLLineSegmentgetSegmentAt (size_t i) const
 
bool isContinuous () const
 
virtual void moveBy (const CLPoint &p)
 
bool operator== (const CLCurve &rhs) const
 
void scale (const double &scaleFactor)
 
 ~CLCurve ()
 
- Public Member Functions inherited from CLBase
 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< CLLineSegmentmvCurveSegments
 
- Protected Attributes inherited from CLBase
std::string mTag
 

Friends

std::ostream & operator<< (std::ostream &os, const CLCurve &c)
 

Constructor & Destructor Documentation

◆ CLCurve() [1/3]

CLCurve::CLCurve ( )
inline

◆ CLCurve() [2/3]

CLCurve::CLCurve ( const CLCurve c)

copy constructor (should make deep copy)

◆ CLCurve() [3/3]

CLCurve::CLCurve ( const Curve &  sbmlcurve)

constructor from libsbml object

References C_INT32, and mvCurveSegments.

◆ ~CLCurve()

CLCurve::~CLCurve ( )

Member Function Documentation

◆ addCurveSegment() [1/2]

void CLCurve::addCurveSegment ( const CLLineSegment ls)

add a copy of the line segment to the curve

References mvCurveSegments.

Referenced by CCopasiSpringLayout::finalizeState(), ListOfCurveSegmentsHandler::processEnd(), and CLLayoutRenderer::revert_curve().

◆ addCurveSegment() [2/2]

void CLCurve::addCurveSegment ( const CLLineSegment pLs)

add a copy of the line segment to the curve

References mvCurveSegments.

◆ calculateBoundingBox()

CLBoundingBox CLCurve::calculateBoundingBox ( ) const

Calculates the bounding box for the curve. Basepoints for cubic beziers are considered to belong inside the bounding box.

References CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLLineSegment::getEnd(), getNumCurveSegments(), getSegmentAt(), CLLineSegment::getStart(), CLPoint::getX(), CLPoint::getY(), CLLineSegment::isBezier(), and max.

Referenced by CLayout::calculateBoundingBox().

◆ clear()

void CLCurve::clear ( )

◆ exportToSBML()

void CLCurve::exportToSBML ( Curve *  c,
const std::map< const CDataObject *, SBase * > &  copasimodelmap 
) const

This method writes the information of the copasi layout object into the corresponding sbml object

References mvCurveSegments.

Referenced by CLGeneralGlyph::exportToSBML(), CLReactionGlyph::exportToSBML(), CLReferenceGlyph::exportToSBML(), and CLMetabReferenceGlyph::exportToSBML().

◆ getCurveSegments()

const std::vector<CLLineSegment>& CLCurve::getCurveSegments ( ) const
inline

◆ getListOfPoints()

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.

References isContinuous(), and mvCurveSegments.

◆ getNumCurveSegments()

◆ getSegmentAt() [1/2]

CLLineSegment* CLCurve::getSegmentAt ( size_t  i)
inline

References mvCurveSegments.

◆ getSegmentAt() [2/2]

◆ isContinuous()

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.

References mvCurveSegments.

Referenced by getListOfPoints().

◆ moveBy()

◆ operator==()

bool CLCurve::operator== ( const CLCurve rhs) const
inline

Two curves are supposed to be equal iff all there line segments including their order are equal

References mvCurveSegments.

◆ scale()

void CLCurve::scale ( const double &  scaleFactor)
inline

References mvCurveSegments.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CLCurve c 
)
friend

insert operator

Member Data Documentation

◆ mvCurveSegments


The documentation for this class was generated from the following files: