/// <summary> /// Sets this manifold point form the given one /// </summary> /// <param name="cp">the point to copy from</param> public void Set(ManifoldPoint cp) { LocalPoint.Set(cp.LocalPoint); NormalImpulse = cp.NormalImpulse; TangentImpulse = cp.TangentImpulse; Id.Set(cp.Id); }
/// <summary> /// Creates a manifold point as a copy of the given point /// </summary> /// <param name="cp">point to copy from</param> public ManifoldPoint(ManifoldPoint cp) { LocalPoint = cp.LocalPoint.Clone(); NormalImpulse = cp.NormalImpulse; TangentImpulse = cp.TangentImpulse; Id = new ContactID(cp.Id); }
/// <summary> /// creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints. /// </summary> public Manifold() { Points = new ManifoldPoint[Settings.MAX_MANIFOLD_POINTS]; for (int i = 0; i < Settings.MAX_MANIFOLD_POINTS; i++) { Points[i] = new ManifoldPoint(); } LocalNormal = new Vec2(); LocalPoint = new Vec2(); PointCount = 0; }
/// <summary> creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints.</summary> public Manifold() { points = new ManifoldPoint[Settings.maxManifoldPoints]; for (int i = 0; i < Settings.maxManifoldPoints; i++) { points[i] = new ManifoldPoint(); } localNormal = new Vec2(); localPoint = new Vec2(); pointCount = 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]); } }
/// <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> /// Sets this manifold point form the given one /// </summary> /// <param name="cp">the point to copy from</param> public void Set(ManifoldPoint cp) { LocalPoint.Set(cp.LocalPoint); NormalImpulse = cp.NormalImpulse; TangentImpulse = cp.TangentImpulse; Id.Set(cp.Id); }
/// <summary> /// Creates a manifold point as a copy of the given point /// </summary> /// <param name="cp">point to copy from</param> public ManifoldPoint(ManifoldPoint cp) { LocalPoint = cp.LocalPoint.Clone(); NormalImpulse = cp.NormalImpulse; TangentImpulse = cp.TangentImpulse; Id = new ContactID(cp.Id); }
/// <summary> /// creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints. /// </summary> public Manifold() { Points = new ManifoldPoint[Settings.MAX_MANIFOLD_POINTS]; for (int i = 0; i < Settings.MAX_MANIFOLD_POINTS; i++) { Points[i] = new ManifoldPoint(); } LocalNormal = new Vec2(); LocalPoint = new Vec2(); PointCount = 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]); } }
/// <summary>Creates a manifold point as a copy of the given point</summary> /// <param name="cp">point to copy from</param> public ManifoldPoint(ManifoldPoint cp) { localPoint = cp.localPoint.Clone(); normalImpulse = cp.normalImpulse; tangentImpulse = cp.tangentImpulse; id = new ContactID(cp.id); }
/// <summary> Sets this manifold point form the given one</summary> /// <param name="cp">the point to copy from /// </param> public virtual void set_Renamed(ManifoldPoint cp) { localPoint.set_Renamed(cp.localPoint); normalImpulse = cp.normalImpulse; tangentImpulse = cp.tangentImpulse; id.set_Renamed(cp.id); }