示例#1
0
        public void SlowDrawAll(CCommandList cmd, Graphics.CGfxCamera camera, SceneGraph.CheckVisibleParam param)
        {
            var it = Scenes.Values.GetEnumerator();

            while (it.MoveNext())
            {
                it.Current.SlowDrawAll(cmd, camera, param);
            }
            it.Dispose();
        }
示例#2
0
 partial void CheckVisible_Editor(CCommandList cmd, Graphics.CGfxCamera camera, SceneGraph.CheckVisibleParam param);
示例#3
0
 partial void CheckVisible_Editor(CCommandList cmd, Graphics.CGfxCamera camera, SceneGraph.CheckVisibleParam param)
 {
     foreach (var i in EditorActors.Values)
     {
         i.OnCheckVisible(cmd, null, camera, param);
     }
 }
示例#4
0
        public void OnCheckVisible(CCommandList cmd, GSceneGraph scene, CGfxCamera camera, CheckVisibleParam param)
        {
            if (HostSet == null)
            {
                throw new InvalidOperationException("");
            }
            var bitSet = HostSet.PvsData[PvsIndex];

            if (scene.PVSActors != null && scene.PVSActors.Length == bitSet.BitCount)
            {
                for (int i = 0; i < bitSet.BitCount; i++)
                {
                    if (!bitSet.IsBit(i))
                    {
                        continue;
                    }

                    Actor.GActor actor = scene.PVSActors[i];
                    if (actor.NeedCheckVisible(param) == false)
                    {
                        continue;
                    }
                    if (param.FrustumCulling && actor.CheckContain(camera.CullingFrustum, true) == CGfxCamera.CFrustum.CONTAIN_TYPE.CONTAIN_TEST_OUTER)
                    {
                        continue;
                    }

                    actor.OnCheckVisible(cmd, scene, camera, param);
                }
            }
        }