/** Adds the attached objects of this PCZSceneNode into the queue. */ public void AddToRenderQueue(Camera cam, RenderQueue queue, bool onlyShadowCasters, VisibleObjectsBoundsInfo visibleBounds) { foreach (var pair in this.objectsByName) { pair.Value.NotifyCurrentCamera(cam); if (pair.Value.IsVisible && (!onlyShadowCasters || pair.Value.CastShadows)) { pair.Value.UpdateRenderQueue(queue); if (!visibleBounds.aabb.IsNull) { visibleBounds.Merge(pair.Value.GetWorldBoundingBox(true), pair.Value.GetWorldBoundingSphere(true), cam); } } } }
/// <summary> /// Adds all the attached scenenodes to the render queue. /// </summary> /// <param name="cam"></param> /// <param name="queue"></param> public void AddToRenderQueue(Camera cam, RenderQueue queue, bool onlyShadowCasters, VisibleObjectsBoundsInfo visibleBounds) { // int i; foreach (MovableObject obj in objectList.Values) { obj.NotifyCurrentCamera(cam); if (obj.IsVisible && (!onlyShadowCasters || obj.CastShadows)) { obj.UpdateRenderQueue(queue); if (visibleBounds != null) { visibleBounds.Merge(obj.GetWorldBoundingBox(true), obj.GetWorldBoundingSphere(true), cam); } } } }