First render

This commit is contained in:
Dynamitos
2020-10-23 01:47:56 +02:00
parent 8d4c43361b
commit b4fc5df74e
21 changed files with 128 additions and 43 deletions
+16 -3
View File
@@ -51,7 +51,12 @@ void Actor::setWorldLocation(Vector location)
{
rootComponent->setWorldLocation(location);
}
void Actor::setWorldRotation(Vector4 rotation)
void Actor::setWorldRotation(Quaternion rotation)
{
rootComponent->setWorldRotation(rotation);
}
void Actor::setWorldRotation(Vector rotation)
{
rootComponent->setWorldRotation(rotation);
}
@@ -63,7 +68,11 @@ void Actor::setRelativeLocation(Vector location)
{
rootComponent->setRelativeLocation(location);
}
void Actor::setRelativeRotation(Vector4 rotation)
void Actor::setRelativeRotation(Quaternion rotation)
{
rootComponent->setRelativeRotation(rotation);
}
void Actor::setRelativeRotation(Vector rotation)
{
rootComponent->setRelativeRotation(rotation);
}
@@ -75,7 +84,11 @@ void Actor::addWorldTranslation(Vector translation)
{
rootComponent->addWorldTranslation(translation);
}
void Actor::addWorldRotation(Vector4 rotation)
void Actor::addWorldRotation(Quaternion rotation)
{
rootComponent->addWorldRotation(rotation);
}
void Actor::addWorldRotation(Vector rotation)
{
rootComponent->addWorldRotation(rotation);
}
+6 -3
View File
@@ -22,15 +22,18 @@ public:
void detachChild(PActor child);
Array<PActor> getChildren();
void setWorldLocation(Vector location);
void setWorldRotation(Vector4 rotation);
void setWorldRotation(Quaternion rotation);
void setWorldRotation(Vector rotation);
void setWorldScale(Vector scale);
void setRelativeLocation(Vector location);
void setRelativeRotation(Vector4 rotation);
void setRelativeRotation(Quaternion rotation);
void setRelativeRotation(Vector rotation);
void setRelativeScale(Vector scale);
void addWorldTranslation(Vector translation);
void addWorldRotation(Vector4 rotation);
void addWorldRotation(Quaternion rotation);
void addWorldRotation(Vector rotation);
PComponent getRootComponent();
void setRootComponent(PComponent newRoot);
+2
View File
@@ -14,6 +14,8 @@ CameraActor::CameraActor()
cameraComponent->aspectRatio = 1.777778f;
cameraComponent->setParent(sceneComponent);
cameraComponent->setOwner(this);
addWorldTranslation(Vector(0, 0, 50));
addWorldRotation(Vector(0, -1, 0));
}
CameraActor::~CameraActor()