/// <summary> /// Get all elements hit by the ray and toss them to the Executor /// </summary> /// <param name="ray"></param> /// <param name="executor"></param> public void get(Ray ray, ISelectionExecutor executor) { if (m_queryTimer != null) m_queryTimer.Watch.Start(); List<SceneElement> hits = new List<SceneElement>(); m_octreeVisual.getElements(ray, executor); if (m_queryTimer != null) m_queryTimer.Watch.Stop(); }
/// <summary> /// Get all elements within the BoundingBox and toss them to the Executor /// </summary> /// <param name="bb">BoundingBox to check against</param> /// <param name="executor">SelectionExecutor that handles all hits</param> public void getCollisions(BoundingBox bb, ISelectionExecutor executor) { List<SceneElement> hits = new List<SceneElement>(); m_octreeCollision.getElements(bb, executor); }
/// <summary> /// Get all elements within the BoundingBox and toss them to the Executor /// </summary> /// <param name="bb">BoundingBox to check against</param> /// <param name="executor">SelectionExecutor that handles all hits</param> public void getVisuals(BoundingBox bb, ISelectionExecutor executor) { if (m_queryTimer != null) m_queryTimer.Watch.Start(); List<SceneElement> hits = new List<SceneElement>(); m_octreeVisual.getElements(bb, executor); if (m_queryTimer != null) m_queryTimer.Watch.Stop(); }
public void getElements(Ray ray, ISelectionExecutor executor) { m_root.getElements(ray, executor); }
public void getElements(BoundingBox bb, ISelectionExecutor executor) { m_root.getElements(bb, executor); }
public void getElements(Ray ray, ISelectionExecutor executor) { float? intersects = ray.Intersects(BoundingBox); if (intersects.HasValue) { foreach (SceneElement e in m_elements) { if (ray.Intersects(e.BoundingBox).HasValue) { executor.execute(e); if (m_children != null) { foreach (OctreeNode node in m_children) { node.getElements(ray, executor); } } } } } }
public void getElements(BoundingBox bb, ISelectionExecutor executor) { ContainmentType t = bb.Contains(BoundingBox); if (t == ContainmentType.Contains) { foreach (SceneElement e in m_elements) { executor.execute(e); if (m_children != null) { foreach (OctreeNode node in m_children) { node.getElements(bb, executor); } } } } else if (t == ContainmentType.Intersects) { foreach (SceneElement se in m_elements) { t = bb.Contains(se.BoundingBox); if (t == ContainmentType.Contains || t == ContainmentType.Intersects) { executor.execute(se); } } if (m_children != null) { foreach (OctreeNode node in m_children) { node.getElements(bb, executor); } } } return; }