MyGUI 3.4.1
MyGUI_GeometryUtility.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_GEOMETRY_UTILITY_H_
8#define MYGUI_GEOMETRY_UTILITY_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
12
13namespace MyGUI
14{
15
16 typedef std::vector<FloatPoint> VectorFloatPoint;
17
18 namespace geometry_utility
19 {
20 VectorFloatPoint cropPolygon(FloatPoint* _baseVerticiesPos, size_t _size, const IntCoord& _cropRectangle);
21
23 void cropPolygonSide(VectorFloatPoint& _verticies, int _sideCoord, Side _side);
24
25 // get point position relative to rectangle
26 FloatPoint getPositionInsideRect(const FloatPoint& _point, const FloatPoint& _corner0, const FloatPoint& _corner1, const FloatPoint& _corner2);
27
28 FloatPoint getUVFromPositionInsideRect(const FloatPoint& _point, const FloatPoint& _v0, const FloatPoint& _v1, const FloatPoint& _baseUV);
29
30 } // namespace geometry_utility
31
32} // namespace MyGUI
33
34#endif // MYGUI_GEOMETRY_UTILITY_H_
void cropPolygonSide(VectorFloatPoint &_verticies, int _sideCoord, Side _side)
FloatPoint getUVFromPositionInsideRect(const FloatPoint &_point, const FloatPoint &_v0, const FloatPoint &_v1, const FloatPoint &_baseUV)
FloatPoint getPositionInsideRect(const FloatPoint &_point, const FloatPoint &_corner0, const FloatPoint &_corner1, const FloatPoint &_corner2)
VectorFloatPoint cropPolygon(FloatPoint *_baseVerticiesPos, size_t _size, const IntCoord &_cropRectangle)
std::vector< FloatPoint > VectorFloatPoint