Loading...
Searching...
No Matches
Transformable.h
Go to the documentation of this file.
1
2//
3// SFML - Simple and Fast Multimedia Library
4// Copyright (C) 2007-2024 Laurent Gomila (laurent@sfml-dev.org)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#ifndef SFML_TRANSFORMABLE_H
26#define SFML_TRANSFORMABLE_H
27
29// Headers
32#include <SFML/Graphics/Types.h>
34#include <SFML/System/Vector2.h>
35
36
44
54
62
75
88
101
117
127
139
149
159
171
183
195
205
215
216
217#endif // SFML_TRANSFORMABLE_H
#define CSFML_GRAPHICS_API
struct sfTransformable sfTransformable
sfTransform sfTransformable_getTransform(const sfTransformable *transformable)
Get the combined transform of a transformable.
sfVector2f sfTransformable_getPosition(const sfTransformable *transformable)
Get the position of a transformable.
sfTransform sfTransformable_getInverseTransform(const sfTransformable *transformable)
Get the inverse of the combined transform of a transformable.
void sfTransformable_setOrigin(sfTransformable *transformable, sfVector2f origin)
Set the local origin of a transformable.
void sfTransformable_scale(sfTransformable *transformable, sfVector2f factors)
Scale a transformable.
void sfTransformable_destroy(sfTransformable *transformable)
Destroy an existing transformable.
void sfTransformable_rotate(sfTransformable *transformable, float angle)
Rotate a transformable.
void sfTransformable_setRotation(sfTransformable *transformable, float angle)
Set the orientation of a transformable.
void sfTransformable_setScale(sfTransformable *transformable, sfVector2f scale)
Set the scale factors of a transformable.
float sfTransformable_getRotation(const sfTransformable *transformable)
Get the orientation of a transformable.
sfVector2f sfTransformable_getOrigin(const sfTransformable *transformable)
Get the local origin of a transformable.
void sfTransformable_setPosition(sfTransformable *transformable, sfVector2f position)
Set the position of a transformable.
void sfTransformable_move(sfTransformable *transformable, sfVector2f offset)
Move a transformable by a given offset.
sfTransformable * sfTransformable_create(void)
Create a new transformable.
sfVector2f sfTransformable_getScale(const sfTransformable *transformable)
Get the current scale of a transformable.
sfTransformable * sfTransformable_copy(const sfTransformable *transformable)
Copy an existing transformable.
Encapsulate a 3x3 transform matrix.
Definition Transform.h:43
2-component vector of floats
Definition Vector2.h:61