libSBML C API  5.18.0
Point_t Class Reference

Detailed Description

layout Representation of a point.

A point is specified via the required attributes 'x', 'y' and an optional attribute 'z', all of which are of type double. If the attribute z is not specified, the object is a two dimensional object. The Point_t class also has an optional attribute id of type SId. While not used in the “layout” package, it can be used by programs to refer to the elements.

Public Member Functions

Point_tPoint_clone (const Point_t *p)
 
Point_tPoint_create (void)
 Creates a new point with the coordinates (0.0,0.0,0.0). More...
 
Point_tPoint_createWithCoordinates (double x, double y, double z)
 Creates a new Point_t with the given coordinates. More...
 
void Point_free (Point_t *p)
 Frees all memory for the Point_t. More...
 
double Point_getXOffset (const Point_t *p)
 Gets the x offset. More...
 
double Point_getYOffset (const Point_t *p)
 Gets the y offset. More...
 
double Point_getZOffset (const Point_t *p)
 Gets the z offset. More...
 
void Point_initDefaults (Point_t *p)
 Sets the Z offset to 0.0. More...
 
void Point_setOffsets (Point_t *p, double x, double y, double z)
 Sets the coordinates to the given values. More...
 
void Point_setX (Point_t *p, double x)
 Sets the x offset. More...
 
void Point_setXOffset (Point_t *p, double x)
 Sets the x offset. More...
 
void Point_setY (Point_t *p, double y)
 Sets the y offset. More...
 
void Point_setYOffset (Point_t *p, double y)
 Sets the y offset. More...
 
void Point_setZ (Point_t *p, double z)
 Sets the z offset. More...
 
void Point_setZOffset (Point_t *p, double z)
 Sets the z offset. More...
 
double Point_x (const Point_t *p)
 Gets the x offset. More...
 
double Point_y (const Point_t *p)
 Gets the y offset. More...
 
double Point_z (const Point_t *p)
 Gets the z offset. More...
 

Member Function Documentation

Point_t * Point_clone ( const Point_t p)
Returns
a (deep) copy of this Point_t.
Parameters
pthe Point_t structure.
Point_t * Point_create ( void  )

Creates a new point with the coordinates (0.0,0.0,0.0).

Point_t * Point_createWithCoordinates ( double  x,
double  y,
double  z 
)

Creates a new Point_t with the given coordinates.

Parameters
xthe value of the x coordinate.
ythe value of the y coordinate.
zthe value of the z coordinate.
void Point_free ( Point_t p)

Frees all memory for the Point_t.

Parameters
pthe Point_t structure.
double Point_getXOffset ( const Point_t p)

Gets the x offset.

Parameters
pthe Point_t structure.
double Point_getYOffset ( const Point_t p)

Gets the y offset.

Parameters
pthe Point_t structure.
double Point_getZOffset ( const Point_t p)

Gets the z offset.

Parameters
pthe Point_t structure.
void Point_initDefaults ( Point_t p)

Sets the Z offset to 0.0.

Parameters
pthe Point_t structure.
void Point_setOffsets ( Point_t p,
double  x,
double  y,
double  z 
)

Sets the coordinates to the given values.

Parameters
pthe Point_t structure.
xthe value of the x coordinate.
ythe value of the y coordinate.
zthe value of the z coordinate.
void Point_setX ( Point_t p,
double  x 
)

Sets the x offset.

Parameters
pthe Point_t structure.
xthe value of the x coordinate.
void Point_setXOffset ( Point_t p,
double  x 
)

Sets the x offset.

Parameters
pthe Point_t structure.
xthe value of the x offset.
void Point_setY ( Point_t p,
double  y 
)

Sets the y offset.

Parameters
pthe Point_t structure.
ythe value of the y coordinate.
void Point_setYOffset ( Point_t p,
double  y 
)

Sets the y offset.

Parameters
pthe Point_t structure.
ythe value of the y offset.
void Point_setZ ( Point_t p,
double  z 
)

Sets the z offset.

Parameters
pthe Point_t structure.
zthe value of the z coordinate.
void Point_setZOffset ( Point_t p,
double  z 
)

Sets the z offset.

Parameters
pthe Point_t structure.
zthe value of the z offset.
double Point_x ( const Point_t p)

Gets the x offset.

Parameters
pthe Point_t structure.
double Point_y ( const Point_t p)

Gets the y offset.

Parameters
pthe Point_t structure.
double Point_z ( const Point_t p)

Gets the z offset.

Parameters
pthe Point_t structure.