add more debug messages and checks

This commit is contained in:
MihailRis 2026-02-02 19:54:24 +03:00
parent f1d85000e4
commit a7ffbc9dec
3 changed files with 47 additions and 14 deletions

View file

@ -25,7 +25,7 @@ struct Transform {
void refresh();
inline void setRot(const glm::mat3& m) {
if (!checkValue(m)) {
if (!checkValue(m, "rotation")) {
return;
}
rot = m;
@ -33,7 +33,7 @@ struct Transform {
}
inline void setSize(const glm::vec3& v) {
if (!checkValue(v)) {
if (!checkValue(v, "size")) {
return;
}
if (glm::distance2(displaySize, v) >= EPSILON) {
@ -43,7 +43,7 @@ struct Transform {
}
inline void setPos(const glm::vec3& v) {
if (!checkValue(v)) {
if (!checkValue(v, "position")) {
return;
}
if (glm::distance2(displayPos, v) >= EPSILON) {
@ -52,6 +52,6 @@ struct Transform {
pos = v;
}
static bool checkValue(const glm::vec3& v);
static bool checkValue(const glm::mat3& v);
static bool checkValue(const glm::vec3& v, std::string_view name);
static bool checkValue(const glm::mat3& v, std::string_view name);
};