~om26er/ubuntu/oneiric/nux/sru-888039

« back to all changes in this revision

Viewing changes to Nux/Timeline.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-07-21 18:41:46 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20110721184146-po1lz9xhvsz1x7kt
Tags: 1.0.6-0ubuntu1
* New upstream release.
* debian/control:
  - dep on libglu1-mesa-dev
* debian/rules:
  - bump shlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
  protected:
52
52
    unsigned long _ElapsedTime;
53
53
  };
 
54
 
 
55
 
 
56
  // template <typename T>
 
57
  // class PropertyAnimationContainer
 
58
  // {
 
59
 
 
60
  // };
 
61
 
 
62
  // class AnimatedPropertyBase
 
63
  // {
 
64
  // public:
 
65
  //   AnimatedPropertyBase(){};
 
66
 
 
67
  //   virtual void Animate(float t){};
 
68
 
 
69
  // };
 
70
 
 
71
  // // Explicit specialization. The explicit type could be float, int, Color....
 
72
  // template <>
 
73
  // class PropertyAnimationContainer<float> : public AnimatedPropertyBase
 
74
  // {
 
75
  // public:
 
76
  //   PropertyAnimationContainer(Property<float>& prop, float start_value, float end_value)
 
77
  //     : prop_(prop)
 
78
  //   {
 
79
  //     start_value_ = start_value;
 
80
  //     end_value_ = end_value;
 
81
  //   }
 
82
 
 
83
  //   virtual void Animate(float t)
 
84
  //   {
 
85
  //     float value = (1.0f - t) * start_value_ + t * end_value_;
 
86
  //     prop_.set(value);
 
87
  //   }
 
88
 
 
89
  //   Property<float>& prop_;
 
90
  //   float start_value_;
 
91
  //   float end_value_;
 
92
 
 
93
  // };
 
94
 
 
95
  // template <>
 
96
  // class PropertyAnimationContainer<Color> : public AnimatedPropertyBase
 
97
  // {
 
98
  // public:
 
99
  //   PropertyAnimationContainer(Property<Color>& prop, Color start_value, Color end_value)
 
100
  //     : prop_(prop)
 
101
  //   {
 
102
  //     start_value_ = start_value;
 
103
  //     end_value_ = end_value;
 
104
  //   }
 
105
 
 
106
  //   virtual void Animate(float t)
 
107
  //   {
 
108
  //     Color value = (1.0f - t) * start_value_ + t * end_value_;
 
109
  //     prop_.set(value);
 
110
  //   }
 
111
 
 
112
  //   Property<Color>& prop_;
 
113
  //   Color start_value_;
 
114
  //   Color end_value_;
 
115
 
 
116
  // };
 
117
 
 
118
  // class AnimationTimeline : public Object
 
119
  // {
 
120
  // public:
 
121
  //   AnimationTimeline() {};
 
122
 
 
123
  //   template <typename T>
 
124
  //   void AddProperty(Property<T>& prop, T start_value, T end_value)
 
125
  //   {
 
126
  //     PropertyAnimationContainer<T>* a = new PropertyAnimationContainer<T> (prop, start_value, end_value);
 
127
 
 
128
  //     animated_properties_.push_back(a);
 
129
  //   }
 
130
 
 
131
  //   void Animate(float t)
 
132
  //   {
 
133
  //     std::list<AnimatedPropertyBase*>::iterator it;
 
134
 
 
135
  //     // Go through all the properties and update them.
 
136
  //     for(it = animated_properties_.begin(); it != animated_properties_.end(); ++it)
 
137
  //     {
 
138
  //       (*it)->Animate(t);
 
139
  //     }
 
140
  //   }
 
141
 
 
142
  //   std::list<AnimatedPropertyBase*> animated_properties_;
 
143
  // };
54
144
}
55
145
 
56
146
#endif // TIMELINE_H