public override float?intersects(Microsoft.Xna.Framework.Ray ray) { float?intersection = null; Tree closest = null; //currently found but not used for anything foreach (Tree test in trees) { float?thisIntersecton = Intersection.intersects(ray, test.getTrunkBlocks()); if (thisIntersecton.HasValue) { if (intersection.HasValue == false || (float)thisIntersecton < (float)intersection) { intersection = thisIntersecton; closest = test; } } } return(intersection); }
public float?intersects(Ray ray) { return(Intersection.intersects(ray, storageSpace)); }
public override float?intersects(Microsoft.Xna.Framework.Ray ray) { return(Intersection.intersects(ray, plantBlocks.Keys.ToList())); }
public override float?intersects(Microsoft.Xna.Framework.Ray ray) { return(Intersection.intersects(ray, blocksToBeRemoved)); }