StarEngine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
star::SpriteComponent Class Reference

#include <SpriteComponent.h>

Inheritance diagram for star::SpriteComponent:
Inheritance graph
Collaboration diagram for star::SpriteComponent:
Collaboration graph

Public Member Functions

 SpriteComponent (const tstring &filepath, const tstring &spriteName, bool bIsHUDElement=false, int widthSegments=1, int heightSegments=1)
 
virtual ~SpriteComponent ()
 
void Draw ()
 
virtual void Update (const Context &context)
 
const tstringGetFilePath () const
 
const tstringGetName () const
 
int32 GetWidth () const
 
int32 GetHeight () const
 
std::vector< GLfloat > GetVertices () const
 
std::vector< GLfloat > GetUVCoords () const
 
void SetCurrentSegment (int widthSegment, int heightSegment)
 
- Public Member Functions inherited from star::BaseComponent
 BaseComponent (void)
 
 BaseComponent (Object *parent)
 
virtual ~BaseComponent (void)
 
void Initialize ()
 
bool IsInitialized () const
 
ObjectGetParent () const
 
void SetParent (Object *parent)
 
BaseSceneGetGameScene () const
 
TransformComponentGetTransform () const
 

Protected Member Functions

virtual void InitializeComponent ()
 
virtual void CreateVertices ()
 
virtual void CreateIndices ()
 

Protected Attributes

GLfloat m_Vertices [12]
 
GLfloat m_UvCoords [8]
 
int32 m_Width
 
int32 m_WidthSegments
 
int32 m_CurrentWidthSegment
 
int32 m_Heigth
 
int32 m_HeightSegments
 
int32 m_CurrentHeightSegment
 
- Protected Attributes inherited from star::BaseComponent
Objectm_pParentObject
 
bool m_bInitialized
 

Constructor & Destructor Documentation

star::SpriteComponent::SpriteComponent ( const tstring filepath,
const tstring spriteName,
bool  bIsHUDElement = false,
int  widthSegments = 1,
int  heightSegments = 1 
)
star::SpriteComponent::~SpriteComponent ( )
virtual

Member Function Documentation

void star::SpriteComponent::CreateIndices ( )
protectedvirtual
void star::SpriteComponent::CreateVertices ( )
protectedvirtual

Reimplemented in star::SpritesheetComponent.

void star::SpriteComponent::Draw ( )
virtual

Implements star::BaseComponent.

const tstring & star::SpriteComponent::GetFilePath ( ) const
int32 star::SpriteComponent::GetHeight ( ) const
const tstring & star::SpriteComponent::GetName ( ) const
std::vector< GLfloat > star::SpriteComponent::GetUVCoords ( ) const
std::vector< GLfloat > star::SpriteComponent::GetVertices ( ) const
int32 star::SpriteComponent::GetWidth ( ) const
void star::SpriteComponent::InitializeComponent ( )
protectedvirtual

Implements star::BaseComponent.

Reimplemented in star::SpritesheetComponent.

void star::SpriteComponent::SetCurrentSegment ( int  widthSegment,
int  heightSegment 
)
virtual void star::SpriteComponent::Update ( const Context context)
inlinevirtual

Implements star::BaseComponent.

Reimplemented in star::SpritesheetComponent.

Member Data Documentation

int32 star::SpriteComponent::m_CurrentHeightSegment
protected
int32 star::SpriteComponent::m_CurrentWidthSegment
protected
int32 star::SpriteComponent::m_HeightSegments
protected
int32 star::SpriteComponent::m_Heigth
protected
GLfloat star::SpriteComponent::m_UvCoords[8]
protected
GLfloat star::SpriteComponent::m_Vertices[12]
protected
int32 star::SpriteComponent::m_Width
protected
int32 star::SpriteComponent::m_WidthSegments
protected

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