UI Hello World
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user