// Author: Juan Carlos De Abreu (jcabreur@gmail.com)
//
// This file define a class inherent from ITransfromationNode that allow 
// rotate a 'scene node'.
//
// An use of this class can be;
// SmartPointer<ISceneNode> rotate_node = new RotateNode(90, 1, 0, 0);
// rotate_node->apply();

#ifndef SCENE_TRANSFORMATION_ROTATE_NODE_H__
#define SCENE_TRANSFORMATION_ROTATE_NODE_H__

#include "../../../global.h"
#include "../transformation_node.h"

BEGIN_TEG_NAMESPACE();

class RotateNode : public ITransformationNode {
 public:
  // RotateNode constructors and destructor.
  RotateNode();
  RotateNode(float angle, float x, float y, float z);
  ~RotateNode();

  // Accessor and mutator methods to RotateNode attributes.
  inline float angle() const { return angle_; }
  inline void set_angle(float angle) { angle_ = angle; }

  // Method to apply the rotate transformation.
  virtual void apply();

  // Method to make a RotateNode copy.
  virtual SmartPointer<ISceneNode> copy();
  AUTO_SIZE();

 private:
  // RotateNode attributes, the rotate angle.
  float angle_;
  DISALLOW_COPY_AND_ASSIGN(RotateNode);
};

END_TEG_NAMESPACE();

#endif  // SCENE_TRANSFORMATION_ROTATE_NODE_H__
