Exemplo n.º 1
0
        private DynamicTreeTest()
        {
            _worldExtent = 15.0f;
            _proxyExtent = 0.5f;

            for (int i = 0; i < _actorCount; ++i)
            {
                Actor actor = _actors[i] = new Actor();
                GetRandomAABB(ref actor.aabb);
                actor.proxyId = _tree.CreateProxy(ref actor.aabb, actor);
            }

            _stepCount = 0;

            float h = _worldExtent;

            _queryAABB.LowerBound = new Vector2(-3.0f, -4.0f + h);
            _queryAABB.UpperBound = new Vector2(5.0f, 6.0f + h);

            _rayCastInput.Point1 = new Vector2(-5.0f, 5.0f + h);
            _rayCastInput.Point2 = new Vector2(7.0f, -4.0f + h);

            //_rayCastInput.p1.Set(0.0f, 2.0f + h);
            //_rayCastInput.p2.Set(0.0f, -2.0f + h);
            _rayCastInput.MaxFraction = 1.0f;

            _automated = false;
        }
Exemplo n.º 2
0
        public DynamicTreeTest()
        {
            _worldExtent = 15.0f;
            _proxyExtent = 0.5f;

            for (int i = 0; i < e_actorCount; ++i)
            {
                _actors[i] = new Actor();

                Actor actor = _actors[i];
                GetRandomAABB(out actor.aabb);
                actor.proxyId = _tree.CreateProxy(ref actor.aabb, actor);
            }

            _stepCount = 0;

            double h = _worldExtent;

            _queryAABB.lowerBound = new Vector2(-3.0f, -4.0f + h);
            _queryAABB.upperBound = new Vector2(5.0f, 6.0f + h);

            _rayCastInput.p1 = new Vector2(-5.0f, 5.0f + h);
            _rayCastInput.p2 = new Vector2(7.0f, -4.0f + h);
            //_rayCastInput.p1 = new Vector2(0.0f, 2.0f + h);
            //_rayCastInput.p2 = new Vector2(0.0f, -2.0f + h);
            _rayCastInput.maxFraction = 1.0;

            _automated = false;
        }
Exemplo n.º 3
0
        protected override void Create()
        {
            _worldExtent = 15.0f;
            _proxyExtent = 0.5f;

            for (var i = 0; i < ActorCount; ++i)
            {
                var actor = _actors[i];
                GetRandomAABB(ref actor.AABB);
                actor.ProxyId = _tree.CreateProxy(actor.AABB, actor);
            }

            _stepCount = 0;

            var h = _worldExtent;

            _queryAABB.LowerBound.Set(-3.0f, -4.0f + h);
            _queryAABB.UpperBound.Set(5.0f, 6.0f + h);

            _rayCastInput.P1.Set(-5.0f, 5.0f + h);
            _rayCastInput.P2.Set(7.0f, -4.0f + h);

            //rayCastInput.P1.Set(0.0f, 2.0f + h);
            //rayCastInput.P2.Set(0.0f, -2.0f + h);
            _rayCastInput.MaxFraction = 1.0f;

            _automated = false;
        }
Exemplo n.º 4
0
        public DynamicTreeTest()
        {
            _worldExtent = 15.0f;
            _proxyExtent = 0.5f;

            for (var i = 0; i < ActorCount; ++i)
            {
                var actor = _actors[i];
                GetRandomAABB(ref actor.AABB);
                actor.ProxyId = _tree.CreateProxy(actor.AABB, actor);
            }

            var h = _worldExtent;

            _queryAABB.LowerBound.Set(-3.0f, -4.0f + h);
            _queryAABB.UpperBound.Set(5.0f, 6.0f + h);

            _rayCastInput.P1.Set(-5.0f, 5.0f + h);
            _rayCastInput.P2.Set(7.0f, -4.0f + h);

            _rayCastInput.MaxFraction = 1.0f;

            _automated = false;
        }