public Physics2DContactTestItem(Capsule2 capsule, int edges = 32, Category collisionCategories = Category.Category1, Category collidesWith = Category.All, int collisionGroup = 0, ModeEnum mode = ModeEnum.All) { CollisionCategories = collisionCategories; CollidesWith = collidesWith; CollisionGroup = collisionGroup; Mode = mode; Bounds = capsule.ToBounds(); Convex = MathAlgorithms.GenerateCapsuleConvex(capsule, edges); }
public bool Equals(Capsule2 v, double epsilon) { if (!Point1.Equals(ref v.Point1, epsilon)) { return(false); } if (!Point2.Equals(ref v.Point2, epsilon)) { return(false); } if (Math.Abs(Radius - v.Radius) > epsilon) { return(false); } return(true); }
public Capsule2(Capsule2 source) { Point1 = source.Point1; Point2 = source.Point2; Radius = source.Radius; }