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


C# IRenderer类代码示例

本文整理汇总了C#中IRenderer的典型用法代码示例。如果您正苦于以下问题:C# IRenderer类的具体用法?C# IRenderer怎么用?C# IRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ViewContext

 /// <summary>
 /// Initialize a new instance of the ViewContext class.
 /// </summary>
 /// <param name="control">Control associated with rendering.</param>
 /// <param name="alignControl">Control used for aligning elements.</param>
 /// <param name="graphics">Graphics instance for drawing.</param>
 /// <param name="renderer">Rendering provider.</param>
 public ViewContext(Control control,
                    Control alignControl,
                    Graphics graphics,
                    IRenderer renderer)
     : this(null, control, alignControl, graphics, renderer)
 {
 }
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:14,代码来源:ViewContext.cs

示例2: HandleCollision

        private void HandleCollision(IHungryCreature creature, IRenderer renderer)
        {
            List<GameFieldCoords> creatureElements = new List<GameFieldCoords>();

            foreach (GameFieldCoords element in creature.GetPosition())
            {
                creatureElements.Add(element);
            }

            foreach (GameFieldCoords element in creatureElements)
            {
                if (element.Row >= renderer.GameFieldSize.Row || element.Row < 0
                    || element.Col >= renderer.GameFieldSize.Col || element.Col < 0)
                {
                    creature.IsDestroyed = true;
                }
            }

            for (int element = 0; element < creatureElements.Count - 1; element++)
            {
                if (creatureElements.Last().Row == creatureElements[element].Row
                    && creatureElements.Last().Col == creatureElements[element].Col)
                {
                    creature.IsDestroyed = true;
                }
            }
        }
开发者ID:,项目名称:,代码行数:27,代码来源:

示例3: RegisterFactory

 public void RegisterFactory(string[] blocks, IRenderer renderer)
 {
     foreach (var block in blocks)
     {
         RegisterFactory(block, renderer);
     }
 }
开发者ID:darrelmiller,项目名称:Parrot,代码行数:7,代码来源:RendererFactory.cs

示例4: GameController

 public GameController(IGameEngine gameEngine, IInputHandler inputReader, IRenderer renderer)
 {
     this.gameEngine = gameEngine;
     this.inputReader = inputReader;
     this.renderer = renderer;
     this.currentCmd = null;
 }
开发者ID:hristofornikolov,项目名称:TeamSupremeProject,代码行数:7,代码来源:GameController.cs

示例5: Engine

 public Engine(IRenderer renderer, int screenWidth, int screenHeight)
 {
     this.Renderer = renderer;
     this.ScreenWidth = screenWidth;
     this.ScreenHeight = screenHeight;
     this.Initialize();
 }
开发者ID:hristodobrev,项目名称:Software-University,代码行数:7,代码来源:Engine.cs

示例6: Configure

 public void Configure(IRenderer renderer)
 {
   foreach (var resource in _resources)
   {
     resource.Configure(renderer);
   }
 }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:7,代码来源:ResourceManager.cs

示例7: render

        public int FrameCountPerRender { get; set; } //number of frames per render (default = 1);


        public DrawingSurfaceSCBP(IRenderer renderer)
        {
            this.FrameCountPerRender = 1;

            //this.InitializeComponent();

            //if (!hasInitializedSurface)
            //{
            //    //effectRenderer = new EffectRenderer();

            //    var fpsRenderer = new FpsRenderer();

            //    d2dTarget = new SwapChainBackgroundPanelTarget(root);
            //    d2dTarget.OnRender += effectRenderer.Render;
            //    d2dTarget.OnRender += fpsRenderer.Render;

            //    deviceManager = new DeviceManager();
            //    deviceManager.OnInitialize += d2dTarget.Initialize;
            //    deviceManager.OnInitialize += effectRenderer.Initialize;
            //    deviceManager.OnInitialize += fpsRenderer.Initialize;

            //    deviceManager.Initialize(DisplayProperties.LogicalDpi);
            //    effectRenderer.InitializeUI(root, root);

            //    // Setup rendering callback
            //    CompositionTarget.Rendering += CompositionTarget_Rendering;

            //    if (_assetUri != string.Empty) effectRenderer.LoadLocalAsset(_assetUri);
            //}
        }
开发者ID:rolandsmeenk,项目名称:ModernApps,代码行数:33,代码来源:DrawingSurfaceSCBP.xaml.cs

示例8: Configure

 public virtual void Configure(IRenderer renderer)
 {
   foreach (var textureParameter in _textureParameters)
   {
     _shader.SetTextureParameter(textureParameter.Key, textureParameter.Value);
   } 
 }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:7,代码来源:Material.cs

示例9: FeatureElement

        public FeatureElement(Feature f, IRenderer renderer)
        {
            this.ClipBox = Rectangle2D.Empty;
            this.pathIsInvalid = true;
            if (f == null)
            {
                throw new ArgumentNullException("f");
            }
            this.feature = new WeakReference(f);

            if (renderer != null && (f.GetValue(Clusterer.ClusterProperty) == null))
            {
                this.GeoStyle = renderer.GetStyle(f) ?? generateDefaultSyle(f);
            }//renderer的优先级高于Feature自我的
            else
            {
                this.GeoStyle = f.Style ?? generateDefaultSyle(f);
            }
            f.SetBoundedStyle(this.GeoStyle);

            if (this.GeoStyle != null)
            {
                base.Template = this.GeoStyle.ControlTemplate;
            }

            this.Geometry = f.Geometry;
        }
开发者ID:SuperMap,项目名称:iClient-for-Silverlight,代码行数:27,代码来源:FeatureElement.cs

示例10: VisualPopupGroup

        /// <summary>
        /// Initialize a new instance of the VisualPopupGroup class.
        /// </summary>
        /// <param name="ribbon">Reference to owning ribbon control.</param>
        /// <param name="ribbonGroup">Reference to ribbon group for display.</param>
        /// <param name="renderer">Drawing renderer.</param>
        public VisualPopupGroup(KryptonRibbon ribbon,
                                KryptonRibbonGroup ribbonGroup,
                                IRenderer renderer)
            : base(renderer, true)
        {
            Debug.Assert(ribbon != null);
            Debug.Assert(ribbonGroup != null);

            // Remember references needed later
            _ribbon = ribbon;
            _ribbonGroup = ribbonGroup;

            // Create a view element for drawing the group
            _viewGroup = new ViewDrawRibbonGroup(ribbon, ribbonGroup, NeedPaintDelegate);
            _viewGroup.Collapsed = false;

            // Create the background that will contain the actual group instance
            _viewBackground = new ViewDrawRibbonGroupsBorder(ribbon, true, NeedPaintDelegate);
            _viewBackground.Add(_viewGroup);

            // Attach the root to the view manager instance
            ViewManager = new ViewRibbonPopupGroupManager(this, ribbon, _viewBackground, _viewGroup, NeedPaintDelegate);

            // Create and add a hidden button to act as the focus target
            _hiddenFocusTarget = new Button();
            _hiddenFocusTarget.TabStop = false;
            _hiddenFocusTarget.Location = new Point(-_hiddenFocusTarget.Width, -_hiddenFocusTarget.Height);
            CommonHelper.AddControlToParent(this, _hiddenFocusTarget);
        }
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:35,代码来源:VisualPopupGroup.cs

示例11: CompositeWindow

    public CompositeWindow(IController controller, IRenderer renderer, double frameRate)
    {
      if (controller == null) throw new ArgumentNullException("controller");
      if (renderer == null) throw new ArgumentNullException("renderer");
      _controller = controller;
      _renderer = renderer;
      _frameRate = frameRate;
      Width = controller.Width;
      Height = controller.Height;
      if (_controller.IsFullScreen)
        WindowState = WindowState.Maximized;
      Title = controller.Name;

      InitializeComponent();
      if (_controller.HasUserInterface)
      {
        if(_controller.CentralView != null)
          MainGrid.Children.Add((UIElement)_controller.CentralView);
        if (_controller.LeftView != null)
          LeftGrid.Children.Add((UIElement)_controller.LeftView);
        if (_controller.RightView != null)
          RightGrid.Children.Add((UIElement)_controller.RightView);
        if (_controller.TopView != null)
          TopGrid.Children.Add((UIElement)_controller.TopView);
        if (_controller.BottomView != null)
          BottomGrid.Children.Add((UIElement)_controller.BottomView);
        
      }
      Loaded += OnLoaded;
      SizeChanged += OnSizeChanged;
      
    }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:32,代码来源:CompositeWindow.xaml.cs

示例12: GameEngine

 /// <summary>
 /// Initializes a new instance of the <see cref="GameEngine" /> class.
 /// </summary>
 /// <param name="renderer">The game renderer.</param>
 /// <param name="inputMethod">The user input method.</param>
 public GameEngine(IRenderer renderer, IInputMethod inputMethod)
 {
     this.gameRenderer = renderer;
     this.inputMethod = inputMethod;
     this.scores = new HighScores(MaxTopPlayers);
     this.cmdExecutor = new DefaultGameCommandExecutor(this.gameRenderer, this.inputMethod, this.scores);
 }
开发者ID:ilkodzhambazov,项目名称:Telerik-Academy,代码行数:12,代码来源:GameEngine.cs

示例13: Engine

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="player">Player instance</param>
 /// <param name="renderer">IRender instance</param>
 /// <param name="controller">IControler instance</param>
 /// <param name="scoreBoard">Scoreboard instance</param>
 public Engine(Player player, IRenderer renderer, IController controller, ScoreBoard scoreBoard)
 {
     this.Player = player;
     this.Renderer = renderer;
     this.Controller = controller;
     this.ScoreBoard = scoreBoard;
 }
开发者ID:rnikiforova,项目名称:actinium,代码行数:14,代码来源:Engine.cs

示例14: Tube

        public Tube( IRenderer renderer )
        {
            ReferenceVertices = new GLVector3d[ 4 ];

            ReferenceVertices[0] = new GLVector3d( 0.5, -0.5, 0 );
            ReferenceVertices[1] = new GLVector3d( 0.5, 0.5, 0 );
            ReferenceVertices[2] = new GLVector3d( -0.5, 0.5, 0 );
            ReferenceVertices[3] = new GLVector3d( -0.5, -0.5, 0 );

            iFirstOuterFace = 0;
            iLastOuterFace = 3;

            iNumberFaces = 4;

            bShowCut = false;
            bShowHollow = false;

            iCutStart = 0;
            iCutEnd = MaxCut;

            this.renderer = renderer;
            SendRendererCallbacksToCrossSections();

            rotationalextrusionpath.UpdatePath();
            BuildFaces();
        }
开发者ID:hughperkins,项目名称:osmp-cs,代码行数:26,代码来源:Tube.cs

示例15: MatchRunner

        public MatchRunner(IMatch match, string playerOneFolder, string playerTwoFolder, IRenderer renderer, bool consoleLoggingDisabled, bool consoleLoggingMustScroll, string replayFolder)
        {
            Match = match;
            Renderer = renderer;

            string runFilename = Environment.OSVersion.Platform == PlatformID.Unix ? Settings.Default.BotRunFilenameLinux : Settings.Default.BotRunFilename;
            _players = new BotRunner[2];
            _players[0] = new BotRunner(
                1,
                playerOneFolder,
                runFilename
                );
            _players[1] = new BotRunner(
                2,
                playerTwoFolder,
                runFilename
                );

            match.SetPlayerName(1, _players[0].PlayerName);
            match.SetPlayerName(2, _players[1].PlayerName);

            _replayLogger = new ReplayLogger(replayFolder);

            SetupLogging(consoleLoggingDisabled, consoleLoggingMustScroll);
        }
开发者ID:rm2k,项目名称:2015-SpaceInvaders-TestHarness,代码行数:25,代码来源:MatchRunner.cs


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