libSBML C API  5.18.0
Dimensions_t Class Reference

Detailed Description

layout Spatial dimensions of a 2D or 3D shape.

A dimension is specified via the required attributes width, height, and an optional attribute depth, all of which are of type double. If the attribute depth is not specified, the object is a two dimensional object. The width attribute of Dimensions_t specifies the size of the object in the direction of the positive x axis, the height attribute specifies the size of the object along the positive y axis and the depth attribute specifies the size of the object along the positive z axis. All sizes for Dimensions_t objects are positive values, and so the attributes are not allowed to take negative values. The Dimensions_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

Dimensions_tDimensions_clone (const Dimensions_t *d)
 
Dimensions_tDimensions_create ()
 Creates a new Dimensions_t structure with all sizes set to 0.0. More...
 
Dimensions_tDimensions_createWithSize (double w, double h, double d)
 Creates a new Dimensions_t structure with the given sizes. More...
 
double Dimensions_depth (const Dimensions_t *d)
 Returns the depth. More...
 
void Dimensions_free (Dimensions_t *d)
 Frees memory taken up by the Dimensions_t structure. More...
 
double Dimensions_getDepth (const Dimensions_t *d)
 Returns the depth. More...
 
double Dimensions_getHeight (const Dimensions_t *d)
 Returns the height. More...
 
double Dimensions_getWidth (const Dimensions_t *d)
 Returns the width. More...
 
double Dimensions_height (const Dimensions_t *d)
 Returns the height. More...
 
void Dimensions_initDefaults (Dimensions_t *d)
 Sets the depth to 0.0. More...
 
void Dimensions_setBounds (Dimensions_t *d, double width, double height, double depth)
 Sets all sizes of the Dimensions_t structure to the given values. More...
 
void Dimensions_setDepth (Dimensions_t *d, double depth)
 Sets the depth to the given value. More...
 
void Dimensions_setHeight (Dimensions_t *d, double height)
 Sets the height to the given value. More...
 
void Dimensions_setWidth (Dimensions_t *d, double width)
 Sets the width to the given value. More...
 
double Dimensions_width (const Dimensions_t *d)
 Returns the width. More...
 

Member Function Documentation

Dimensions_t * Dimensions_clone ( const Dimensions_t d)
Returns
a (deep) copy of this Dimensions_t.
Parameters
dthe Dimensions_t structure.
Dimensions_t * Dimensions_create ( )

Creates a new Dimensions_t structure with all sizes set to 0.0.

Dimensions_t * Dimensions_createWithSize ( double  w,
double  h,
double  d 
)

Creates a new Dimensions_t structure with the given sizes.

Parameters
wthe width of the created Dimensions_t.
hthe height of the created Dimensions_t.
dthe depth of the created Dimensions_t.
double Dimensions_depth ( const Dimensions_t d)

Returns the depth.

Parameters
dthe Dimensions_t structure.
void Dimensions_free ( Dimensions_t d)

Frees memory taken up by the Dimensions_t structure.

Parameters
dthe Dimensions_t structure.
double Dimensions_getDepth ( const Dimensions_t d)

Returns the depth.

Parameters
dthe Dimensions_t structure.
double Dimensions_getHeight ( const Dimensions_t d)

Returns the height.

Parameters
dthe Dimensions_t structure.
double Dimensions_getWidth ( const Dimensions_t d)

Returns the width.

Parameters
dthe Dimensions_t structure.
double Dimensions_height ( const Dimensions_t d)

Returns the height.

Parameters
dthe Dimensions_t structure.
void Dimensions_initDefaults ( Dimensions_t d)

Sets the depth to 0.0.

Parameters
dthe Dimensions_t structure.
void Dimensions_setBounds ( Dimensions_t d,
double  width,
double  height,
double  depth 
)

Sets all sizes of the Dimensions_t structure to the given values.

Parameters
dthe Dimensions_t structure.
widththe value to use for the width of the Dimensions_t.
heightthe value to use for the height of the Dimensions_t.
depththe value to use for the depth of the Dimensions_t.
void Dimensions_setDepth ( Dimensions_t d,
double  depth 
)

Sets the depth to the given value.

Parameters
dthe Dimensions_t structure.
depththe value to use for the depth of the Dimensions_t.
void Dimensions_setHeight ( Dimensions_t d,
double  height 
)

Sets the height to the given value.

Parameters
dthe Dimensions_t structure.
heightthe value to use for the height of the Dimensions_t.
void Dimensions_setWidth ( Dimensions_t d,
double  width 
)

Sets the width to the given value.

Parameters
dthe Dimensions_t structure.
widththe value to use for the width of the Dimensions_t.
double Dimensions_width ( const Dimensions_t d)

Returns the width.

Parameters
dthe Dimensions_t structure.