mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add transform:get_size(), :set_size(...)
This commit is contained in:
parent
736e5b95b6
commit
a6aa42a521
3 changed files with 11 additions and 0 deletions
|
|
@ -44,6 +44,13 @@ struct Transform {
|
|||
dirty = true;
|
||||
}
|
||||
|
||||
inline void setSize(glm::vec3 v) {
|
||||
if (glm::distance2(size, v) >= 0.0000001f) {
|
||||
dirty = true;
|
||||
}
|
||||
size = v;
|
||||
}
|
||||
|
||||
inline void setPos(glm::vec3 v) {
|
||||
if (glm::distance2(pos, v) >= 0.00001f) {
|
||||
dirty = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue