Class used for computing the time of impact. This class should not be constructed usually, just retrieve from the {@link SingletonPool#getTOI()}.
Пример #1
0
        public DefaultWorldPool(int argSize, int argContainerSize)
        {
            args = new object[] { this };

            pcstack = new MutableStack<Contact, PolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);
            ccstack = new MutableStack<Contact, CircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);
            cpstack = new MutableStack<Contact, PolygonAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);
            ecstack = new MutableStack<Contact, EdgeAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);
            epstack = new MutableStack<Contact, EdgeAndPolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);
            chcstack = new MutableStack<Contact, ChainAndCircleContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);
            chpstack = new MutableStack<Contact, ChainAndPolygonContact>(Settings.CONTACT_STACK_INIT_SIZE, classes, args);

            vecs = new OrderedStack<Vec2>(argSize, argContainerSize);
            vec3s = new OrderedStack<Vec3>(argSize, argContainerSize);
            mats = new OrderedStack<Mat22>(argSize, argContainerSize);
            aabbs = new OrderedStack<AABB>(argSize, argContainerSize);
            rots = new OrderedStack<Rot>(argSize, argContainerSize);
            mat33s = new OrderedStack<Mat33>(argSize, argContainerSize);

            dist = new Distance();
            collision = new Collision.Collision(this);
            toi = new TimeOfImpact(this);
        }