|
libSBML C API
5.18.0
|
The LineSegment_t class consists of the mandatory attribute xsi:type and two child elements of type Point_t. One is called 'start' and represents the starting point of the line, the other is called 'end' and represents the endpoint of the line. The LineSegment_t class is also the base class for CubicBezier_t, which represent curved lines instead of straight ones.
Public Member Functions | |
| LineSegment_t * | LineSegment_clone (const LineSegment_t *ls) |
| LineSegment_t * | LineSegment_create (void) |
| Creates a LineSegment_t with the default SBML level, version, and package version, and both points set to (0.0,0.0,0.0). More... | |
| LineSegment_t * | LineSegment_createFrom (const LineSegment_t *temp) |
Creates a clone of temp, or creates a new empty LineSegment_t if temp is NULL. More... | |
| LineSegment_t * | LineSegment_createWithCoordinates (double x1, double y1, double z1, double x2, double y2, double z2) |
| Creates a LineSegment_t with the default SBML level, version, and package version, and with the given coordinates and returns the pointer. More... | |
| LineSegment_t * | LineSegment_createWithPoints (const Point_t *start, const Point_t *end) |
| Creates a LineSegment_t with the default SBML level, version, and package version, and with the given points and returns the pointer. More... | |
| void | LineSegment_free (LineSegment_t *ls) |
| Frees the memory for the line segment. More... | |
| Point_t * | LineSegment_getEnd (LineSegment_t *ls) |
| Returns the end point of the line. More... | |
| Point_t * | LineSegment_getStart (LineSegment_t *ls) |
| Returns the start point of the line. More... | |
| void | LineSegment_initDefaults (LineSegment_t *ls) |
| Does nothing since no defaults are defined for LineSegment_t. More... | |
| void | LineSegment_setEnd (LineSegment_t *ls, const Point_t *end) |
| Initializes the end point with a copy of the given Point_t structure. More... | |
| void | LineSegment_setStart (LineSegment_t *ls, const Point_t *start) |
| Initializes the start point with a copy of the given Point_t structure. More... | |
| LineSegment_t * LineSegment_clone | ( | const LineSegment_t * | ls | ) |
NULL if ls is NULL.| ls | the LineSegment_t structure. |
| LineSegment_t * LineSegment_create | ( | void | ) |
Creates a LineSegment_t with the default SBML level, version, and package version, and both points set to (0.0,0.0,0.0).
| LineSegment_t * LineSegment_createFrom | ( | const LineSegment_t * | temp | ) |
Creates a clone of temp, or creates a new empty LineSegment_t if temp is NULL.
| temp | the LineSegment_t structure to copy. |
| LineSegment_t * LineSegment_createWithCoordinates | ( | double | x1, |
| double | y1, | ||
| double | z1, | ||
| double | x2, | ||
| double | y2, | ||
| double | z2 | ||
| ) |
Creates a LineSegment_t with the default SBML level, version, and package version, and with the given coordinates and returns the pointer.
| x1 | the value of the x coordinate of the start Point_t. |
| y1 | the value of the y coordinate of the start Point_t. |
| z1 | the value of the z coordinate of the start Point_t. |
| x2 | the value of the x coordinate of the end Point_t. |
| y2 | the value of the y coordinate of the end Point_t. |
| z2 | the value of the z coordinate of the end Point_t. |
| LineSegment_t * LineSegment_createWithPoints | ( | const Point_t * | start, |
| const Point_t * | end | ||
| ) |
Creates a LineSegment_t with the default SBML level, version, and package version, and with the given points and returns the pointer.
| start | the Point_t at which the line segment starts. |
| end | the Point_t at which the line segment ends. |
| void LineSegment_free | ( | LineSegment_t * | ls | ) |
Frees the memory for the line segment.
| ls | the LineSegment_t structure. |
| Point_t * LineSegment_getEnd | ( | LineSegment_t * | ls | ) |
Returns the end point of the line.
| ls | the LineSegment_t structure. |
| Point_t * LineSegment_getStart | ( | LineSegment_t * | ls | ) |
Returns the start point of the line.
| ls | the LineSegment_t structure. |
| void LineSegment_initDefaults | ( | LineSegment_t * | ls | ) |
Does nothing since no defaults are defined for LineSegment_t.
| ls | the LineSegment_t structure. |
| void LineSegment_setEnd | ( | LineSegment_t * | ls, |
| const Point_t * | end | ||
| ) |
Initializes the end point with a copy of the given Point_t structure.
| ls | the LineSegment_t structure. |
| end | the Point_t at which the line segment ends. |
| void LineSegment_setStart | ( | LineSegment_t * | ls, |
| const Point_t * | start | ||
| ) |
Initializes the start point with a copy of the given Point_t structure.
| ls | the LineSegment_t structure. |
| start | the Point_t at which the line segment starts. |