Beispiel #1
0
 /// <summary>
 /// Updates the render queue with renderable instances
 /// </summary>
 /// <param name="queue">Render queue</param>
 public abstract void UpdateRenderQueue(RenderQueue queue);
Beispiel #2
0
 /// <summary>
 /// <remarks>Not supported for the Camera class </remarks>
 /// </summary>
 /// <param name="queue">Current render queue</param>
 void IMovable.UpdateRenderQueue(RenderQueue queue)
 {
     throw new NotSupportedException();
 }
Beispiel #3
0
        /// <summary>
        /// Finds all visible objects attached to this scene node
        /// </summary>
        /// <param name="cam">Current camera</param>
        /// <param name="queue">Current render queue</param>
        /// <param name="addChildren">Boolean indicating if the search goes through childrens</param>
        internal void FindVisibleObjects(Camera cam, RenderQueue queue, bool addChildren)
        {
            for (int i = 0; i < _movablesList.Count; i++)
                queue.ProcessesVisibleObject(cam, _movablesList[i]);

            if (addChildren)
            {
                for (int j = 0; j < Childrens.Count; j++)
                    ((SceneNode)Childrens[j]).FindVisibleObjects(cam, queue, true);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Renders a scene graph into a viewport
        /// </summary>
        /// <param name="vp">Viewport in which the rendering is sent</param>
        /// <param name="cam">Camera representing the point of view</param>
        /// <param name="queue">Queue of objects to render</param>
        internal void Render(Viewport vp, Camera cam, RenderQueue queue)
        {
            BeginRender();

            _renderingTechnique.Render(vp, cam, queue);

            EndRender();
        }
Beispiel #5
0
        /// <summary>
        /// Updates the given render queue with all the sub-entities of this Entity
        /// </summary>
        /// <param name="queue">RenderQueue to fill</param>
        public override void UpdateRenderQueue(RenderQueue queue)
        {
            for (int i = 0; i < _subEntities.Count; i++)
                queue.AddRenderable(_subEntities[i]);

            if (!RenderAabb) return;

            _meshAabb.UpdateBox(WorldAabb);
            queue.AddRenderable(_meshAabb);
        }