示例#1
0
文件: Node.cs 项目: raizam/GeonBit
 /// <summary>
 /// Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed.
 /// We use this to set this node as "dirty", eg that we need to update local transformations.
 /// </summary>
 protected virtual void OnTransformationsSet()
 {
     if (UseExternalTransformations)
     {
         return;
     }
     _isDirty = true;
     NodesManager.AddNodeToUpdateQueue(this);
 }
示例#2
0
 /// <summary>
 /// Called when local transformations are set, eg when Position, Rotation, Scale etc. is changed.
 /// We use this to set this node as "dirty", eg that we need to update local transformations.
 /// </summary>
 protected virtual void OnTransformationsSet()
 {
     if (UseExternalTransformations)
     {
         return;
     }
     Utils.CountAndAlert.Count(Utils.CountAndAlert.PredefAlertTypes.ValueChanged);
     NodesManager.AddNodeToUpdateQueue(this);
     _isDirty = true;
 }
示例#3
0
        /// <summary>
        /// Finish a drawing frame and render everything in queues.
        /// </summary>
        public static void EndDrawFrame()
        {
            // draw rendering queues
            RenderingQueues.DrawQueues();

            // notify nodes manager that a frame ended
            NodesManager.EndFrame();

            // clear the last material applied
            Materials.MaterialAPI._lastMaterialApplied = null;
        }
示例#4
0
        /// <summary>
        /// Start a drawing frame.
        /// </summary>
        public static void StartDrawFrame()
        {
            // update culling nodes camera frustum
            CullingNode.CurrentCameraFrustum = ActiveCamera != null ? ActiveCamera.ViewFrustum : null;

            // update materials view and projection matrix
            if (ActiveCamera != null)
            {
                Materials.MaterialAPI.SetViewProjection(ActiveCamera.View, ActiveCamera.Projection);
            }

            // notify nodes manager that a frame started
            NodesManager.StartFrame();
        }
示例#5
0
        /// <summary>
        /// Finish a drawing frame and render everything in queues.
        /// </summary>
        public static void EndDrawFrame()
        {
            // draw rendering queues
            RenderingQueues.DrawQueues();

            // notify nodes manager that a frame ended
            NodesManager.EndFrame();

            // start frame for deferred lighting manager
            if (IsDeferredLightingEnabled)
            {
                _DeferredLighting.FrameEnd();
            }

            // clear the last material applied
            Materials.MaterialAPI._lastMaterialApplied = null;
        }