IWORKTransformation.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is part of the libetonyek project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef IWORKTRANSFORMATION_H_INCLUDED
11#define IWORKTRANSFORMATION_H_INCLUDED
12
13#include <cassert>
14
15#include <glm/glm.hpp>
16
17#include "libetonyek_utils.h"
18
19namespace libetonyek
20{
21
22struct IWORKGeometry;
23
29glm::dmat3 makeTransformation(const IWORKGeometry &geometry);
30
32namespace transformations
33{
34
41glm::dmat3 center(double width, double height);
42
51glm::dmat3 origin(double width, double height);
52
59glm::dmat3 flip(bool horizontal, bool vertical);
60
67glm::dmat3 rotate(double angle);
68
75glm::dmat3 scale(double ratioX, double ratioY);
76
83glm::dmat3 shear(double angleX, double angleY);
84
91glm::dmat3 translate(double offsetX, double offsetY);
92
93}
94
95}
96
97#endif // IWORKTRANSFORMATION_H_INCLUDED
98
99/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
@ height
Definition IWORKToken.h:558
@ scale
Definition IWORKToken.h:607
@ angle
Definition IWORKToken.h:512
@ center
Definition IWORKToken.h:661
@ width
Definition IWORKToken.h:639
@ geometry
Definition IWORKToken.h:236
@ vertical
Definition KEY1Token.h:239
@ horizontal
Definition KEY1Token.h:223
glm::dmat3 flip(const bool horizontal, const bool vertical)
Flip horizontally and/or vertically.
Definition IWORKTransformation.cpp:60
glm::dmat3 shear(const double angleX, const double angleY)
Shear along x and/or y axis.
Definition IWORKTransformation.cpp:77
glm::dmat3 rotate(const double angle)
Rotate counterclockwise around origin.
Definition IWORKTransformation.cpp:65
glm::dmat3 translate(const double offsetX, const double offsetY)
Translate along x and/or y axis.
Definition IWORKTransformation.cpp:83
glm::dmat3 origin(const double width, const double height)
Translate from the center of viewport to the origin.
Definition IWORKTransformation.cpp:55
Definition IWORKBezierElement.cpp:21
glm::dmat3 makeTransformation(const IWORKGeometry &geometry)
Create a transformation from a geometry.
Definition IWORKTransformation.cpp:19

Generated for libetonyek by doxygen 1.12.0