VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
VulkanEngine::SceneObject Class Reference

Represents an object in a scene. More...

#include <SceneObject.h>

Inheritance diagram for VulkanEngine::SceneObject:
VulkanEngine::Camera VulkanEngine::OBJMesh VulkanEngine::Scene

Public Member Functions

 SceneObject ()
 Contructor.
 
void addChildren (const std::vector< std::shared_ptr< SceneObject > > &_children)
 
const Eigen::Matrix4f getTransform () const
 
void setTransform (const Eigen::Matrix4f &_transform)
 

Protected Member Functions

virtual void preUpdate (std::shared_ptr< SceneState > scene_state)
 
virtual void update (std::shared_ptr< SceneState > scene_state)
 
virtual void postUpdate (std::shared_ptr< SceneState > scene_state)
 

Protected Attributes

Eigen::Matrix4f transform
 

Detailed Description

Represents an object in a scene.

Member Function Documentation

◆ addChildren()

void VulkanEngine::SceneObject::addChildren ( const std::vector< std::shared_ptr< SceneObject > > &  _children)

Add child SceneObject instances which will inherit the transformation of this SceneObject.

Parameters
_childrenThe children to add.

◆ getTransform()

const Eigen::Matrix4f VulkanEngine::SceneObject::getTransform ( ) const

Get the current local transformation matrix.

Returns
The current local transformation matrix

◆ postUpdate()

void VulkanEngine::SceneObject::postUpdate ( std::shared_ptr< SceneState scene_state)
protectedvirtual

Update this scene object.

Parameters
scene_stateContains information about the current state of the scene.

◆ preUpdate()

void VulkanEngine::SceneObject::preUpdate ( std::shared_ptr< SceneState scene_state)
protectedvirtual

Update this scene object.

Parameters
scene_stateContains information about the current state of the scene.

◆ setTransform()

void VulkanEngine::SceneObject::setTransform ( const Eigen::Matrix4f &  _transform)

Set the current local transformation matrix.

Parameters
_transformThe desired local transformation matrix.

◆ update()

void VulkanEngine::SceneObject::update ( std::shared_ptr< SceneState scene_state)
protectedvirtual

Update this scene object.

Parameters
scene_stateContains information about the current state of the scene.

Update all children

Member Data Documentation

◆ transform

Eigen::Matrix4f VulkanEngine::SceneObject::transform
protected

The transformation matrix of this SceneObject. By default it is set to identity.


The documentation for this class was generated from the following files: