Example #1
0
 public override void PostProcess(TraversalContext context)
 {
     if (context.AcceptAllGrantor == this)
     {
         context.AcceptAllGrantor = null;
     }
 }
Example #2
0
 public SceneGraphRoot(SceneResources sceneResources)
 {
     mRenderContext  = new RenderContext(sceneResources);
     mDynamicRoot    = new SceneNode();
     mStaticTreeRoot = null;
     mSkyboxRoot     = new SceneNode();
     mTraversalData  = new TraversalContext();
 }
Example #3
0
 public SceneGraphRoot(SceneResources sceneResources)
 {
     mRenderContext = new RenderContext(sceneResources);
     mDynamicRoot = new SceneNode();
     mStaticTreeRoot = null;
     mSkyboxRoot = new SceneNode();
     mTraversalData = new TraversalContext();
 }
Example #4
0
 public virtual void ProcessChildren(TraversalContext context)
 {
     foreach (SceneNode child in mChildren)
     {
         child.PreProcess(context);
         child.Process(context);
         child.ProcessChildren(context);
         child.PostProcess(context);
     }
 }
        public override void Process(TraversalContext context)
        {
            base.Process(context);

            // Choose the appropriate material
            TraversalContext.MaterialFlags materialFlags = (LocalMaterialFlags | context.ExternalMaterialFlags) & mSupportedMaterialFlags;
            EffectApplication currentFringeMaterial = mFringeMaterials[materialFlags & ~(materialFlags - 1)]; // Clear all but the lowest bit (highest priority flag)

            if (currentFringeMaterial != null)
                context.AcceptForRender(this, currentFringeMaterial);
        }
Example #6
0
        public override void Process(TraversalContext context)
        {
            // Choose the appropriate material
            TraversalContext.MaterialFlags materialFlags = (LocalMaterialFlags | context.ExternalMaterialFlags) & mSupportedMaterialFlags;
            EffectApplication currentMaterial            = mMaterials[materialFlags & ~(materialFlags - 1)]; // Clear all but the lowest bit (highest priority flag)

            if (currentMaterial != null)
            {
                context.AcceptForRender(this, currentMaterial);
            }
        }
 public override void ProcessChildren(TraversalContext context)
 {
     if (context.AcceptAllGrantor == null)
     {
         ContainmentType result = TestFrustum(context.VisibilityFrustum, context.Transform.Top);
         if (result == ContainmentType.Contains)
         {
             context.AcceptAllGrantor = this;
             base.ProcessChildren(context);
         }
         else if (result == ContainmentType.Intersects)
         {
             base.ProcessChildren(context);
         }
     }
     else
     {
         base.ProcessChildren(context);
     }
 }
Example #8
0
 public override void ProcessChildren(TraversalContext context)
 {
     if (context.AcceptAllGrantor == null)
     {
         ContainmentType result = TestFrustum(context.VisibilityFrustum, context.Transform.Top);
         if (result == ContainmentType.Contains)
         {
             context.AcceptAllGrantor = this;
             base.ProcessChildren(context);
         }
         else if (result == ContainmentType.Intersects)
         {
             base.ProcessChildren(context);
         }
     }
     else
     {
         base.ProcessChildren(context);
     }
 }
 public override void PostProcess(TraversalContext context)
 {
     if (context.AcceptAllGrantor == this)
         context.AcceptAllGrantor = null;
 }
 // For the key, please only set one flag at a time.
 public void AddFringeMaterial(TraversalContext.MaterialFlags materialFlag, EffectApplication fringeMaterial)
 {
     mFringeMaterials.Add(materialFlag, fringeMaterial);
 }
Example #11
0
 public virtual void PostProcess(TraversalContext context)
 {
 }
Example #12
0
 public override void PostProcess(TraversalContext context)
 {
     context.Transform.Pop();
 }
Example #13
0
 public virtual void ProcessChildren(TraversalContext context)
 {
     foreach (SceneNode child in mChildren)
     {
         child.PreProcess(context);
         child.Process(context);
         child.ProcessChildren(context);
         child.PostProcess(context);
     }
 }
Example #14
0
 public virtual void Process(TraversalContext context)
 {
 }
        public override void Process(TraversalContext context)
        {
            // Choose the appropriate material
            TraversalContext.MaterialFlags materialFlags = (LocalMaterialFlags | context.ExternalMaterialFlags) & mSupportedMaterialFlags;
            EffectApplication currentMaterial = mMaterials[materialFlags & ~(materialFlags - 1)]; // Clear all but the lowest bit (highest priority flag)

            if (currentMaterial != null &&
                mParticleData.FirstActiveParticleIndex != mParticleData.FirstFreeParticleIndex)
            {
                context.AcceptForRender(this, currentMaterial);
            }
        }
Example #16
0
 public override void PreProcess(TraversalContext context)
 {
     context.Transform.Push();
     context.Transform.MultMatrixLocal(Transform);
 }
Example #17
0
 public override void PostProcess(TraversalContext context)
 {
     context.Transform.Pop();
 }
Example #18
0
 // For the key, please only set one flag at a time.
 // Provide a material to use for special rendering modes.  You can supply a null material if the node should not draw anything
 // for a certain mode (usually to not participate in the shadow pass.)
 public void AddMaterial(TraversalContext.MaterialFlags materialFlag, EffectApplication material)
 {
     mMaterials.Add(materialFlag, material);
     mSupportedMaterialFlags |= materialFlag;
 }
Example #19
0
 public override void PreProcess(TraversalContext context)
 {
     context.Transform.Push();
     context.Transform.MultMatrixLocal(Transform);
 }