This struct allows a single comparison of result data no matter what the type.
Inheritance: 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;
		}