CSFML
include
SFML
Graphics
Transformable.h
Go to the documentation of this file.
1
//
3
// SFML - Simple and Fast Multimedia Library
4
// Copyright (C) 2007-2015 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
31
#include <
SFML/Graphics/Export.h
>
32
#include <
SFML/Graphics/Types.h
>
33
#include <
SFML/Graphics/Transform.h
>
34
#include <
SFML/System/Vector2.h
>
35
36
43
CSFML_GRAPHICS_API
sfTransformable
*
sfTransformable_create
(
void
);
44
53
CSFML_GRAPHICS_API
sfTransformable
*
sfTransformable_copy
(
const
sfTransformable
* transformable);
54
61
CSFML_GRAPHICS_API
void
sfTransformable_destroy
(
sfTransformable
* transformable);
62
74
CSFML_GRAPHICS_API
void
sfTransformable_setPosition
(
sfTransformable
* transformable,
sfVector2f
position);
75
87
CSFML_GRAPHICS_API
void
sfTransformable_setRotation
(
sfTransformable
* transformable,
float
angle);
88
100
CSFML_GRAPHICS_API
void
sfTransformable_setScale
(
sfTransformable
* transformable,
sfVector2f
scale);
101
116
CSFML_GRAPHICS_API
void
sfTransformable_setOrigin
(
sfTransformable
* transformable,
sfVector2f
origin);
117
126
CSFML_GRAPHICS_API
sfVector2f
sfTransformable_getPosition
(
const
sfTransformable
* transformable);
127
138
CSFML_GRAPHICS_API
float
sfTransformable_getRotation
(
const
sfTransformable
* transformable);
139
148
CSFML_GRAPHICS_API
sfVector2f
sfTransformable_getScale
(
const
sfTransformable
* transformable);
149
158
CSFML_GRAPHICS_API
sfVector2f
sfTransformable_getOrigin
(
const
sfTransformable
* transformable);
159
170
CSFML_GRAPHICS_API
void
sfTransformable_move
(
sfTransformable
* transformable,
sfVector2f
offset);
171
182
CSFML_GRAPHICS_API
void
sfTransformable_rotate
(
sfTransformable
* transformable,
float
angle);
183
194
CSFML_GRAPHICS_API
void
sfTransformable_scale
(
sfTransformable
* transformable,
sfVector2f
factors);
195
204
CSFML_GRAPHICS_API
sfTransform
sfTransformable_getTransform
(
const
sfTransformable
* transformable);
205
214
CSFML_GRAPHICS_API
sfTransform
sfTransformable_getInverseTransform
(
const
sfTransformable
* transformable);
215
216
217
#endif // SFML_TRANSFORMABLE_H
CSFML_GRAPHICS_API
#define CSFML_GRAPHICS_API
Definition:
Graphics/Export.h:43
sfTransformable_getPosition
CSFML_GRAPHICS_API sfVector2f sfTransformable_getPosition(const sfTransformable *transformable)
Get the position of a transformable.
sfTransformable_getInverseTransform
CSFML_GRAPHICS_API sfTransform sfTransformable_getInverseTransform(const sfTransformable *transformable)
Get the inverse of the combined transform of a transformable.
sfTransformable_create
CSFML_GRAPHICS_API sfTransformable * sfTransformable_create(void)
Create a new transformable.
Export.h
sfTransformable_getScale
CSFML_GRAPHICS_API sfVector2f sfTransformable_getScale(const sfTransformable *transformable)
Get the current scale of a transformable.
Transform.h
sfTransformable_move
CSFML_GRAPHICS_API void sfTransformable_move(sfTransformable *transformable, sfVector2f offset)
Move a transformable by a given offset.
sfTransformable_setScale
CSFML_GRAPHICS_API void sfTransformable_setScale(sfTransformable *transformable, sfVector2f scale)
Set the scale factors of a transformable.
Vector2.h
sfTransformable_setPosition
CSFML_GRAPHICS_API void sfTransformable_setPosition(sfTransformable *transformable, sfVector2f position)
Set the position of a transformable.
sfTransformable_setRotation
CSFML_GRAPHICS_API void sfTransformable_setRotation(sfTransformable *transformable, float angle)
Set the orientation of a transformable.
sfTransformable_scale
CSFML_GRAPHICS_API void sfTransformable_scale(sfTransformable *transformable, sfVector2f factors)
Scale a transformable.
Types.h
sfTransformable_copy
CSFML_GRAPHICS_API sfTransformable * sfTransformable_copy(const sfTransformable *transformable)
Copy an existing transformable.
sfTransformable_getRotation
CSFML_GRAPHICS_API float sfTransformable_getRotation(const sfTransformable *transformable)
Get the orientation of a transformable.
sfTransformable_getOrigin
CSFML_GRAPHICS_API sfVector2f sfTransformable_getOrigin(const sfTransformable *transformable)
Get the local origin of a transformable.
sfTransformable_getTransform
CSFML_GRAPHICS_API sfTransform sfTransformable_getTransform(const sfTransformable *transformable)
Get the combined transform of a transformable.
sfTransformable_setOrigin
CSFML_GRAPHICS_API void sfTransformable_setOrigin(sfTransformable *transformable, sfVector2f origin)
Set the local origin of a transformable.
sfTransform
Encapsulate a 3x3 transform matrix.
Definition:
Transform.h:42
sfTransformable_destroy
CSFML_GRAPHICS_API void sfTransformable_destroy(sfTransformable *transformable)
Destroy an existing transformable.
sfVector2f
2-component vector of floats
Definition:
Vector2.h:60
sfTransformable_rotate
CSFML_GRAPHICS_API void sfTransformable_rotate(sfTransformable *transformable, float angle)
Rotate a transformable.
sfTransformable
struct sfTransformable sfTransformable
Definition:
Graphics/Types.h:41