public WorldEditorControl()
 {
     InitializeComponent();
     Dock            = DockStyle.Fill;
     Screen          = new SceneScreen(Renderer);
     Renderer.Screen = Screen;
 }
Exemple #2
0
 public void Render(SceneScreen screen)
 {
     if (Visible)
     {
         OnRender(screen);
         foreach (SceneNode child in Children)
         {
             child.Render(screen);
         }
     }
 }
Exemple #3
0
 protected override void OnRender(SceneScreen screen)
 {
     if (Mesh != null)
     {
         if (Solid)
         {
             screen.RenderMesh(Mesh, WorldTransform);
         }
         if (Wireframe)
         {
             screen.Renderer.D3DContext.Rasterizer.State = screen.WireframeRasterizerState;
             screen.RenderMesh(Mesh, WorldTransform, screen.GetTexture("__blank"));
             screen.Renderer.D3DContext.Rasterizer.State = screen.DefaultRasterizerState;
         }
     }
 }
        public ModelEditorControl()
        {
            InitializeComponent();
            Dock   = DockStyle.Fill;
            Screen = new SceneScreen(d3DRenderer1);
            d3DRenderer1.Screen = Screen;

            Screen.Camera.Yaw   = MathUtil.PiOverFour;
            Screen.Camera.Pitch = MathUtil.PiOverFour;
            Screen.Updated     += (sender, timeStep) =>
            {
                Screen.Camera.Offset.Threshold = Screen.Camera.Offset.TargetValue * 0.005f;
            };
            styledTreeView1.AfterSelect += (sender, args) =>
            {
                SelectedObject = args.Node.Tag as EditableObject;
                Program.MainWindow.PropertyGrid.SelectedObject = args.Node.Tag;
            };
        }
Exemple #5
0
 protected virtual void OnRender(SceneScreen screen)
 {
 }
Exemple #6
0
 public Frame(string animationFilename, Drome.IFLFile.IFLFrame frame, SceneScreen screen)
 {
     SRV    = screen.GetTexture(Path.Combine(Path.GetDirectoryName(animationFilename), frame.TextureFilename.Replace(".tga", "." + Drome.Context.Current.Platform.ToString() + " texture")));
     Length = frame.DurationTicks / 30.0f;
 }