public TransformTimeline() { OriginTransform = new DBTransform(); OriginPivot = new Point(); _offset = 0; }
public BoneData() { Length = 0; Global = new DBTransform(); Transform = new DBTransform(); ScaleMode = 1; FixedRotation = false; }
public BoneData() { Length = 0; Global = new DBTransform(); Transform = new DBTransform(); ScaleMode = 1; FixedRotation = false; }
/** * Copy all properties from this DBTransform instance to the passed DBTransform instance. * @param node */ public void Copy(DBTransform transform) { X = transform.X; Y = transform.Y; SkewX = transform.SkewX; SkewY = transform.SkewY; ScaleX = transform.ScaleX; ScaleY = transform.ScaleY; }
/** * @inheritDoc */ //private Vector3 vector = new Vector3 (); //private float angle; public void UpdateTransform(Com.Viperstudio.Geom.Matrix matrix, DBTransform transform) { if(_display!=null) { (_display as UnityBoneDisplay).Update(matrix); } }
/** * Copy all properties from this DBTransform instance to the passed DBTransform instance. * @param node */ public void Copy(DBTransform transform) { X = transform.X; Y = transform.Y; SkewX = transform.SkewX; SkewY = transform.SkewY; ScaleX = transform.ScaleX; ScaleY = transform.ScaleY; }
override public void Dispose() { base.Dispose(); Global = null; Transform = null; //SkeletonData pivots Pivot = null; Color = null; }
public static void TransformToMatrix(DBTransform transform, Com.Viperstudio.Geom.Matrix matrix) { matrix.A = transform.ScaleX * (float)Math.Cos (transform.SkewY); matrix.B = transform.ScaleX * (float)Math.Sin (transform.SkewY); matrix.C = -transform.ScaleY * (float)Math.Sin(transform.SkewX); matrix.D = transform.ScaleY * (float)Math.Cos(transform.SkewX); matrix.Tx = transform.X; matrix.Ty = transform.Y; }
override public void Dispose() { base.Dispose(); Global = null; Transform = null; //SkeletonData pivots Pivot = null; Color = null; }
override public void Dispose() { if (this == HIDE_TIMELINE) { return; } base.Dispose(); OriginTransform = null; OriginPivot = null; }
override public void Dispose() { if(this == HIDE_TIMELINE) { return; } base.Dispose(); OriginTransform = null; OriginPivot = null; }
public TransformFrame() { TweenEasing = 0; TweenRotate = 0; DisplayIndex = 0; Visible = true; ZOrder = float.NaN; Global = new DBTransform(); Transform = new DBTransform(); Pivot = new Point(); }
public TransformFrame() { TweenEasing = 0; TweenRotate = 0; DisplayIndex = 0; Visible = true; ZOrder = float.NaN; Global = new DBTransform(); Transform = new DBTransform(); Pivot = new Point(); }
public static void TransformPointWithParent(DBTransform transform, DBTransform parent) { TransformToMatrix(parent, _helpMatrix); _helpMatrix.Invert(); float x = transform.X; float y = transform.Y; transform.X = _helpMatrix.A * x + _helpMatrix.C * y + _helpMatrix.Tx; transform.Y = _helpMatrix.D * y + _helpMatrix.B * x + _helpMatrix.Ty; transform.SkewX = FormatRadian(transform.SkewX - parent.SkewX); transform.SkewY = FormatRadian(transform.SkewY - parent.SkewY); }
public DisplayData() { Transform = new DBTransform(); }
private static void parseTransform(Dictionary<String, Object> transformObject, DBTransform transform, Point pivot = null) { if(transformObject!=null) { if(transform!=null) { transform.X = (float)transformObject[ConstValues.A_X]; transform.Y = (float)transformObject[ConstValues.A_Y]; transform.SkewX = (float)transformObject[ConstValues.A_SKEW_X] * ConstValues.ANGLE_TO_RADIAN; transform.SkewY = (float)transformObject[ConstValues.A_SKEW_Y] * ConstValues.ANGLE_TO_RADIAN; transform.ScaleX = (float)transformObject[ConstValues.A_SCALE_X]; transform.ScaleY = (float)transformObject[ConstValues.A_SCALE_Y]; } if(pivot!=null) { pivot.X = (float)transformObject[ConstValues.A_PIVOT_X]; pivot.Y = (float)transformObject[ConstValues.A_PIVOT_Y]; } } }
public void FadeIn(Bone bone, AnimationState animationState, TransformTimeline timeline) { _bone = bone; _animationState = animationState; _timeline = timeline; _originTransform = _timeline.OriginTransform; _originPivot = _timeline.OriginPivot; //_originTransform.copy(_timeline.originTransform); /* var bLRX:Number = _bone.origin.skewX + _bone.offset.skewX + _bone._tween.skewX; var bLRY:Number = _bone.origin.skewY + _bone.offset.skewY + _bone._tween.skewY; _originTransform.skewX = bLRX + TransformUtils.formatRadian(_originTransform.skewX - bLRX); _originTransform.skewY = bLRY + TransformUtils.formatRadian(_originTransform.skewY - bLRY); */ _tweenTransform = false; _tweenColor = false; _totalTime = _animationState.TotalTime; Transform.X = 0; Transform.Y = 0; Transform.ScaleX = 0; Transform.ScaleY = 0; Transform.SkewX = 0; Transform.SkewY = 0; Pivot.X = 0; Pivot.Y = 0; _durationTransform.X = 0; _durationTransform.Y = 0; _durationTransform.ScaleX = 0; _durationTransform.ScaleY = 0; _durationTransform.SkewX = 0; _durationTransform.SkewY = 0; _durationPivot.X = 0; _durationPivot.Y = 0; _currentFrame = null; switch(_timeline.FrameList.Count) { case 0: _bone.arriveAtFrame(null, this, _animationState, false); _updateState = 0; break; case 1: _updateState = -1; break; default: _updateState = 1; break; } }
private void clearVaribles() { _updateState = 0; _bone = null; _animationState = null; _timeline = null; _currentFrame = null; _originTransform = null; _originPivot = null; }
/** * Cleans up any resources used by this DBObject instance. */ public virtual void Dispose() { UserData = null; _parent = null; _armature = null; _global = null; _origin = null; _offset = null; _tween = null; _globalTransformMatrix = null; }
public TimelineState() { Transform = new DBTransform(); Pivot = new Point(); //_originTransform = new DBTransform(); _durationTransform = new DBTransform(); _durationPivot = new Point(); _durationColor = new ColorTransform(); }
public TransformTimeline() { OriginTransform = new DBTransform(); OriginPivot = new Point(); _offset = 0; }
public DBObject() { _global = new DBTransform(); _origin = new DBTransform(); _offset = new DBTransform(); _tween = new DBTransform(); _tween.ScaleX = _tween.ScaleY = 0; _globalTransformMatrix = new Com.Viperstudio.Geom.Matrix(); _visible = true; }
private static void parseTransform(Dictionary <String,Object> transformObject,DBTransform transform,Point pivot = null) { if (transformObject != null) { if (transform != null) { transform.X = (float)transformObject[ConstValues.A_X]; transform.Y = (float)transformObject[ConstValues.A_Y]; transform.SkewX = (float)transformObject[ConstValues.A_SKEW_X] * ConstValues.ANGLE_TO_RADIAN; transform.SkewY = (float)transformObject[ConstValues.A_SKEW_Y] * ConstValues.ANGLE_TO_RADIAN; transform.ScaleX = (float)transformObject[ConstValues.A_SCALE_X]; transform.ScaleY = (float)transformObject[ConstValues.A_SCALE_Y]; } if (pivot != null) { pivot.X = (float)transformObject[ConstValues.A_PIVOT_X]; pivot.Y = (float)transformObject[ConstValues.A_PIVOT_Y]; } } }
public static void GetTimelineTransform(TransformTimeline timeline, float position, DBTransform retult) { List<Frame> frameList = timeline.FrameList; int i = frameList.Count; TransformFrame currentFrame; float tweenEasing; float progress; TransformFrame nextFrame; while(i -- >0) { currentFrame = frameList[i] as TransformFrame; if(currentFrame.Position <= position && currentFrame.Position + currentFrame.Duration > position) { tweenEasing = currentFrame.TweenEasing; if(i == frameList.Count - 1 || float.IsNaN(tweenEasing) || position == currentFrame.Position) { retult.Copy(currentFrame.Global); } else { progress = (position - currentFrame.Position) / currentFrame.Duration; if(tweenEasing!=0&&!float.IsNaN(tweenEasing)) { progress = TimelineState.GetEaseValue(progress, tweenEasing); } nextFrame = frameList[i + 1] as TransformFrame; retult.X = currentFrame.Global.X + (nextFrame.Global.X - currentFrame.Global.X) * progress; retult.Y = currentFrame.Global.Y + (nextFrame.Global.Y - currentFrame.Global.Y) * progress; retult.SkewX = TransformUtil.FormatRadian(currentFrame.Global.SkewX + (nextFrame.Global.SkewX - currentFrame.Global.SkewX) * progress); retult.SkewY = TransformUtil.FormatRadian(currentFrame.Global.SkewY + (nextFrame.Global.SkewY - currentFrame.Global.SkewY) * progress); retult.ScaleX = currentFrame.Global.ScaleX + (nextFrame.Global.ScaleX - currentFrame.Global.ScaleX) * progress; retult.ScaleY = currentFrame.Global.ScaleY + (nextFrame.Global.ScaleY - currentFrame.Global.ScaleY) * progress; } break; } } }
public void Dispose() { Global = null; Transform = null; }
public DisplayData() { Transform = new DBTransform(); }
public void Dispose() { Transform = null; Pivot = null; }
public void Dispose() { Global = null; Transform = null; }
public void Dispose() { Transform = null; Pivot = null; }