Aether3D Game Engine
Public Member Functions | Friends | List of all members
ae3d::SpriteRendererComponent Class Reference

Renders sprites. More...

#include <SpriteRendererComponent.hpp>

Public Member Functions

 SpriteRendererComponent ()
 Constructor.
 
 SpriteRendererComponent (const SpriteRendererComponent &other)
 
 ~SpriteRendererComponent ()
 Destructor.
 
SpriteRendererComponentoperator= (const SpriteRendererComponent &other)
 
class GameObjectGetGameObject () const
 
std::string GetSerialized () const
 
void Clear ()
 Removes all textures that were added using SetTexture.
 
void SetTexture (class TextureBase *texture, const struct Vec3 &position, const Vec3 &dimensionPixels, const struct Vec4 &tintColor)
 

Friends

class GameObject
 
class Scene
 

Detailed Description

Renders sprites.

Constructor & Destructor Documentation

ae3d::SpriteRendererComponent::SpriteRendererComponent ( const SpriteRendererComponent other)
Parameters
otherOther.

Member Function Documentation

class GameObject* ae3d::SpriteRendererComponent::GetGameObject ( ) const
inline
Returns
GameObject that owns this component.
std::string ae3d::SpriteRendererComponent::GetSerialized ( ) const
Returns
Textual representation of component.
SpriteRendererComponent& ae3d::SpriteRendererComponent::operator= ( const SpriteRendererComponent other)
Parameters
otherOther.
void ae3d::SpriteRendererComponent::SetTexture ( class TextureBase texture,
const struct Vec3 position,
const Vec3 dimensionPixels,
const struct Vec4 tintColor 
)

Adds a texture to be rendered. The same texture can be added multiple times.

Parameters
textureTexture.
positionPosition relative to the component's transform.
dimensionPixelsDimension in pixels.
tintColorTint color in range 0-1.

TODO [2015-03-28]: Set pivot, maybe also rotation.


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