SqueezeBrains SDK 1.13
Geometry

Definitions of geometric entities. More...

Collaboration diagram for Geometry:

Data Structures

struct  sb_t_point
 Represents an ordered pair of integer x and y coordinates that defines a point in a two-dimensional plane. More...
 
struct  sb_t_point2d_f
 Represents an ordered pair of float x and y coordinates that defines a point in a two-dimensional plane. More...
 
struct  sb_t_size
 Represents an ordered pair of integer x and y length that defines a rectangle in a two-dimensional plane. More...
 
struct  sb_t_size_flt
 Represents an ordered pair of float x and y length that defines a rectangle in a two-dimensional plane. More...
 
struct  sb_t_range
 Represents an ordered pair of 32 bits signed integer minimum and maximum values that defines a range. More...
 
struct  sb_t_range_flt
 Represents an ordered pair of float minimum and maximum values that defines a range. More...
 
struct  sb_t_rect
 Defines the position and size of a rectangle in a two-dimensional plane. More...
 

Functions

SB_INLINE sb_t_point sb_point (int x, int y)
 Inline constructor of structure sb_t_point. More...
 
SB_INLINE sb_t_point2d_f sb_point2d_f (float x, float y)
 Inline constructor of structure sb_t_point2d_f. More...
 
SB_INLINE sb_t_size sb_size (int width, int height)
 Inline constructor of structure sb_t_size. More...
 
SB_INLINE sb_t_size_flt sb_size_flt (float width, float height)
 Inline constructor of structure sb_t_size_flt. More...
 
SB_INLINE sb_t_range sb_range (int min, int max)
 Inline constructor of structure sb_t_range. More...
 
SB_INLINE sb_t_range_flt sb_range_flt (float min, float max)
 Inline constructor of structure sb_t_range_flt. More...
 
SB_INLINE sb_t_rect sb_rect (int x, int y, int width, int height)
 Inline constructor of structure sb_t_rect. More...
 
sb_t_err sb_polyline_resize (sb_t_point2d_f *points, int size, sb_t_point2d_f center, float angle, float offset)
 Resize a polyline with respect of a center and an angle. More...
 

Detailed Description

Definitions of geometric entities.

Function Documentation

◆ sb_point()

SB_INLINE sb_t_point sb_point ( int  x,
int  y 
)

Inline constructor of structure sb_t_point.

Parameters
[in]xabscissa of the point
[in]yordinate of the point
Returns
The structure sb_t_point

Definition at line 5832 of file sb.h.

◆ sb_point2d_f()

SB_INLINE sb_t_point2d_f sb_point2d_f ( float  x,
float  y 
)

Inline constructor of structure sb_t_point2d_f.

Parameters
[in]xabscissa of the point
[in]yordinate of the point
Returns
The structure sb_t_point

Definition at line 5846 of file sb.h.

◆ sb_polyline_resize()

sb_t_err sb_polyline_resize ( sb_t_point2d_f points,
int  size,
sb_t_point2d_f  center,
float  angle,
float  offset 
)

Resize a polyline with respect of a center and an angle.

Parameters
[in,out]pointsPolyline points array
[in]sizeNumber of elements of the array points
[in]centerCentre of the resize
[in]angleResizing angle, positive clockwise.
[in]offsetValue, in pixel, of the resizing. If positive the polyline will be enlarged, vice versa it will be reduced.
Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

◆ sb_range()

SB_INLINE sb_t_range sb_range ( int  min,
int  max 
)

Inline constructor of structure sb_t_range.

Parameters
[in]minminimum value
[in]maxmaximum value
Returns
The structure sb_t_size

Definition at line 5888 of file sb.h.

◆ sb_range_flt()

SB_INLINE sb_t_range_flt sb_range_flt ( float  min,
float  max 
)

Inline constructor of structure sb_t_range_flt.

Parameters
[in]minminimum value
[in]maxmaximum value
Returns
The structure sb_t_size

Definition at line 5902 of file sb.h.

◆ sb_rect()

SB_INLINE sb_t_rect sb_rect ( int  x,
int  y,
int  width,
int  height 
)

Inline constructor of structure sb_t_rect.

Parameters
[in]xx coordinate of the upper left corner of the rectangle
[in]yy coordinate of the upper left corner of the rectangle
[in]widthwidth of the rectangle
[in]heightheight of the rectangle
Returns
The structure sb_rect

Definition at line 5918 of file sb.h.

◆ sb_size()

SB_INLINE sb_t_size sb_size ( int  width,
int  height 
)

Inline constructor of structure sb_t_size.

Parameters
[in]widthwidth
[in]heightheight
Returns
The structure sb_t_size

Definition at line 5860 of file sb.h.

◆ sb_size_flt()

SB_INLINE sb_t_size_flt sb_size_flt ( float  width,
float  height 
)

Inline constructor of structure sb_t_size_flt.

Parameters
[in]widthwidth
[in]heightheight
Returns
The structure sb_t_size_flt

Definition at line 5874 of file sb.h.