IWORKTransformation.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libetonyek project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef IWORKTRANSFORMATION_H_INCLUDED
00011 #define IWORKTRANSFORMATION_H_INCLUDED
00012 
00013 #include <cassert>
00014 
00015 #include <glm/glm.hpp>
00016 
00017 #include "libetonyek_utils.h"
00018 
00019 namespace libetonyek
00020 {
00021 
00022 struct IWORKGeometry;
00023 
00029 glm::dmat3 makeTransformation(const IWORKGeometry &geometry);
00030 
00032 namespace transformations
00033 {
00034 
00041 glm::dmat3 center(double width, double height);
00042 
00051 glm::dmat3 origin(double width, double height);
00052 
00059 glm::dmat3 flip(bool horizontal, bool vertical);
00060 
00067 glm::dmat3 rotate(double angle);
00068 
00075 glm::dmat3 scale(double ratioX, double ratioY);
00076 
00083 glm::dmat3 shear(double angleX, double angleY);
00084 
00091 glm::dmat3 translate(double offsetX, double offsetY);
00092 
00093 }
00094 
00095 }
00096 
00097 #endif // IWORKTRANSFORMATION_H_INCLUDED
00098 
00099 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */