libetonyek::transformations Namespace Reference documentation

Functions
libetonyek::transformations Namespace Reference

Special transformation constructors. More...

## Functions
glm::dmat3 | center (double width, double height)
| Translate to the center of viewport.
glm::dmat3 | origin (double width, double height)
| Translate from the center of viewport to the origin.
glm::dmat3 | flip (bool horizontal, bool vertical)
| Flip horizontally and/or vertically.
glm::dmat3 | rotate (double angle)
| Rotate counterclockwise around origin.
glm::dmat3 | scale (double ratioX, double ratioY)
| Scale along `x` and/or `y` axis.
glm::dmat3 | shear (double angleX, double angleY)
| Shear along `x` and/or `y` axis.
glm::dmat3 | translate (double offsetX, double offsetY)
| Translate along `x` and/or `y` axis.

## Detailed Description

Special transformation constructors.

## Function Documentation

## ◆ center()

glm::dmat3 libetonyek::transformations::center | ( | double | width,
|  | double | height )

Translate to the center of viewport.

- [in] width width of the viewport.
- [in] height height of the viewport.
  Returns
    the transformation

## ◆ flip()

glm::dmat3 libetonyek::transformations::flip | ( | bool | horizontal,
|  | bool | vertical )

Flip horizontally and/or vertically.

- [in] horizontal flip horizontally.
- [in] vertical flip vertically.
  Returns
    the transformation

Referenced by libetonyek::makeArrowPath(), libetonyek::makeDoubleArrowPath(), and libetonyek::makeTransformation().

## ◆ origin()

glm::dmat3 libetonyek::transformations::origin | ( | double | width,
|  | double | height )

Translate from the center of viewport to the origin.

This is inverse operation to center().

- [in] width width of the viewport.
- [in] height height of the viewport.
  Returns
    the transformation

Referenced by libetonyek::makeTransformation().

## ◆ rotate()

glm::dmat3 libetonyek::transformations::rotate | ( | double | angle | ) |

Rotate counterclockwise around origin.

- [in] angle rotation angle in radians. 0 is at the `x` axis on the right side.
  Returns
    the transformation

Referenced by libetonyek::makeStarPath(), and libetonyek::makeTransformation().

## ◆ scale()

glm::dmat3 libetonyek::transformations::scale | ( | double | ratioX,
|  | double | ratioY )

Scale along `x` and/or `y` axis.

- [in] ratioX scale ratio along `x` axis.
- [in] ratioY scale ratio along `y` axis.
  Returns
    the transformation

Referenced by libetonyek::IWAParser::parseDrawableShape().

## ◆ shear()

glm::dmat3 libetonyek::transformations::shear | ( | double | angleX,
|  | double | angleY )

Shear along `x` and/or `y` axis.

- [in] angleX shear angle along `x` axis.
- [in] angleY shear angle along `y` axis.
  Returns
    the transformation

Referenced by libetonyek::makeTransformation().

## ◆ translate()

glm::dmat3 libetonyek::transformations::translate | ( | double | offsetX,
|  | double | offsetY )

Translate along `x` and/or `y` axis.

- [in] offsetX translation offset along `x` axis.
- [in] offsetY translation offset along `y` axis.
  Returns
    the transformation

Referenced by center(), libetonyek::makeArrowPath(), libetonyek::makeCalloutPath(), libetonyek::makeDoubleArrowPath(), libetonyek::makePolygonPath(), libetonyek::makeRoundedRectanglePath(), libetonyek::makeStarPath(), libetonyek::makeTransformation(), and origin().