Files
Seele/src/Engine/Scene/Actor/Actor.h
T

47 lines
1.1 KiB
C++
Raw Normal View History

2020-04-15 02:03:56 +02:00
#pragma once
#include "MinimalEngine.h"
2020-05-05 01:51:13 +02:00
#include "Math/Transform.h"
2020-04-15 02:03:56 +02:00
namespace Seele
{
DECLARE_REF(Actor);
DECLARE_REF(Component);
2020-05-05 01:51:13 +02:00
DECLARE_REF(Scene);
2020-04-15 02:03:56 +02:00
class Actor
{
public:
Actor();
virtual ~Actor();
2020-05-05 01:51:13 +02:00
void tick(float deltaTime);
void notifySceneAttach(PScene scene);
PScene getScene();
2020-04-15 02:03:56 +02:00
PActor getParent();
void addChild(PActor child);
void detachChild(PActor child);
Array<PActor> getChildren();
void setWorldLocation(Vector location);
void setWorldRotation(Vector4 rotation);
void setWorldScale(Vector scale);
void setRelativeLocation(Vector location);
void setRelativeRotation(Vector4 rotation);
void setRelativeScale(Vector scale);
2020-05-05 01:51:13 +02:00
2020-04-15 02:03:56 +02:00
void addWorldTranslation(Vector translation);
void addWorldRotation(Vector4 rotation);
2020-05-05 01:51:13 +02:00
2020-04-15 02:03:56 +02:00
PComponent getRootComponent();
void setRootComponent(PComponent newRoot);
2020-05-05 01:51:13 +02:00
2020-04-15 02:03:56 +02:00
private:
2020-05-05 01:51:13 +02:00
void setParent(PActor parent);
PScene owningScene;
2020-04-15 02:03:56 +02:00
PActor parent;
Array<PActor> children;
PComponent rootComponent;
Transform transform;
};
DEFINE_REF(Actor);
2020-05-05 01:51:13 +02:00
} // namespace Seele