public static bool areIntersecting(com.brashmonkey.spriter.SpriterRectangle rect1
                                    , com.brashmonkey.spriter.SpriterRectangle rect2)
 {
     return(rect1.isInisde(rect2.left, rect2.top) || rect1.isInisde(rect2.right, rect2
                                                                    .top) || rect1.isInisde(rect2.left, rect2.bottom) || rect1.isInisde(rect2.right,
                                                                                                                                        rect2.bottom));
 }
 public virtual void calcBoundingBox(com.brashmonkey.spriter.SpriterRectangle @base
                                     )
 {
     this.boundingBox.set(@base);
     foreach (com.brashmonkey.spriter.objects.SpriterObject @object in this.childObjects)
     {
         com.brashmonkey.spriter.SpriterPoint[] points = @object.getBoundingBox();
         this.boundingBox.left = System.Math.Min(System.Math.Min(System.Math.Min(System.Math
                                                                                 .Min(points[0].x, points[1].x), points[2].x), points[3].x), this.boundingBox.left
                                                 );
         this.boundingBox.right = System.Math.Max(System.Math.Max(System.Math.Max(System.Math
                                                                                  .Max(points[0].x, points[1].x), points[2].x), points[3].x), this.boundingBox.right
                                                  );
         this.boundingBox.top = System.Math.Max(System.Math.Max(System.Math.Max(System.Math
                                                                                .Max(points[0].y, points[1].y), points[2].y), points[3].y), this.boundingBox.top
                                                );
         this.boundingBox.bottom = System.Math.Min(System.Math.Min(System.Math.Min(System.Math
                                                                                   .Min(points[0].y, points[1].y), points[2].y), points[3].y), this.boundingBox.bottom
                                                   );
     }
     foreach (com.brashmonkey.spriter.objects.SpriterBone child in this.childBones)
     {
         child.calcBoundingBox(boundingBox);
         this.boundingBox.set(child.boundingBox);
     }
 }
 public virtual void set(com.brashmonkey.spriter.SpriterRectangle rect)
 {
     if (rect == null)
     {
         return;
     }
     this.bottom = rect.bottom;
     this.left   = rect.left;
     this.right  = rect.right;
     this.top    = rect.top;
     this.calculateSize();
 }
 public SpriterBone()
 {
     this.childBones = new System.Collections.Generic.LinkedList<com.brashmonkey.spriter.objects.SpriterBone>();
     this.childObjects = new System.Collections.Generic.LinkedList<com.brashmonkey.spriter.objects.SpriterObject>();
     this.boundingBox = new com.brashmonkey.spriter.SpriterRectangle(0, 0, 0, 0);
 }
 public SpriterRectangle(com.brashmonkey.spriter.SpriterRectangle rect)
 {
     this.set(rect);
 }
        /// <summary>Constructs a new SpriterAbstractPlayer object which is able to animate SpriterBone instances and SpriterObject instances.
        /// 	</summary>
        /// <remarks>Constructs a new SpriterAbstractPlayer object which is able to animate SpriterBone instances and SpriterObject instances.
        /// 	</remarks>
        /// <param name="loader">
        /// 
        /// <see cref="com.brashmonkey.spriter.file.FileLoader{I}">com.brashmonkey.spriter.file.FileLoader&lt;I&gt;
        /// 	</see>
        /// which you have to implement on your own.
        /// </param>
        /// <param name="keyframes">
        /// A list of SpriterKeyFrame arrays. See
        /// <see cref="com.brashmonkey.spriter.SpriterKeyFrameProvider.generateKeyFramePool(com.discobeard.spriter.dom.SpriterData, com.discobeard.spriter.dom.Entity)
        /// 	">com.brashmonkey.spriter.SpriterKeyFrameProvider.generateKeyFramePool(com.discobeard.spriter.dom.SpriterData, com.discobeard.spriter.dom.Entity)
        /// 	</see>
        /// to get the list.
        /// Generate these keyframes once to save memory.
        /// </param>
        public SpriterAbstractPlayer(com.brashmonkey.spriter.file.FileLoader loader,
            System.Collections.Generic.IList<com.brashmonkey.spriter.animation.SpriterAnimation
			> animations)
        {
            this.loader = loader;
            this.animations = animations;
            this.rootParent = new com.brashmonkey.spriter.objects.SpriterBone();
            this.tempParent = new com.brashmonkey.spriter.objects.SpriterBone();
            this.rootParent.setName("playerRoot");
            this.tempParent.setName("playerRoot");
            this.lastFrame = new com.brashmonkey.spriter.animation.SpriterKeyFrame();
            this.lastTempFrame = new com.brashmonkey.spriter.animation.SpriterKeyFrame();
            this.interpolator = com.brashmonkey.spriter.interpolation.SpriterLinearInterpolator
                .interpolator;
            this.players = new System.Collections.Generic.LinkedList<com.brashmonkey.spriter.player.SpriterAbstractPlayer>();
            rect = new com.brashmonkey.spriter.SpriterRectangle(0, 0, 0, 0);
        }
 public SpriterBone()
 {
     this.childBones   = new System.Collections.Generic.LinkedList <com.brashmonkey.spriter.objects.SpriterBone>();
     this.childObjects = new System.Collections.Generic.LinkedList <com.brashmonkey.spriter.objects.SpriterObject>();
     this.boundingBox  = new com.brashmonkey.spriter.SpriterRectangle(0, 0, 0, 0);
 }