当前位置: 首页>>代码示例>>C#>>正文


C# Scene.FindManagers方法代码示例

本文整理汇总了C#中Scene.FindManagers方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.FindManagers方法的具体用法?C# Scene.FindManagers怎么用?C# Scene.FindManagers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Scene的用法示例。


在下文中一共展示了Scene.FindManagers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetupScene

        internal static void SetupScene(Scene scene, out IReadOnlyList<IDirectLight> directLights, out IReadOnlyList<IIndirectLight> indirectLights)
        {
            // define deferred light managers
            // - This is slightly odd, why do we need to define these here when we could just put [DefaultManager(DeferredAmbientLightManager)] on AmbientLight
            // - This is so that AmientLights (a generic light class) have no connection to *deferred rendering*.
            scene.GetManager<DeferredAmbientLightManager>();
            scene.GetManager<DeferredPointLightManager>();
            scene.GetManager<DeferredSkyboxManager>();
            scene.GetManager<DeferredSpotLightManager>();
            scene.GetManager<DeferredSunLightManager>();

            // get lights
            directLights = scene.FindManagers<IDirectLight>();
            indirectLights = scene.FindManagers<IIndirectLight>();
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:15,代码来源:LightingComponent.cs

示例2: Initialise

        public override void Initialise(Scene scene)
        {
            _scene = scene;

            _views = from manager in scene.FindManagers<View.Manager>()
                     from view in manager.Views
                     select view;

            base.Initialise(scene);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:10,代码来源:Renderer.cs

示例3: PhysicsEngine

        public PhysicsEngine(Scene scene)
        {
            forceProviders = scene.FindManagers<IForceProvider>();
            integrators = scene.FindManagers<IIntegrator>();
            activityManagers = scene.FindManagers<IActivityManager>();
            collisionResolvers = scene.FindManagers<ICollisionResolver>();
            forceAppliers = scene.FindManagers<IForceApplier>();

            allowedPenetration = new Box<float>();
            biasFactor = new Box<float>();
            iterations = new Box<int>();
            linearVelocitySleepThreshold = new Box<float>();
            angularVelocitySleepThreshold = new Box<float>();

            AllowedPenetration = 1;
            BiasFactor = 0.2f;
            Iterations = 10;
            LinearVelocitySleepThreshold = 0.5f;
            AngularVelocitySleepThreshold = MathHelper.TwoPi * 0.025f;
        }
开发者ID:Quantumplation,项目名称:Myre,代码行数:20,代码来源:PhysicsEngine.cs

示例4: Initialise

        public override void Initialise(Scene scene)
        {
            base.Initialise(scene);

            _forceProviders = scene.FindManagers<IForceProvider>();
            _integrators = scene.FindManagers<IIntegrator>();
            _activityManagers = scene.FindManagers<IActivityManager>();
            _collisionResolvers = scene.FindManagers<ICollisionResolver>();
            _forceAppliers = scene.FindManagers<IForceApplier>();

            _allowedPenetration = new Box<float>();
            _biasFactor = new Box<float>();
            _iterations = new Box<int>();
            _linearVelocitySleepThreshold = new Box<float>();
            _angularVelocitySleepThreshold = new Box<float>();

            AllowedPenetration = 1;
            BiasFactor = 0.2f;
            Iterations = 10;
            LinearVelocitySleepThreshold = 0.5f;
            AngularVelocitySleepThreshold = MathHelper.TwoPi * 0.025f;
        }
开发者ID:ylyking,项目名称:Myre,代码行数:22,代码来源:PhysicsEngine.cs


注:本文中的Scene.FindManagers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。