fix: mat4.decompose (-Wmaybe-uninitialized)
This commit is contained in:
parent
a0fdc5e963
commit
3a1ae57bbf
@ -111,7 +111,7 @@ mat4.decompose(m: matrix)
|
||||
translation=vec3,
|
||||
skew=vec3,
|
||||
perspective=vec4
|
||||
}
|
||||
} or nil
|
||||
```
|
||||
|
||||
## Look at point - *mat4.look_at(...)*
|
||||
|
||||
@ -111,7 +111,7 @@ mat4.decompose(m: matrix)
|
||||
translation=vec3,
|
||||
skew=vec3,
|
||||
perspective=vec4
|
||||
}
|
||||
} или nil
|
||||
```
|
||||
|
||||
## Отслеживание точки *mat4.look_at(...)*
|
||||
|
||||
@ -165,7 +165,7 @@ static int l_transpose(lua::State* L) {
|
||||
/// translation=float[3],
|
||||
/// skew=float[3],
|
||||
/// perspective=float[4]
|
||||
/// }
|
||||
/// } or nil
|
||||
static int l_decompose(lua::State* L) {
|
||||
auto matrix = lua::tomat4(L, 1);
|
||||
glm::vec3 scale;
|
||||
@ -173,15 +173,14 @@ static int l_decompose(lua::State* L) {
|
||||
glm::vec3 translation;
|
||||
glm::vec3 skew;
|
||||
glm::vec4 perspective;
|
||||
glm::decompose(
|
||||
if (glm::decompose(
|
||||
matrix,
|
||||
scale,
|
||||
rotation,
|
||||
translation,
|
||||
skew,
|
||||
perspective
|
||||
);
|
||||
|
||||
)) {
|
||||
lua::createtable(L, 0, 6);
|
||||
|
||||
lua::pushvec3(L, scale);
|
||||
@ -203,6 +202,8 @@ static int l_decompose(lua::State* L) {
|
||||
lua::setfield(L, "perspective");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int l_look_at(lua::State* L) {
|
||||
uint argc = lua::check_argc(L, 3, 4);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user