sead
Loading...
Searching...
No Matches
aglParameter.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <basis/seadNew.h>
4#include <gfx/seadColor.h>
5#include <math/seadVector.h>
6
7namespace agl { namespace utl {
8
9template <typename T>
11{
12 return new (heap, 4) Parameter<T>(getValue(), getParameterName(), getLabel(), getMeta(), p_obj);
13}
14
15template <typename T> template <typename U>
16inline void Parameter<T>::setValue(const U& value)
17{
18 mValue = value;
19}
20
21template <> template <>
23{
25}
26
27template <> template <>
29{
31}
32
33template <> template <>
35{
37}
38
39static_assert(sizeof(Parameter<bool>) == 0x14);
40static_assert(sizeof(Parameter<s32>) == 0x14);
41static_assert(sizeof(Parameter<f32>) == 0x14);
42static_assert(sizeof(Parameter<sead::Vector2f>) == 0x18);
43static_assert(sizeof(Parameter<sead::Vector3f>) == 0x1C);
44static_assert(sizeof(Parameter<sead::Vector4f>) == 0x20);
45static_assert(sizeof(Parameter<sead::Color4f>) == 0x20);
46static_assert(sizeof(Parameter< sead::FixedSafeString<32> >) == 0x3C);
47
48template <typename T>
50{
51 static_cast<T*>(ptr())->setLerp(*static_cast<const T*>(parameter_a.ptr()), *static_cast<const T*>(parameter_b.ptr()), t);
52}
53
54template <>
56{
57 *static_cast<f32*>(ptr()) = sead::Mathf::lerp(*static_cast<const f32*>(parameter_a.ptr()), *static_cast<const f32*>(parameter_b.ptr()), t);
58}
59
60template <>
63{
64 return cType_bool;
65}
66
67template <>
70{
71 return cType_int;
72}
73
74template <>
77{
78 return cType_f32;
79}
80
81template <>
84{
85 return cType_vec2;
86}
87
88template <>
91{
92 return cType_vec3;
93}
94
95template <>
98{
99 return cType_vec4;
100}
101
102template <>
105{
106 return cType_color;
107}
108
109template <>
112{
113 return cType_string32;
114}
115
116template <>
117inline const void*
119{
120 return mValue.cstr();
121}
122
123template <>
124inline void*
126{
127 return mValue.getBuffer();
128}
129
130template <>
131inline size_t
133{
134 return 32;
135}
136
137} }
Definition aglImageFilter2D.h:11
Definition aglDisplayList.cpp:5