UI Hello World

This commit is contained in:
2022-10-23 01:01:16 -07:00
parent 65e3bb43a5
commit bc74e6782b
25 changed files with 663 additions and 41 deletions

View File

@ -79,7 +79,7 @@ void Transform::setLocalPosition(glm::vec3 position) {
}
glm::vec3 Transform::getLocalScale() {
return this->scale;
return this->localScale;
}
void Transform::setLocalScale(glm::vec3 scale) {
@ -140,6 +140,9 @@ void Transform::setParent(Transform *parent) {
this->parent = parent;
if(parent != nullptr) parent->children.push_back(this);
this->updateLocalTransformFromWorldTransform();
this->updateChildrenTransforms();
}
Transform * Transform::getParent() {
@ -148,6 +151,7 @@ Transform * Transform::getParent() {
Transform::~Transform() {
this->setParent(nullptr);
auto it = this->parent->children.begin();
while(it != this->parent->children.end()) {
(*it)->setParent(nullptr);