MyGUI: MyGUI_GeometryUtility.h Source File

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

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
22 enum Side {Left, Right, Top, Bottom};
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_
MyGUI_Prerequest.h
MyGUI_Types.h
MyGUI::geometry_utility::cropPolygonSide
void cropPolygonSide(VectorFloatPoint &_verticies, int _sideCoord, Side _side)
Definition MyGUI_GeometryUtility.cpp:33
MyGUI::geometry_utility::getUVFromPositionInsideRect
FloatPoint getUVFromPositionInsideRect(const FloatPoint &_point, const FloatPoint &_v0, const FloatPoint &_v1, const FloatPoint &_baseUV)
Definition MyGUI_GeometryUtility.cpp:105
MyGUI::geometry_utility::getPositionInsideRect
FloatPoint getPositionInsideRect(const FloatPoint &_point, const FloatPoint &_corner0, const FloatPoint &_corner1, const FloatPoint &_corner2)
Definition MyGUI_GeometryUtility.cpp:89
MyGUI::geometry_utility::Side
Side
Definition MyGUI_GeometryUtility.h:22
MyGUI::geometry_utility::Top
@ Top
Definition MyGUI_GeometryUtility.h:22
MyGUI::geometry_utility::Bottom
@ Bottom
Definition MyGUI_GeometryUtility.h:22
MyGUI::geometry_utility::Left
@ Left
Definition MyGUI_GeometryUtility.h:22
MyGUI::geometry_utility::Right
@ Right
Definition MyGUI_GeometryUtility.h:22
MyGUI::geometry_utility::cropPolygon
VectorFloatPoint cropPolygon(FloatPoint *_baseVerticiesPos, size_t _size, const IntCoord &_cropRectangle)
Definition MyGUI_GeometryUtility.cpp:16
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorFloatPoint
std::vector< FloatPoint > VectorFloatPoint
Definition MyGUI_GeometryUtility.h:16
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< float >