Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Graphics2D
EntityData
CGUITransformData.h
1
/*
2
!@
3
MIT License
4
5
Copyright (c) 2022 Skylicht Technology CO., LTD
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
8
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
9
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10
subject to the following conditions:
11
12
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20
This file is part of the "Skylicht Engine".
21
https://github.com/skylicht-lab/skylicht-engine
22
!#
23
*/
24
25
#pragma once
26
27
#include "Entity/IEntityData.h"
28
29
namespace
Skylicht
30
{
31
class
SKYLICHT_API CGUITransformData :
public
IEntityData
32
{
33
friend
class
CGUILayoutSystem;
34
35
protected
:
36
core::vector3df m_transformPosition;
37
38
core::vector3df m_position;
39
core::vector3df m_scale;
40
core::vector3df m_rotation;
41
42
public
:
43
bool
HasChanged;
44
45
core::rectf Rect;
46
47
CGUITransformData* Parent;
48
49
public
:
50
CGUITransformData();
51
52
virtual
~CGUITransformData();
53
54
inline
const
core::vector3df& getPosition()
55
{
56
return
m_position;
57
}
58
59
inline
const
core::vector3df& getAlignPosition()
60
{
61
return
m_transformPosition;
62
}
63
64
inline
void
setPosition(
const
core::vector3df& v)
65
{
66
m_position = v;
67
HasChanged =
true
;
68
}
69
70
inline
const
core::vector3df& getScale()
71
{
72
return
m_scale;
73
}
74
75
inline
void
setScale(
const
core::vector3df& v)
76
{
77
m_scale = v;
78
HasChanged =
true
;
79
}
80
81
inline
const
core::vector3df& getRotation()
82
{
83
return
m_rotation;
84
}
85
86
inline
void
setRotation(
const
core::vector3df& v)
87
{
88
m_rotation = v;
89
HasChanged =
true
;
90
}
91
92
inline
float
getHeight()
93
{
94
return
Rect.getHeight();
95
}
96
97
inline
float
getWidth()
98
{
99
return
Rect.getWidth();
100
}
101
102
inline
void
setWidth(
float
width)
103
{
104
Rect.LowerRightCorner.X = Rect.UpperLeftCorner.X + width;
105
HasChanged =
true
;
106
}
107
108
inline
void
setHeight(
float
height)
109
{
110
Rect.LowerRightCorner.Y = Rect.UpperLeftCorner.Y + height;
111
HasChanged =
true
;
112
}
113
114
inline
const
core::rectf& getRect()
115
{
116
return
Rect;
117
}
118
119
inline
void
setRect(
const
core::rectf& r)
120
{
121
Rect = r;
122
HasChanged =
true
;
123
}
124
125
DECLARE_GETTYPENAME(CGUITransformData)
126
};
127
128
DECLARE_PUBLIC_DATA_TYPE_INDEX(
CGUITransformData
);
129
}
Skylicht::CGUITransformData
Definition
CGUITransformData.h:32
Skylicht
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition
AudioDebugLog.h:29
Generated by
1.17.0