Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/particles/quick_animation.h @ 6103

Last change on this file since 6103 was 5405, checked in by bensch, 19 years ago

orxonox/trunk: renamed definition to the right term declaration…

File size: 1.5 KB
RevLine 
[4597]1/*!
[5039]2 * @file quick_animation.h
[4836]3  *  Definition of the QuickAnimation-class
[3329]4
[3245]5*/
[1853]6
[4415]7#ifndef _QUICK_ANIMATION_H
8#define _QUICK_ANIMATION_H
[1853]9
[3543]10#include "base_object.h"
[1853]11
[5405]12// FORWARD DECLARATION
[3543]13
14
[2036]15
[1853]16
[4415]17//! A class for that linearely interpolates between multiple values.
18/**
19   to be quick this only has the capability to store very little date
20
21   this class is optimized for a raising value. eg. 100 particles sorted
22   by age.
23*/
24class QuickAnimation : public BaseObject {
25
[1904]26 public:
[4479]27
[4415]28  //! a simple struct that stores keyframes for the QuickAnimation-Class.
29  struct QuickKeyFrame
30  {
[4479]31    float            value;             //!< The starting value of this KeyFrame
32    float            position;          //!< The end position of thies KeyFrame
[1853]33
[4479]34    QuickKeyFrame*   next;              //!< The next Animation
[4654]35    QuickKeyFrame*   prev;              //!< The previous QuickKeyFrame
[4415]36  };
[3245]37
[4421]38  QuickAnimation();
[4415]39  virtual ~QuickAnimation();
40
[4654]41  void addEntry(float position, float value);
42  void changeEntry(float position, float value, float region = .04);
[4415]43
[4657]44  void removeEntry(float position);
[4836]45  /** @todo implemente those functions
[4425]46      bool moveEntry(float position);
47  */
[4479]48
[4415]49  float getValue(float position);
50
[4746]51  void debug();
[4479]52
[3245]53 private:
[4654]54  QuickKeyFrame*       first;          //!< The first KeyFrame in a Sequence of Keyframes.
55  QuickKeyFrame*       current;        //!< The currently selected KeyFrame.
56  unsigned int         count;          //!< How many Keyframes the QuickAnimation has.
[1853]57};
58
[4415]59#endif /* _QUICK_ANIMATION_H */
Note: See TracBrowser for help on using the repository browser.