Ejemplo n.º 1
0
        /// A colliding pair of shapes.
        public cpArbiter(cpShape a, cpShape b)
        {
            this.handler = null;
            this.swapped = false;

            this.handlerA = null;
            this.handlerB = null;

            /// Calculated value to use for the elasticity coefficient.
            /// Override in a pre-solve collision handler for custom behavior.
            this.e = 0;
            /// Calculated value to use for the friction coefficient.
            /// Override in a pre-solve collision handler for custom behavior.
            this.u = 0;
            /// Calculated value to use for applying surface velocities.
            /// Override in a pre-solve collision handler for custom behavior.
            this.surface_vr = cpVect.Zero;

            this.a = a; this.body_a = a.body;
            this.b = b; this.body_b = b.body;

            this.thread_a = new cpArbiterThread(null, null);
            this.thread_b = new cpArbiterThread(null, null);

            this.contacts = new List <cpContact>();

            this.stamp = 0;

            this.state = cpArbiterState.FirstCollision;
        }
Ejemplo n.º 2
0
        /// A colliding pair of shapes.
        public cpArbiter(cpShape a, cpShape b)
        {
            this.handler = null;
            this.swapped = false;

            this.handlerA = null;
            this.handlerB = null;

            /// Calculated value to use for the elasticity coefficient.
            /// Override in a pre-solve collision handler for custom behavior.
            this.e = 0;
            /// Calculated value to use for the friction coefficient.
            /// Override in a pre-solve collision handler for custom behavior.
            this.u = 0;
            /// Calculated value to use for applying surface velocities.
            /// Override in a pre-solve collision handler for custom behavior.
            this.surface_vr = cpVect.Zero;

            this.a = a; this.body_a = a.body;
            this.b = b; this.body_b = b.body;

            this.thread_a = new cpArbiterThread(null, null);
            this.thread_b = new cpArbiterThread(null, null);

            this.contacts = new List<cpContact>();

            this.stamp = 0;

            this.state = cpArbiterState.FirstCollision;
        }