mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add more debug messages and checks
This commit is contained in:
parent
f1d85000e4
commit
a7ffbc9dec
3 changed files with 47 additions and 14 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue