Tramway SDK v0.1.1
Public Member Functions | Protected Attributes | List of all members
tram::DecalComponent Class Reference

Projects decals onto the scene. More...

#include <components/decal.h>

Inheritance diagram for tram::DecalComponent:
tram::EntityComponent

Public Member Functions

 DecalComponent ()
 
 ~DecalComponent ()
 
name_t GetSprite ()
 
void SetSprite (Render::Sprite *sprite)
 
void Start ()
 
void Update ()
 
void UpdateRenderListObject ()
 
void SetScale (float scale)
 
void SetFrame (uint32_t frame)
 
void SetLocation (vec3 location)
 
void SetRotation (quat rotation)
 
void EventHandler (Event &event)
 
- Public Member Functions inherited from tram::EntityComponent
 EntityComponent ()=default
 
virtual ~EntityComponent ()=default
 
virtual void Init ()
 Initializes an entity component. More...
 
bool IsReady ()
 Returns the component's readiness. More...
 
bool IsInit ()
 Returns the component's init status. More...
 
Entity * GetParent ()
 
void SetParent (Entity *parent)
 

Protected Attributes

ResourceProxy< Render::Sprite > sprite
 
vec3 location = {0.0f, 0.0f, 0.0f}
 
quat rotation = {1.0f, 0.0f, 0.0f, 0.0f}
 
float scale = 1.0f
 
uint32_t frame = 0
 
Render::drawlistentry_t draw_list_entry = {}
 
Render::vertexarray_t vertex_array = {}
 
- Protected Attributes inherited from tram::EntityComponent
size_t resources_waiting = 0
 
bool is_ready = false
 
bool is_init = false
 
Entity * parent = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from tram::EntityComponent
void ResourceReady ()
 Notifies the component of a streamed-in resource. More...
 

Detailed Description

Projects decals onto the scene.

See also
https://racenis.github.io/tram-sdk/documentation/components/decal.html

Constructor & Destructor Documentation

◆ DecalComponent()

tram::DecalComponent::DecalComponent ( )
inline

◆ ~DecalComponent()

tram::DecalComponent::~DecalComponent ( )

Member Function Documentation

◆ EventHandler()

void tram::DecalComponent::EventHandler ( Event &  event)
inlinevirtual

Implements tram::EntityComponent.

◆ GetSprite()

name_t tram::DecalComponent::GetSprite ( )
inline

◆ SetFrame()

void tram::DecalComponent::SetFrame ( uint32_t  frame)
inline

◆ SetLocation()

void tram::DecalComponent::SetLocation ( vec3  location)
inline

◆ SetRotation()

void tram::DecalComponent::SetRotation ( quat  rotation)
inline

◆ SetScale()

void tram::DecalComponent::SetScale ( float  scale)
inline

◆ SetSprite()

void tram::DecalComponent::SetSprite ( Render::Sprite *  sprite)
inline

◆ Start()

void tram::DecalComponent::Start ( )
virtual

Implements tram::EntityComponent.

◆ Update()

void tram::DecalComponent::Update ( )

◆ UpdateRenderListObject()

void tram::DecalComponent::UpdateRenderListObject ( )

Member Data Documentation

◆ draw_list_entry

Render::drawlistentry_t tram::DecalComponent::draw_list_entry = {}
protected

◆ frame

uint32_t tram::DecalComponent::frame = 0
protected

◆ location

vec3 tram::DecalComponent::location = {0.0f, 0.0f, 0.0f}
protected

◆ rotation

quat tram::DecalComponent::rotation = {1.0f, 0.0f, 0.0f, 0.0f}
protected

◆ scale

float tram::DecalComponent::scale = 1.0f
protected

◆ sprite

ResourceProxy<Render::Sprite> tram::DecalComponent::sprite
protected

◆ vertex_array

Render::vertexarray_t tram::DecalComponent::vertex_array = {}
protected

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