gedi::ABO Class Reference

#include <ABO.h>

Inherited by gedi::DynABO.

Inheritance diagram for gedi::ABO:

[legend]
List of all members.

Public Member Functions

 ABO (void)
 ~ABO (void)
void Create (gedi::UInt32 iAnimations, gedi::Animation *pkAnimations)
void Update (void)
gedi::Error32 Render (void)
void SetAnimation (gedi::UInt32 iAnimation, gedi::Animation *pkAnimation)
void LoadFromFile (LPSTR lpszFilename)
void Rotate (gedi::Real32 fAngle, gedi::Bool32 iAccumulate)
gedi::Bool32 Collide (gedi::ABO &rkABO, gedi::Bool32 iUseSphere=gedi::False)
gedi::Bool32 ContainsPoint (gedi::Int32 iX, gedi::Int32 iY)
void SetCurrentAnimation (gedi::UInt32 iAnimation)
gedi::UInt32 GetCurrentAnimation (void)
void SetPosition (gedi::UInt32 iX, gedi::UInt32 iY)
void SetSize (gedi::UInt32 iWidth, gedi::UInt32 iHeight)
void SetColor (gedi::UInt8 iAlpha, gedi::UInt8 iRed, gedi::UInt8 iGreen, gedi::UInt8 iBlue)
void SetRadius (gedi::Real32 fRadius)
gedi::UInt32 GetXPosition (void)
gedi::UInt32 GetYPosition (void)
gedi::UInt32 GetHeight (void)
gedi::UInt32 GetWidth (void)
gedi::UInt32 GetColor (void)
gedi::Real32 GetDirection (void)
gedi::Real32 GetRadius (void)

Detailed Description

Mirus Animated Blittable Object (ABO) class.

This class is reponsible for rendering and animating 2D objects.


Constructor & Destructor Documentation

gedi::ABO::ABO ( void   ) 

Constructor.

gedi::ABO::~ABO ( void   ) 

Destructor.


Member Function Documentation

void gedi::ABO::Create ( gedi::UInt32  iAnimations,
gedi::Animation *  pkAnimations 
)

Create the ABO.

Parameters:
iAnimations Number of animations.
pkAnimations Pointer to animations to deep copy.

void gedi::ABO::Update ( void   ) 

Update to next animation.

gedi::Error32 gedi::ABO::Render ( void   ) 

Render current animation

void gedi::ABO::SetAnimation ( gedi::UInt32  iAnimation,
gedi::Animation *  pkAnimation 
)

Set a new set of animations using deep copy.

Parameters:
iAnimations Number of animations.
pkAnimations Pointer to animations to deep copy.
Returns:
gedi::True if rendering success, gedi::False otherwise.

void gedi::ABO::LoadFromFile ( LPSTR  lpszFilename  ) 

Load animation from descriptor file.

Parameters:
lpszFilename Descriptor file which references the 2D image.

Reimplemented in gedi::DynABO, and gedi::PreciseABO.

void gedi::ABO::Rotate ( gedi::Real32  fAngle,
gedi::Bool32  iAccumulate 
)

Rotate the ABO.

Parameters:
fAngle Degrees (in radians?)
iAccumulate If gedi::True add angle to current angle, otherwise set it.

gedi::Bool32 gedi::ABO::Collide ( gedi::ABO rkABO,
gedi::Bool32  iUseSphere = gedi::False 
)

Return true if ABO collides with this one.

Parameters:
rkABO ABO.
iUseSphere Use sphere collision method if gedi::True, otherwise use bounding rectangle.

gedi::Bool32 gedi::ABO::ContainsPoint ( gedi::Int32  iX,
gedi::Int32  iY 
)

Return true if this ABO contains point x,y.

Parameters:
iX X point.
iY Y point.
Returns:
gedi::True if this contains x,y

void gedi::ABO::SetCurrentAnimation ( gedi::UInt32  iAnimation  ) 

Set the current animation number. Frame number is not affected since it is contained by gedi::Animation.

Parameters:
iAnimation Animation number.

gedi::UInt32 gedi::ABO::GetCurrentAnimation ( void   ) 

Get the current animation number.

Returns:
Animation number.

void gedi::ABO::SetPosition ( gedi::UInt32  iX,
gedi::UInt32  iY 
)

Set ABO to a new position.

Parameters:
iX X coordinate.
iY Y coordinate.

void gedi::ABO::SetSize ( gedi::UInt32  iWidth,
gedi::UInt32  iHeight 
)

Set ABO size. Handles magnification and compression if size not same as image.

Parameters:
iWidth Width.
iHeight Height.

void gedi::ABO::SetColor ( gedi::UInt8  iAlpha,
gedi::UInt8  iRed,
gedi::UInt8  iGreen,
gedi::UInt8  iBlue 
)

Set ABO color to blend with the image pixels. To get full ABO color, set to (255,255,255,255).

Parameters:
iAlpha Alpha
iRed Red
iGreen Green
iBlue Blue

void gedi::ABO::SetRadius ( gedi::Real32  fRadius  ) 

Set the ABO radius. Handles if magnification handled.

Parameters:
fRadius 

gedi::UInt32 gedi::ABO::GetXPosition ( void   ) 

Get the ABO X coordinate.

Returns:
X coordinate.

gedi::UInt32 gedi::ABO::GetYPosition ( void   ) 

Get the ABO Y coordinate.

Returns:
Y coordinate.

gedi::UInt32 gedi::ABO::GetHeight ( void   ) 

Get the ABO height.

Returns:
Height.

gedi::UInt32 gedi::ABO::GetWidth ( void   ) 

Get the ABO width.

Returns:
Width.

gedi::UInt32 gedi::ABO::GetColor ( void   ) 

Get the ABO color.

Returns:
Color.

gedi::Real32 gedi::ABO::GetDirection ( void   ) 

Get the ABO rotation angle.

Returns:
Rotation angle.

gedi::Real32 gedi::ABO::GetRadius ( void   ) 

Get the ABO radius.

Returns:
Radius.


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