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
19 namespace libetonyek
20{
21
22 struct IWORKGeometry;
23
29glm::dmat3 makeTransformation(const IWORKGeometry &geometry);
30
32 namespace 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: */
libetonyek_utils.h
libetonyek::IWORKToken::height
@ height
Definition IWORKToken.h:558
libetonyek::IWORKToken::scale
@ scale
Definition IWORKToken.h:607
libetonyek::IWORKToken::angle
@ angle
Definition IWORKToken.h:512
libetonyek::IWORKToken::center
@ center
Definition IWORKToken.h:661
libetonyek::IWORKToken::width
@ width
Definition IWORKToken.h:639
libetonyek::IWORKToken::geometry
@ geometry
Definition IWORKToken.h:236
libetonyek::KEY1Token::vertical
@ vertical
Definition KEY1Token.h:239
libetonyek::KEY1Token::horizontal
@ horizontal
Definition KEY1Token.h:223
libetonyek::transformations
Special transformation constructors.
Definition IWORKTransformation.cpp:48
libetonyek::transformations::flip
glm::dmat3 flip(const bool horizontal, const bool vertical)
Flip horizontally and/or vertically.
Definition IWORKTransformation.cpp:60
libetonyek::transformations::shear
glm::dmat3 shear(const double angleX, const double angleY)
Shear along x and/or y axis.
Definition IWORKTransformation.cpp:77
libetonyek::transformations::rotate
glm::dmat3 rotate(const double angle)
Rotate counterclockwise around origin.
Definition IWORKTransformation.cpp:65
libetonyek::transformations::translate
glm::dmat3 translate(const double offsetX, const double offsetY)
Translate along x and/or y axis.
Definition IWORKTransformation.cpp:83
libetonyek::transformations::origin
glm::dmat3 origin(const double width, const double height)
Translate from the center of viewport to the origin.
Definition IWORKTransformation.cpp:55
libetonyek
Definition IWORKBezierElement.cpp:21
libetonyek::makeTransformation
glm::dmat3 makeTransformation(const IWORKGeometry &geometry)
Create a transformation from a geometry.
Definition IWORKTransformation.cpp:19
libetonyek::IWORKGeometry
Definition IWORKTypes.h:62