Render2D Class Reference

#include <Render2D.h>

Description

Base component to render a 2D object.

Public Types

enum  RenderMode {
  Normal,
  Translucent,
  None
}
 
- Public Types inherited from Component
using EventHandler = bool(*)(void *, Component *component, Entity::ID self, Entity::ID source, const std::vector< std::string > &args)
 

Functions

std::vector< Renderer::Vertex2D > GetVertices () const
 
Renderer::Polygon GetPolygon () const
 
- Functions inherited from Component
std::string GetTag ()
 
EntityGetHost () const
 
template<typename T >
T * GetHostAs () const
 
Entity::ID GetHostID () const
 
virtual std::string GetInfo ()
 
bool EmitEvent (const std::string &eventName, Entity::ID source=Entity::ID(), const std::vector< std::string > &args={})
 
bool CanHandleEvent (const std::string &eventName)
 
void InstallHook (const std::string &eventName, EventHandler, void *data=nullptr)
 
void UninstallHook (const std::string &eventName, EventHandler)
 
void InstallHandler (const std::string &eventName, EventHandler, void *data=nullptr)
 
void UninstallHandler (const std::string &eventName, EventHandler)
 
std::vector< std::string > GetKnownEvents () const
 

Properties

RenderMode mode
 
bool absolute
 

Additional Inherited Members

- Protected Member Functions inherited from Component
virtual void OnStep ()
 
virtual void OnDraw ()
 
virtual void OnAttach ()
 
void InstallEvent (const std::string &eventName, EventHandler mainHandler=nullptr, void *data=nullptr)
 
void UninstallEvent (const std::string &)
 

Member Enumeration Documentation

enum RenderMode
strong

A RenderMode specifies how the aspect should be expressed.

Enumerator
Normal 

This is the default. Colors are interpreted as you would normally expect with the alpha channle being expressed as a transparency value.

Translucent 

Translucency in Dynacoe is a way of expressing transparency. When an Aspect is translucent, the aspect's colors are added to whatever is drawn underneath it. This is referred to in some places as additive blending.

None 

If an aspect's render mode is None, it will not be drawn.

Member Function Documentation

std::vector<Renderer::Vertex2D> GetVertices ( ) const

Returns the raw vertices compiled for the renderable object.

See Renderer.h

Renderer::Polygon GetPolygon ( ) const

Returns the polygon to be used when drawing the vertices.

See Renderer.h

Field Documentation

RenderMode mode

The visual mode for rendered vertices.

See Renderer.h

bool absolute

Sets whether drawing calculations from the node should be interpreted as absolute pixel values on the display or should be within the hierarchy. The default is false.


The documentation for this class was generated from the following file:
  • /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Components/Render2D.h