Exemplo n.º 1
0
        /// Ray-cast the world for all fixtures in the path of the ray. your callback
        /// controls whether you get the closest point, any point, or n-points.
        /// The ray-cast ignores shapes that contain the starting point.
        /// @param callback a user implemented callback class.
        /// @param point1 the ray starting point
        /// @param point2 the ray ending point
        public void RayCast(RayCastCallback callback, Vector2 point1, Vector2 point2)
        {
            RayCastInput input = new RayCastInput();

            input.maxFraction = 1.0f;
            input.p1          = point1;
            input.p2          = point2;

            _rayCastCallback = callback;
            _contactManager._broadPhase.RayCast(_rayCastCallbackWrapper, ref input);
            _rayCastCallback = null;
        }
Exemplo n.º 2
0
 /// Ray-cast the world for all fixtures in the path of the ray. Your callback
 /// controls whether you get the closest point, any point, or n-points.
 /// The ray-cast ignores shapes that contain the starting point.
 /// @param callback a user implemented callback class.
 /// @param point1 the ray starting point
 /// @param point2 the ray ending point
 public void RayCast(RayCastCallback callback, Vec2 point1, Vec2 point2)
 {
     throw new NotImplementedException();
     //WorldRayCastWrapper wrapper;
     //wrapper.broadPhase = &m_contactManager.m_broadPhase;
     //wrapper.callback = callback;
     //RayCastInput input;
     //input.maxFraction = 1.0f;
     //input.p1 = point1;
     //input.p2 = point2;
     //m_contactManager.m_broadPhase.RayCast(&wrapper, input);
 }
Exemplo n.º 3
0
		/// Ray-cast the world for all fixtures in the path of the ray. Your callback
		/// controls whether you get the closest point, any point, or n-points.
		/// The ray-cast ignores shapes that contain the starting point.
		/// @param callback a user implemented callback class.
		/// @param point1 the ray starting point
		/// @param point2 the ray ending point
		public void RayCast(RayCastCallback callback, Vec2 point1, Vec2 point2){
			throw new NotImplementedException();
			//WorldRayCastWrapper wrapper;
			//wrapper.broadPhase = &m_contactManager.m_broadPhase;
			//wrapper.callback = callback;
			//RayCastInput input;
			//input.maxFraction = 1.0f;
			//input.p1 = point1;
			//input.p2 = point2;
			//m_contactManager.m_broadPhase.RayCast(&wrapper, input);
		}