Changeset 7335 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Apr 18, 2006, 9:03:19 PM (19 years ago)
- Location:
- trunk/src/lib/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/particles/quick_animation.cc
r7334 r7335 48 48 { 49 49 printf("QuickAnimation::Position MUST BE between 0.0f and 1.0f\n"); 50 return false; 51 } 52 if(std::find(this->keyFrames.begin(), this->keyFrames.end(), position) != this->keyFrames.end()) 53 { 54 printf("QuickAnimation:: key at position %f already added. Use changeValue instead\n", position); 50 55 return false; 51 56 } -
trunk/src/lib/particles/quick_animation.h
r7334 r7335 43 43 * @param position The position to get the Value from. 44 44 */ 45 void QuickAnimation::getValue(float& value, float position) const45 void getValue(float& value, float position) const 46 46 { 47 47 value = this->lookupValues[int(position*this->lookupValues.size())]; … … 53 53 * @returns the calculated Value. 54 54 */ 55 float QuickAnimation::getValue(float position) const55 float getValue(float position) const 56 56 { 57 57 return this->lookupValues[int(position*this->lookupValues.size())]; … … 69 69 //! Creates a new QuickKeyFrame with @param position position @param value value */ 70 70 QuickKeyFrame(float position, float value) : position(position), value(value) {}; 71 //! compares this->position with position @param position pos to compare, @returns true on match. 72 bool operator==(float position) { return this->position == position; }; 71 73 float value; //!< The value of this KeyFrame 72 74 float position; //!< The position of thies KeyFrame
Note: See TracChangeset
for help on using the changeset viewer.