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); }
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); }
/// <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); }
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; }
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; }