- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

# JAnimatorFrame Class Reference

`#include <JAnimator.h>`

Collaboration diagram for JAnimatorFrame:

List of all members.

## Public Member Functions
| JAnimatorFrame (JAnimator *parent)
| ~JAnimatorFrame ()
void | AddObject (JAnimatorObject *obj)
void | SetFrameTime (float duration)
bool | Update (float dt)
void | Render (float x, float y)
void | Start ()

## Detailed Description

A single frame of an animation.

## Constructor & Destructor Documentation

JAnimatorFrame::JAnimatorFrame | ( | JAnimator * | parent | ) |

Constructor.

Parameters:

  | parent | - Parent of the frame.

JAnimatorFrame::~JAnimatorFrame | ( |  | ) |

Destructor.

## Member Function Documentation

void JAnimatorFrame::AddObject | ( | JAnimatorObject * | obj | ) |

Add a new object into the frame.

Parameters:

  | obj | - New animation object.

void JAnimatorFrame::SetFrameTime | ( | float | duration | ) |

Set play time of the frame.

Parameters:

  | duration | - Time to play (in second).

bool JAnimatorFrame::Update | ( | float | dt | ) |

Frame update.

Parameters:

  | dt | - Time elapsed since last update (in second).

Returns:
  True if the frame is done.

void JAnimatorFrame::Render | ( | float | x,
|  | float | y |
| ) |  |  |

Render frame.

Parameters:

  | x | - X position for rendering.
  | y | - Y position for rendering.

void JAnimatorFrame::Start | ( |  | ) |

Start playing the frame.