This struct allows a single comparison of result data no matter what the type.
상속: IComparable
예제 #1
0
        bool Axiom.Core.IRaySceneQueryListener.OnQueryResult(SceneQuery.WorldFragment fragment, float distance)
        {
            // create an entry and add it to the cached result list
            RaySceneQueryResultEntry entry = new RaySceneQueryResultEntry();

            entry.Distance      = distance;
            entry.SceneObject   = null;
            entry.worldFragment = fragment;
            lastResults.Add(entry);

            // continue gathering results
            return(true);
        }
예제 #2
0
        public bool OnQueryResult(MovableObject sceneObject, float distance)
        {
            // create an entry and add it to the cached result list
            RaySceneQueryResultEntry entry = new RaySceneQueryResultEntry();

            entry.Distance      = distance;
            entry.SceneObject   = sceneObject;
            entry.worldFragment = null;
            lastResults.Add(entry);

            // continue gathering results
            return(true);
        }
예제 #3
0
        /// <summary>
        ///		Implemented to allow sorting of results based on distance.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public int CompareTo(object obj)
        {
            RaySceneQueryResultEntry entry = obj as RaySceneQueryResultEntry;

            if (Distance < entry.Distance)
            {
                // this result is less than
                return(-1);
            }
            else if (Distance > entry.Distance)
            {
                // this result is greater than
                return(1);
            }

            // they are equal
            return(0);
        }
예제 #4
0
		bool IRaySceneQueryListener.OnQueryResult( SceneQuery.WorldFragment fragment, float distance )
		{
			// create an entry and add it to the cached result list
			var entry = new RaySceneQueryResultEntry();
			entry.Distance = distance;
			entry.SceneObject = null;
			entry.worldFragment = fragment;
			this.lastResults.Add( entry );

			// continue gathering results
			return true;
		}
예제 #5
0
		public bool OnQueryResult( MovableObject sceneObject, float distance )
		{
			// create an entry and add it to the cached result list
			var entry = new RaySceneQueryResultEntry();
			entry.Distance = distance;
			entry.SceneObject = sceneObject;
			entry.worldFragment = null;
			this.lastResults.Add( entry );

			// continue gathering results
			return true;
		}