Transform::Transform(const Vector3& scale, const Matrix& rotation, const Vector3& translation) : _matrixDirtyBits(0), _listeners(NULL) { GP_REGISTER_SCRIPT_EVENTS(); _targetType = AnimationTarget::TRANSFORM; set(scale, rotation, translation); }
Transform::Transform(const Transform& copy) : _matrixDirtyBits(0), _listeners(NULL) { GP_REGISTER_SCRIPT_EVENTS(); _targetType = AnimationTarget::TRANSFORM; set(copy); }
Transform::Transform() : _matrixDirtyBits(0), _listeners(NULL) { GP_REGISTER_SCRIPT_EVENTS(); _targetType = AnimationTarget::TRANSFORM; _scale.set(Vector3::one()); }
AnimationClip::AnimationClip(const char* id, Animation* animation, unsigned long startTime, unsigned long endTime) : _id(id), _animation(animation), _startTime(startTime), _endTime(endTime), _duration(_endTime - _startTime), _stateBits(0x00), _repeatCount(1.0f), _loopBlendTime(0), _activeDuration(_duration * _repeatCount), _speed(1.0f), _timeStarted(0), _elapsedTime(0), _crossFadeToClip(NULL), _crossFadeOutElapsed(0), _crossFadeOutDuration(0), _blendWeight(1.0f), _beginListeners(NULL), _endListeners(NULL), _listeners(NULL), _listenerItr(NULL) { GP_REGISTER_SCRIPT_EVENTS(); GP_ASSERT(_animation); GP_ASSERT(0 <= startTime && startTime <= _animation->_duration && 0 <= endTime && endTime <= _animation->_duration); for (size_t i = 0, count = _animation->_channels.size(); i < count; i++) { GP_ASSERT(_animation->_channels[i]); GP_ASSERT(_animation->_channels[i]->getCurve()); _values.push_back(new AnimationValue(_animation->_channels[i]->getCurve()->getComponentCount())); } }