/**
         * Compares for reference equality and value equality.
         */
        public bool equals(CollisionElasticPdu rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
                return false;

            ivarsEqual = base.Equals(rhs);

            if( ! (_issuingEntityID.Equals( rhs._issuingEntityID) )) ivarsEqual = false;
            if( ! (_collidingEntityID.Equals( rhs._collidingEntityID) )) ivarsEqual = false;
            if( ! (_collisionEventID.Equals( rhs._collisionEventID) )) ivarsEqual = false;
            if( ! (_pad == rhs._pad)) ivarsEqual = false;
            if( ! (_contactVelocity.Equals( rhs._contactVelocity) )) ivarsEqual = false;
            if( ! (_mass == rhs._mass)) ivarsEqual = false;
            if( ! (_location.Equals( rhs._location) )) ivarsEqual = false;
            if( ! (_collisionResultXX == rhs._collisionResultXX)) ivarsEqual = false;
            if( ! (_collisionResultXY == rhs._collisionResultXY)) ivarsEqual = false;
            if( ! (_collisionResultXZ == rhs._collisionResultXZ)) ivarsEqual = false;
            if( ! (_collisionResultYY == rhs._collisionResultYY)) ivarsEqual = false;
            if( ! (_collisionResultYZ == rhs._collisionResultYZ)) ivarsEqual = false;
            if( ! (_collisionResultZZ == rhs._collisionResultZZ)) ivarsEqual = false;
            if( ! (_unitSurfaceNormal.Equals( rhs._unitSurfaceNormal) )) ivarsEqual = false;
            if( ! (_coefficientOfRestitution == rhs._coefficientOfRestitution)) ivarsEqual = false;

            return ivarsEqual;
        }
Exemplo n.º 2
0
        /**
         * Compares for reference equality and value equality.
         */
        public bool equals(CollisionElasticPdu rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            ivarsEqual = base.Equals(rhs);

            if (!(_issuingEntityID.Equals(rhs._issuingEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_collidingEntityID.Equals(rhs._collidingEntityID)))
            {
                ivarsEqual = false;
            }
            if (!(_collisionEventID.Equals(rhs._collisionEventID)))
            {
                ivarsEqual = false;
            }
            if (!(_pad == rhs._pad))
            {
                ivarsEqual = false;
            }
            if (!(_contactVelocity.Equals(rhs._contactVelocity)))
            {
                ivarsEqual = false;
            }
            if (!(_mass == rhs._mass))
            {
                ivarsEqual = false;
            }
            if (!(_location.Equals(rhs._location)))
            {
                ivarsEqual = false;
            }
            if (!(_collisionResultXX == rhs._collisionResultXX))
            {
                ivarsEqual = false;
            }
            if (!(_collisionResultXY == rhs._collisionResultXY))
            {
                ivarsEqual = false;
            }
            if (!(_collisionResultXZ == rhs._collisionResultXZ))
            {
                ivarsEqual = false;
            }
            if (!(_collisionResultYY == rhs._collisionResultYY))
            {
                ivarsEqual = false;
            }
            if (!(_collisionResultYZ == rhs._collisionResultYZ))
            {
                ivarsEqual = false;
            }
            if (!(_collisionResultZZ == rhs._collisionResultZZ))
            {
                ivarsEqual = false;
            }
            if (!(_unitSurfaceNormal.Equals(rhs._unitSurfaceNormal)))
            {
                ivarsEqual = false;
            }
            if (!(_coefficientOfRestitution == rhs._coefficientOfRestitution))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }