HighMap library (C++)
Loading...
Searching...
No Matches
texture_transform.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
11#pragma once
12
13#include <glm/vec2.hpp>
14
15namespace hmap
16{
17
18class Texture;
19
25void flip_lr(Texture &texture);
26
32void flip_ud(Texture &texture);
33
39void rot180(Texture &texture);
40
46void rot270(Texture &texture);
47
53void rot90(Texture &texture);
54
61void scale_uv(Texture &texture, glm::vec2 uv_scale);
62
69Texture transpose(const Texture &texture);
70
71} // namespace hmap
A class to represent a multi-channel texture using planar hmap::Array storage.
Definition texture.hpp:37
Definition opencv.hpp:20
void rot270(Texture &texture)
Rotate the texture by 270 degrees counterclockwise.
Definition texture_transform.cpp:56
void flip_ud(Texture &texture)
Flip the texture vertically (up/down).
Definition texture_transform.cpp:25
void rot90(Texture &texture)
Rotate the texture by 90 degrees counterclockwise.
Definition texture_transform.cpp:35
void rot180(Texture &texture)
Rotate the texture by 180 degrees.
Definition texture_transform.cpp:46
void scale_uv(Texture &texture, glm::vec2 uv_scale)
Scale the texture in UV space with wrapping boundary.
Definition texture_transform.cpp:67
Texture transpose(const Texture &texture)
Return the transposed texture.
Definition texture_transform.cpp:77
void flip_lr(Texture &texture)
Flip the texture horizontally (left/right).
Definition texture_transform.cpp:15