public Manifold(ManifoldType type) { points = new List <ManifoldPoint>(); localNormal = new Vec2(0, 0); localPoint = new Vec2(0, 0); this.type = type; }
/// <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; }
/** * 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; }
/// <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]); } }
/** * 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]); } }
/// <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]); } }
/// <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; }
public Manifold(ManifoldType type) { points = new List<ManifoldPoint>(); localNormal = new Vec2(0, 0); localPoint = new Vec2(0, 0); this.type = type; }