#pragma once

#include "Transition.hpp"
#include "PieSlice.hpp"

/*
   Class: RotateTransition

     Implements a transition that rotates the specified pie slice inside a pie chart by the given data value.

     *Inherits* from <>.
*/
class RotateTransition: public Transition {
  public:
    /*
       Constructor: RotateTransition

         Initializes the object.

       Parameters:

         pDataElement - Pointer to the data element to be rotated.
         fDeltaValue - Total rotation value inside a pie chart (100.0f equals 360 degrees).
         iTotalSteps - Duration of the transition in steps.
    */
    RotateTransition(PieSlice* pDataElement, float fDeltaValue, int iTotalSteps);

    /*
       Destructor: ~RotateTransition

         Releases all allocated resources.
    */
    ~RotateTransition();


    /*
       Function: Update

         Updates the transition by executing one rotation step. *Inherited* from <Transition>.
    */
    void Update();

    /*
       Function: Complete

         Checks if the transition is completed. *Inherited* from <Transition>.

       Returns:

         A boolean value indicating if the transition is completed.
    */
    bool Complete();

  private:
    PieSlice* pDataElement;
    float fDeltaValue;
    int iStepsDone;
    int iTotalSteps;
};