Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2005, 9:12:33 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: added quick-animation for FAST, bad animations that suffice for the properties particles over time

File:
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/particles/quick_animation.h

    r4394 r4415  
    11/*!
    2     \file proto_class.h
    3     \brief Definition of ...
     2    \file quick_animation.h
     3    \brief Definition of the QuickAnimation-class
    44
    55*/
    66
    7 #ifndef _PROTO_CLASS_H
    8 #define _PROTO_CLASS_H
     7#ifndef _QUICK_ANIMATION_H
     8#define _QUICK_ANIMATION_H
    99
    1010#include "base_object.h"
     
    1414
    1515
    16 //! A class for ...
    17 class ProtoClass : public BaseObject {
     16
     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 {
    1825
    1926 public:
    20   ProtoClass();
    21   virtual ~ProtoClass();
     27  //! a simple struct that stores keyframes for the QuickAnimation-Class.
     28  struct QuickKeyFrame
     29  {
     30    float valueStart;       //!< The starting value of this KeyFrame
     31    float valueEnd;         //!< The end value of this KeyFrame
     32    float positionStart;    //!< The starting position of this KeyFrame
     33    float positionEnd;      //!< The end position of thies KeyFrame
    2234
     35    QuickKeyFrame* next;    //!< The next Animation
     36  };
     37
     38  QuickAnimation(float rangeStart = 0.0, float valueStart = 0.0, float rangeEnd = 1.0, float valueEnd = 0.0);
     39  virtual ~QuickAnimation();
     40
     41  void addEntry(float position, float value);
     42
     43  float getValue(float position);
    2344
    2445 private:
     46  QuickKeyFrame* first;
     47  QuickKeyFrame* current;
    2548
    2649};
    2750
    28 #endif /* _PROTO_CLASS_H */
     51#endif /* _QUICK_ANIMATION_H */
Note: See TracChangeset for help on using the changeset viewer.