Spinning Class Reference

This class rotates a widget by one turn. More...

#include <Spinning.h>

Inherits Animation.

Collaboration diagram for Spinning:

List of all members.


Classes

class  SpinningThread

Public Member Functions

 Spinning (XMLNode *xml)
virtual void animate (MenuObject *obj)
virtual void unanimate (MenuObject *obj)

Private Attributes

float rotationspeed

Detailed Description

This class rotates a widget by one turn.

This method rotates a widget. The rotation-speed can be set by the XML-file. The method void animate( MenuObject *obj ) performs a full rotation. The method unanimate ( MenuObject *obj ) has nothing to do, because the method void animate( MenuObject *obj ) leaves the widget in its origin position already.

This animation uses a continuously movement, which is simulated by many very small movement steps. This cannot be done directly in this class, because the animate( MenuObject *obj ) and unanimate( MenuObject *obj ) methods have to return very quickly. So instead of animating the widget, a new object is created, which uses QueuedThread as superclass. This new object is put into the ThreadQueue -class, which performs the animation in an own thread. The ThreadQueue -class deletes this object automatically, when the animation has finished.

Date:
18th of May 2007
Author:
Thomas Weberndorfer

Constructor & Destructor Documentation

Spinning::Spinning ( XMLNode xml  ) 

The constructor forewards the XMLNode -object and loads a few parameters.

Parameters:
xml This XML-object has to focus on the correct node.


Member Function Documentation

void Spinning::animate ( MenuObject obj  )  [virtual]

This method rotates the widget by one turn.

Parameters:
obj This is a pointer to the widget, which should be rotated.

Implements Animation.

void Spinning::unanimate ( MenuObject obj  )  [virtual]

This method does nothing, because the animate( MenuObject *obj ) -method leaves the widget in its default position already.

Parameters:
obj This is a pointer to the widget.

Implements Animation.


Member Data Documentation

float Spinning::rotationspeed [private]


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

Generated on Wed Oct 20 16:12:01 2010 for inVRs by doxygen 1.5.8