Smolgui
Immediate gui library based on SFML
Loading...
Searching...
No Matches
MeshFunctions.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <SFML/Graphics/Rect.hpp>
5#include <SFML/Graphics/Vertex.hpp>
6
7namespace sgui
8{
9using Mesh = std::array <sf::Vertex, 6>;
10
14void computeMesh (Mesh& mesh, const sf::FloatRect& box);
15
19void computeMeshTexture (Mesh& Mesh, const sf::IntRect& textureRect);
20
24void rotateMeshTexture (Mesh& mesh);
25
26} // namespace sgui
Definition Interpolation.h:16
void rotateMeshTexture(Mesh &mesh)
Rotate a mesh texture by 90°
Definition MeshFunctions.cpp:40
void computeMeshTexture(Mesh &mesh, const sf::IntRect &textureBox)
compute texture coordinates from a rect
Definition MeshFunctions.cpp:23
std::array< sf::Vertex, 6 > Mesh
Definition MeshFunctions.h:9
void computeMesh(Mesh &mesh, const sf::FloatRect &box)
Compute mesh quad coordinates.
Definition MeshFunctions.cpp:6