示例#1
0
 public void initialize(List<RenderBase.OTexture> textures)
 {
     renderer = new RenderEngine();
     renderer.model = new RenderBase.OModelGroup();
     renderer.model.texture = textures;
     updateList();
 }
 /// <summary>
 ///     Initializes the control with animation data.
 /// </summary>
 /// <param name="renderEngine">Renderer used to render the model</param>
 /// <param name="ctrl">The animation control</param>
 /// <param name="anms">The list with animations</param>
 /// <param name="t">The animation type (used on Export/Import options)</param>
 public void initialize(RenderEngine renderEngine, RenderEngine.animationControl ctrl, RenderBase.OAnimationListBase anms, FileIO.fileType t)
 {
     renderer = renderEngine;
     control = ctrl;
     animations = anms;
     type = t;
     control.FrameChanged += Control_FrameChanged;
     updateList();
 }
        public void initialize(RenderEngine renderer)
        {
            if (renderer.model.skeletalAnimation.list.Count == 0) SkeletalAnimationsGroup.Collapsed = true;
            if (renderer.model.materialAnimation.list.Count == 0) MaterialAnimationsGroup.Collapsed = true;
            if (renderer.model.visibilityAnimation.list.Count == 0) VisibilityAnimationsGroup.Collapsed = true;

            SkeletalAnimationControl.initialize(renderer, renderer.ctrlSA, renderer.model.skeletalAnimation, FileIO.fileType.skeletalAnimation);
            MaterialAnimationControl.initialize(renderer, renderer.ctrlMA, renderer.model.materialAnimation, FileIO.fileType.materialAnimation);
            VisibilityAnimationControl.initialize(renderer, renderer.ctrlVA, renderer.model.visibilityAnimation, FileIO.fileType.visibilityAnimation);
        }
        public void launch(object data)
        {
            renderer = new RenderEngine();
            renderer.models = (RenderBase.OModelGroup)data;
            renderer.initialize(Screen.Handle, Screen.Width, Screen.Height);

            ModelsPanel.launch(renderer);
            TexturesPanel.launch(renderer);
            SkeletalAnimationsPanel.launch(renderer, FileIO.fileType.skeletalAnimation);
            MaterialAnimationsPanel.launch(renderer, FileIO.fileType.materialAnimation);
            VisibilityAnimationsPanel.launch(renderer, FileIO.fileType.visibilityAnimation);

            renderer.render();
        }
 public void launch(RenderEngine renderEngine, FileIO.fileType type)
 {
     renderer = renderEngine;
     this.type = type;
     switch (type)
     {
         case FileIO.fileType.skeletalAnimation:
             control = renderer.ctrlSA;
             animations = renderer.models.skeletalAnimation;
             break;
         case FileIO.fileType.materialAnimation:
             control = renderer.ctrlMA;
             animations = renderer.models.materialAnimation;
             break;
         case FileIO.fileType.visibilityAnimation:
             control = renderer.ctrlVA;
             animations = renderer.models.visibilityAnimation;
             break;
     }
     
     control.FrameChanged += Control_FrameChanged;
     updateList();
 }
示例#6
0
        /// <summary>
        ///     Opens the windows used for a model.
        ///     More windows can be opened later, for files with model and other data.
        /// </summary>
        /// <param name="model">The model</param>
        /// <param name="name">The file name (without the full path and extension)</param>
        private void launchModel(RenderBase.OModelGroup model, string name)
        {
            OViewportWindow viewportWindow = new OViewportWindow();
            OModelWindow modelWindow = new OModelWindow();
            OTextureWindow textureWindow = new OTextureWindow();
            OAnimationsWindow animationWindow = new OAnimationsWindow();

            viewportWindow.Title = name;

            RenderEngine renderer = new RenderEngine();
            renderer.MSAALevel = Settings.Default.reAALevel;
            renderer.bgColor = Settings.Default.reBgColor;
            renderer.useLegacyTexturing = Settings.Default.reUseLegacyTexturing;
            renderer.showGrid = Settings.Default.reShowGrids;
            renderer.showHUD = Settings.Default.reShowHUD;
            renderer.model = model;

            launchWindow(viewportWindow);
            DockContainer.dockMainWindow();
            launchWindow(modelWindow, false);
            launchWindow(textureWindow, false);
            launchWindow(animationWindow, false);

            WindowManager.Refresh();

            modelWindow.initialize(renderer);
            textureWindow.initialize(renderer);
            animationWindow.initialize(renderer);
            viewportWindow.initialize(renderer);
        }
 public void launch(RenderEngine renderer)
 {
     this.renderer = renderer;
     updateList(renderer.models.texture);
 }
示例#8
0
 public void initialize(RenderEngine renderEngine)
 {
     renderer = renderEngine;
     updateList();
 }
示例#9
0
 public void initialize(RenderEngine renderEngine)
 {
     renderer = renderEngine;
     renderer.initialize(Screen.Handle, Screen.Width, Screen.Height);
     renderer.render();
 }
 public void launch(RenderEngine renderEngine)
 {
     renderer = renderEngine;
     updateList();
 }