flimEngine
Sprites

Sprite objects are 2D images orthographically rendered to the screen. More...

Collaboration diagram for Sprites:

Functions

 FlimSprite::FlimSprite (const char *imageName)
 Constructor. More...
 
errcode FlimSprite::SetAngle (float angle)
 Sets an angle. More...
 
float FlimSprite::GetAngle ()
 Gets the angle. More...
 
errcode FlimSprite::SetScale (float x, float y)
 Sets a scale. More...
 
errcode FlimSprite::SetScale (float factor)
 Sets a scale. More...
 
errcode FlimSprite::SetScale (float factor, SpriteParam s)
 Sets a scale. More...
 
Vect & FlimSprite::GetScale ()
 Gets the scale. More...
 
errcode FlimSprite::SetPos (float x, float y)
 Sets a position. More...
 
Vect & FlimSprite::GetPos ()
 Gets the position. More...
 
errcode FlimSprite::SetCenter (float x, float y)
 Sets a center. More...
 
Vect & FlimSprite::GetCenter ()
 Gets the center. More...
 

Detailed Description

Sprite objects are 2D images orthographically rendered to the screen.

Function Documentation

◆ FlimSprite()

FlimSprite::FlimSprite ( const char *  imageName)

Constructor.

Author
Jack Campbell
Date
3/13/2017
Make a sprite with a key that was loaded by the image manager
ImageManager::Load("COOLSPRITE", "coolSprite.tga");
FlimSprite* coolSprite = new FlimSprite("COOLSPRITE");
Parameters
imageNameName of the image.

◆ GetAngle()

float FlimSprite::GetAngle ( )

Gets the angle.

Author
Jack Campbell
Date
3/13/2017
Returns
The angle.

◆ GetCenter()

Vect & FlimSprite::GetCenter ( )

Gets the center.

Author
Jack Campbell
Date
3/13/2017
Returns
The center.

◆ GetPos()

Vect & FlimSprite::GetPos ( )

Gets the position.

Author
Jack Campbell
Date
3/13/2017
Returns
The position.

◆ GetScale()

Vect & FlimSprite::GetScale ( )

Gets the scale.

Author
Jack Campbell
Date
3/13/2017
Returns
The scale.

◆ SetAngle()

errcode FlimSprite::SetAngle ( float  angle)

Sets an angle.

Author
Jack Campbell
Date
3/13/2017
Parameters
angleThe angle.
Sets the angle in degrees of the sprite's rotation.
sprite->SetAngle(90.0f);
Returns
An errcode.

◆ SetCenter()

errcode FlimSprite::SetCenter ( float  x,
float  y 
)

Sets a center.

Author
Jack Campbell
Date
3/13/2017
Parameters
xThe x coordinate.
yThe y coordinate.
Returns
An errcode.

◆ SetPos()

errcode FlimSprite::SetPos ( float  x,
float  y 
)

Sets a position.

Author
Jack Campbell
Date
3/13/2017
Parameters
xThe x coordinate.
yThe y coordinate.
Returns
An errcode.

◆ SetScale() [1/3]

errcode FlimSprite::SetScale ( float  x,
float  y 
)

Sets a scale.

Author
Jack Campbell
Date
3/13/2017
Parameters
xThe x coordinate.
yThe y coordinate.
Returns
An errcode.

◆ SetScale() [2/3]

errcode FlimSprite::SetScale ( float  factor)

Sets a scale.

Author
Jack Campbell
Date
3/13/2017
Parameters
factorThe factor.
Returns
An errcode.

◆ SetScale() [3/3]

errcode FlimSprite::SetScale ( float  factor,
SpriteParam  s 
)

Sets a scale.

Author
Jack Campbell
Date
3/13/2017
Parameters
factorThe factor.
sThe SpriteParam to process.
Returns
An errcode.