46 void tick(
double deltaTime)
override;
std::vector< MeshComponent * > meshComponents
std::vector< MeshComponent * > getMeshComponents() const
Actor(std::shared_ptr< SceneNode > sceneNode, Scene *owningScene)
void setActorLocation(glm::vec3 newLocation)
Set the new world location for this actor.
Scene * getOwningScene() const
Get the pointer to the scene this entity is a part of.
virtual void beginPlay()
Gets executed when the actor is spawned into the world.
MeshComponent * registerMeshComponent(MeshComponent *meshComponent)
void tick(double deltaTime) override
Executed every frame.
void setActorScale(glm::vec3 newScale)
sets the world scale for this actor
void setActorRotation(glm::vec3 newRotation)
Sets the world rotation.
glm::vec3 getActorScale() const
Scales the actor to world scale.
glm::mat4 getWorldTransform() const
Gets the model matrix.
std::weak_ptr< SceneComponent > rootComponent
glm::vec3 getActorLocation() const
Gets the actors location in the world.
std::shared_ptr< World > world
glm::vec3 getActorRotation() const
Gets the actors rotation in the world.
std::shared_ptr< SceneNode > getSceneNode() const
Getter for the scene graph node for this object.
std::optional< std::shared_ptr< SceneNode > > sceneNode
void rotateActor(glm::vec3 deltaRotation)
Applies an incremental rotation to the actor using quaternion multiplication. Use this instead of get...
void unregisterMeshComponent(MeshComponent *meshComponent)
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.
Manages game objects within a scene, handling registration, ID allocation, and GPU buffer synchroniza...
A scene is the overarching structure which can spawn actors.
Log category system implementation.