Beispiel #1
0
 public Manifold(ManifoldType type)
 {
     points      = new List <ManifoldPoint>();
     localNormal = new Vec2(0, 0);
     localPoint  = new Vec2(0, 0);
     this.type   = type;
 }
Beispiel #2
0
        /// <summary>
        /// copies this manifold from the given one
        /// </summary>
        /// <param name="cp">manifold to copy from</param>
        public void Set(Manifold cp)
        {
            for (int i = 0; i < cp.PointCount; i++)
            {
                Points[i].Set(cp.Points[i]);
            }

            Type = cp.Type;
            LocalNormal.Set(cp.LocalNormal);
            LocalPoint.Set(cp.LocalPoint);
            PointCount = cp.PointCount;
        }
Beispiel #3
0
        /**
         * copies this manifold from the given one
         *
         * @param cp manifold to copy from
         */

        public void set(Manifold cp)
        {
            for (int i = 0; i < cp.pointCount; i++)
            {
                points[i].set(cp.points[i]);
            }

            type = cp.type;
            localNormal.set(cp.localNormal);
            localPoint.set(cp.localPoint);
            pointCount = cp.pointCount;
        }
Beispiel #4
0
 /// <summary>
 /// Creates this manifold as a copy of the other
 /// </summary>
 /// <param name="other"></param>
 public Manifold(Manifold other)
 {
     Points      = new ManifoldPoint[Settings.MAX_MANIFOLD_POINTS];
     LocalNormal = other.LocalNormal.Clone();
     LocalPoint  = other.LocalPoint.Clone();
     PointCount  = other.PointCount;
     Type        = other.Type;
     // djm: this is correct now
     for (int i = 0; i < Settings.MAX_MANIFOLD_POINTS; i++)
     {
         Points[i] = new ManifoldPoint(other.Points[i]);
     }
 }
Beispiel #5
0
        /**
         * Creates this manifold as a copy of the other
         *
         * @param other
         */

        public Manifold(Manifold other)
        {
            points      = new ManifoldPoint[Settings.maxManifoldPoints];
            localNormal = other.localNormal.clone();
            localPoint  = other.localPoint.clone();
            pointCount  = other.pointCount;
            type        = other.type;
            // djm: this is correct now
            for (int i = 0; i < Settings.maxManifoldPoints; i++)
            {
                points[i] = new ManifoldPoint(other.points[i]);
            }
        }
Beispiel #6
0
 /// <summary>
 /// Creates this manifold as a copy of the other
 /// </summary>
 /// <param name="other"></param>
 public Manifold(Manifold other)
 {
     points = new ManifoldPoint[Settings.maxManifoldPoints];
     localNormal = other.localNormal.Clone();
     localPoint = other.localPoint.Clone();
     pointCount = other.pointCount;
     type = other.type;
     // djm: this is correct now
     for (int i = 0; i < Settings.maxManifoldPoints; i++)
     {
         points[i] = new ManifoldPoint(other.points[i]);
     }
 }
Beispiel #7
0
        /// <summary>
        /// copies this manifold from the given one
        /// </summary>
        /// <param name="cp">manifold to copy from
        /// </param>
        public virtual void set_Renamed(Manifold cp)
        {
            for (int i = 0; i < cp.pointCount; i++)
            {
                points[i].set_Renamed(cp.points[i]);
            }

            type = cp.type;
            localNormal.set_Renamed(cp.localNormal);
            localPoint.set_Renamed(cp.localPoint);
            pointCount = cp.pointCount;
        }
Beispiel #8
0
		public Manifold(ManifoldType type) {
			points = new List<ManifoldPoint>();
			localNormal = new Vec2(0, 0);
			localPoint = new Vec2(0, 0);
			this.type = type;
		}
Beispiel #9
0
        /// <summary>
        /// copies this manifold from the given one
        /// </summary>
        /// <param name="cp">manifold to copy from</param>
        public void Set(Manifold cp)
        {
            for (int i = 0; i < cp.PointCount; i++)
            {
                Points[i].Set(cp.Points[i]);
            }

            Type = cp.Type;
            LocalNormal.Set(cp.LocalNormal);
            LocalPoint.Set(cp.LocalPoint);
            PointCount = cp.PointCount;
        }
Beispiel #10
0
 /// <summary>
 /// Creates this manifold as a copy of the other
 /// </summary>
 /// <param name="other"></param>
 public Manifold(Manifold other)
 {
     Points = new ManifoldPoint[Settings.MAX_MANIFOLD_POINTS];
     LocalNormal = other.LocalNormal.Clone();
     LocalPoint = other.LocalPoint.Clone();
     PointCount = other.PointCount;
     Type = other.Type;
     // djm: this is correct now
     for (int i = 0; i < Settings.MAX_MANIFOLD_POINTS; i++)
     {
         Points[i] = new ManifoldPoint(other.Points[i]);
     }
 }