Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
scale.h
Go to the documentation of this file.
1
#pragma once
2
#include "
core/types.h
"
3
#include "
game/entity.h
"
4
#include "
math/vec3.h
"
5
//------------------------------------------------------------------------------
6
namespace
Game
7
{
8
9
//------------------------------------------------------------------------------
17
struct
Scale
:
public
Math::vec3
18
{
19
Scale
()
20
{
21
this->
set
(1.0f,1.0f,1.0f);
22
}
23
24
Scale
(
Math::vec3
const
&
v
)
25
{
26
this->
load
(&v.
x
);
27
}
28
29
struct
Traits;
30
};
31
32
//------------------------------------------------------------------------------
35
struct
Scale::Traits
36
{
37
Traits
() =
delete
;
38
using
type
=
Scale
;
39
static
constexpr
auto
name
=
"Scale"
;
40
static
constexpr
auto
fully_qualified_name
=
"Game.Scale"
;
41
static
constexpr
size_t
num_fields
= 3;
42
static
constexpr
const
char
*
field_names
[
num_fields
] = {
43
"x"
,
44
"y"
,
45
"z"
46
};
47
static
constexpr
const
char
*
field_typenames
[
num_fields
] = {
48
"float"
,
49
"float"
,
50
"float"
51
};
52
static
constexpr
const
char
*
field_descriptions
[
num_fields
] = {
53
nullptr
,
54
nullptr
,
55
nullptr
56
};
57
using
field_types
= std::tuple<float, float, float>;
58
static
constexpr
size_t
field_byte_offsets
[
num_fields
] = {
59
offsetof(
Scale
,
x
),
60
offsetof(
Scale
,
y
),
61
offsetof(
Scale
,
z
)
62
};
63
static
constexpr
bool
field_hide_in_inspector
[
num_fields
] = {
64
false
,
65
false
,
66
false
67
};
68
70
static
constexpr
uint32_t
fixed_column_index
= 3;
71
};
72
73
}
// namespace Game
entity.h
Game
Game::EditorState.
Definition
graphicsmanager.h:67
Game::Scale::Traits
Definition
scale.h:36
Game::Scale::Traits::fully_qualified_name
static constexpr auto fully_qualified_name
Definition
scale.h:40
Game::Scale::Traits::type
Scale type
Definition
scale.h:38
Game::Scale::Traits::field_typenames
static constexpr const char * field_typenames[num_fields]
Definition
scale.h:47
Game::Scale::Traits::field_byte_offsets
static constexpr size_t field_byte_offsets[num_fields]
Definition
scale.h:58
Game::Scale::Traits::Traits
Traits()=delete
Game::Scale::Traits::field_names
static constexpr const char * field_names[num_fields]
Definition
scale.h:42
Game::Scale::Traits::name
static constexpr auto name
Definition
scale.h:39
Game::Scale::Traits::num_fields
static constexpr size_t num_fields
Definition
scale.h:41
Game::Scale::Traits::field_descriptions
static constexpr const char * field_descriptions[num_fields]
Definition
scale.h:52
Game::Scale::Traits::fixed_column_index
static constexpr uint32_t fixed_column_index
This is the column that the entity scale will reside in, in every table.
Definition
scale.h:70
Game::Scale::Traits::field_types
std::tuple< float, float, float > field_types
Definition
scale.h:57
Game::Scale::Traits::field_hide_in_inspector
static constexpr bool field_hide_in_inspector[num_fields]
Definition
scale.h:63
Game::Scale::Scale
Scale(Math::vec3 const &v)
Definition
scale.h:24
Game::Scale::Scale
Scale()
Definition
scale.h:19
Math::vec3
A 3D vector.
Definition
vec3.h:37
Math::vec3::v
float v[3]
Definition
vec3.h:96
Math::vec3::load
void load(const scalar *ptr)
load content from 16-byte-aligned memory
Definition
vec3.h:168
Math::vec3::x
float x
Definition
vec3.h:93
Math::vec3::z
float z
Definition
vec3.h:93
Math::vec3::set
void set(scalar x, scalar y, scalar z)
set content
Definition
vec3.h:321
Math::vec3::y
float y
Definition
vec3.h:93
types.h
vec3.h
code
application
basegamefeature
components
scale.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.