Beispiel #1
0
 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);
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 public Capsule2(Capsule2 source)
 {
     Point1 = source.Point1;
     Point2 = source.Point2;
     Radius = source.Radius;
 }