Mesh/Geometry structures#
-
template<typename T>
struct Point2D# Trivially copyable 2D Point implementation that provides basic arithmetic operators as well as bounds-checked template access to the arguments
Public Functions
-
Point2D() = default#
-
template<typename U = T>
inline U x_checked()# Bounds-checked access to the x coordinate of the point, throws error if value would exceed numeric limit.
-
template<typename U = T>
inline U y_checked()# Bounds-checked access to the y coordinate of the point, throws error if value would exceed numeric limit.
-
Point2D() = default#
-
template<typename T>
struct Vertex# Extension of a Point2D to additionally describe the UV coordinate of a given point.
-
template<typename T, size_t _Size>
struct Face#
-
template<typename T>
struct QuadMesh# Mesh class for 2D Geometry representation, implemented with an Octree structure accelerating lookups and traversals. This currently only supports quadrilateral meshes and is very specific to the needs of the PhotoshopAPI. It is therefore recommended to use a more generic mesh library if further operations are wanted.
Public Functions
-
QuadMesh() = default#
-
inline QuadMesh(const std::vector<Point2D<T>> &points, size_t x_divisions, size_t y_divisions)#
Generate a QuadMesh from a flat vector of points. These points must be in scanline order.
-
inline QuadMesh(const std::vector<Vertex<T>> &vertices, size_t x_divisions, size_t y_divisions)#
Generate a QuadMesh from a flat vector of vertices. These points must be in scanline order.
-
inline void vertices(std::vector<Vertex<T>> &_vertices)#
Update the vertices of the mesh, the _vertices parameter must have the same amount of vertices as the mesh as this method is only supposed to represent transformations applied to the vertices not a complete rebuild of the structure.
If you wish to do that please re-initialize the mesh.
-
QuadMesh() = default#