36 void tick(
double deltaTime)
override;
91 std::optional<std::shared_ptr<SceneNode>>
sceneNode;
A component which can be attached as many times to an actor as one wants. It makes it possible to ren...
A scene component has a transform.
void setActorLocation(glm::vec3 newLocation) const
Set the new world location for this actor.
glm::vec3 getActorRotation() const
Gets the actors rotation in the world.
void setActorRotation(glm::vec3 newRotation) const
Sets the world rotation.
virtual void beginPlay()
Gets executed when the actor is spawned into the world.
glm::mat4 getWorldTransform() const
Gets the model matrix.
void rotateActor(glm::vec3 deltaRotation) const
Applies an incremental rotation to the actor using quaternion multiplication. Use this instead of get...
std::optional< std::shared_ptr< SceneNode > > sceneNode
void setActorScale(glm::vec3 newScale) const
sets the world scale for this actor
glm::vec3 getActorScale() const
Scales the actor to world scale.
Scene * getOwningScene() const
Get the pointer to the scene this entity is a part of.
glm::vec3 getActorLocation() const
Gets the actors location in the world.
void tick(double deltaTime) override
Executed every frame.
~Actor() override=default
std::shared_ptr< SceneNode > getSceneNode() const
Getter for the scene graph node for this object.
std::weak_ptr< Components::Scene > rootComponent_
Actor(std::shared_ptr< SceneNode > sceneNode, Scene *owningScene)
virtual std::string getActorName() const