Changeset 3876 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- Apr 18, 2005, 5:18:45 PM (20 years ago)
- Location:
- orxonox/trunk/src/util/animation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation.cc
r3868 r3876 28 28 { 29 29 // initialize a beginning KeyFrame, that will be deleted afterwards 30 this-> bHasKeys = false;30 this->keyFrameCount = 0; 31 31 this->bHandled = true; 32 32 this->bDelete = false; -
orxonox/trunk/src/util/animation/animation.h
r3868 r3876 94 94 95 95 BaseObject* baseObject; //!< The same as object in the derived classes, but with reference to BaseObject 96 bool bHasKeys; //!< If the animation has any keys at all. Needed to add the first keyframe (and delete the dummy).96 unsigned int keyFrameCount; //!< The Count of KeyFrames. 97 97 bool bHandled; //!< If this Animation is handled by the AnimationPlayer. 98 98 bool bRunning; //!< If the animation is running -
orxonox/trunk/src/util/animation/animation3d.cc
r3874 r3876 90 90 KeyFrame3D* tmpKeyFrame; 91 91 92 if (bHasKeys) 92 // when adding the first frame 93 if (this->keyFrameCount == 0) 94 { 95 tmpKeyFrame = this->keyFrameList->firstElement(); 96 this->setAnimFunc(animFunc); 97 } 98 else 93 99 { 94 100 tmpKeyFrame = new KeyFrame3D; 101 // when adding the second frame 95 102 if (this->currentKeyFrame == this->nextKeyFrame) 96 103 this->nextKeyFrame = tmpKeyFrame; 97 104 this->keyFrameList->add(tmpKeyFrame); 98 99 }100 else101 {102 tmpKeyFrame = this->keyFrameList->firstElement();103 bHasKeys = true;104 this->setAnimFunc(animFunc);105 105 } 106 106 … … 109 109 tmpKeyFrame->duration = duration; 110 110 tmpKeyFrame->animFunc = animFunc; 111 111 this->keyFrameCount++; 112 112 } 113 113 -
orxonox/trunk/src/util/animation/t_animation.h
r3874 r3876 157 157 KeyFrameF* tmpKeyFrame; 158 158 159 if (bHasKeys) 159 // when adding the first frame 160 if (this->keyFrameCount == 0) 161 { 162 tmpKeyFrame = this->keyFrameList->firstElement(); 163 this->setAnimFunc(animFunc); 164 } 165 else 160 166 { 161 167 tmpKeyFrame = new KeyFrameF; … … 165 171 this->keyFrameList->add(tmpKeyFrame); 166 172 } 167 // when adding the first frame168 else169 {170 tmpKeyFrame = this->keyFrameList->firstElement();171 this->bHasKeys = true;172 this->setAnimFunc(animFunc);173 }174 173 175 174 tmpKeyFrame->value = value; 176 175 tmpKeyFrame->duration = duration; 177 176 tmpKeyFrame->animFunc = animFunc; 177 this->keyFrameCount++; 178 178 } 179 179
Note: See TracChangeset
for help on using the changeset viewer.