Changeset 488

Show
Ignore:
Timestamp:
12/06/07 11:36:21 (1 year ago)
Author:
phill
Message:

o Viewer WIP stuff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/x42view.net/Gui/ModelWindow.Preview.Topology.cs

    r402 r488  
    278278                        UploadTopoData(); 
    279279 
    280                         topoPreviewFrameCookie = frameCookie; 
     280                        topoPreviewFrameCookieStrip = frameCookie; 
    281281                } 
    282282 
     
    300300                } 
    301301 
    302                 private object topoPreviewFrameCookie; 
    303  
    304                 private void UpdateTopologyPreviewState() 
    305                 { 
    306                         if( topoPreviewFrameCookie != frameCookie ) 
     302                private object topoPreviewFrameCookieStrip; 
     303                private object topoPreviewFrameCookieNTb; 
     304 
     305                private void UpdateTopologyStripPreviewState() 
     306                { 
     307                        if( topoPreviewFrameCookieStrip != frameCookie ) 
    307308                        { 
    308309                                GenGroupTopology(); 
    309310                                UploadTopoData(); 
    310311 
    311                                 topoPreviewFrameCookie = frameCookie; 
    312                         } 
     312                                topoPreviewFrameCookieStrip = frameCookie; 
     313                        } 
     314                } 
     315 
     316                private void UpdateTopologyNTbPreviewState() 
     317                { 
     318                } 
     319 
     320                public enum TopologyShadingMode 
     321                { 
     322                        Strips, 
     323                        TexCoords, 
     324                        None, 
    313325                } 
    314326 
     
    319331                                return; 
    320332 
    321                         UpdateTopologyPreviewState(); 
     333                        UpdateTopologyStripPreviewState(); 
    322334 
    323335                        Device dev = pn3D.Device; 
  • trunk/x42view.net/Gui/PreviewOptions.Designer.cs

    r487 r488  
    4040                        this.pnOpts = new System.Windows.Forms.Panel(); 
    4141                        this.gbShaded = new System.Windows.Forms.GroupBox(); 
     42                        this.tbBumpDepth = new System.Windows.Forms.TrackBar(); 
     43                        this.label3 = new System.Windows.Forms.Label(); 
    4244                        this.cbShadedUseNMap = new System.Windows.Forms.CheckBox(); 
    4345                        this.gbShadedLights = new System.Windows.Forms.GroupBox(); 
     
    7173                        this.cbLighting = new System.Windows.Forms.CheckBox(); 
    7274                        this.colorDialog = new System.Windows.Forms.ColorDialog(); 
    73                         this.label3 = new System.Windows.Forms.Label(); 
    74                         this.tbBumpDepth = new System.Windows.Forms.TrackBar(); 
     75                        this.gbTopology = new System.Windows.Forms.GroupBox(); 
     76                        this.gbTanBasis = new System.Windows.Forms.GroupBox(); 
     77                        this.cbTopoNorm = new System.Windows.Forms.CheckBox(); 
     78                        this.cbTopoTanBin = new System.Windows.Forms.CheckBox(); 
     79                        this.gbTopoShading = new System.Windows.Forms.GroupBox(); 
     80                        this.rbTopoShadeUVs = new System.Windows.Forms.RadioButton(); 
     81                        this.rbTopoShadeNone = new System.Windows.Forms.RadioButton(); 
     82                        this.rbTopoShadeStrips = new System.Windows.Forms.RadioButton(); 
    7583                        this.pnOpts.SuspendLayout(); 
    7684                        this.gbShaded.SuspendLayout(); 
     85                        ((System.ComponentModel.ISupportInitialize)(this.tbBumpDepth)).BeginInit(); 
    7786                        this.gbShadedLights.SuspendLayout(); 
    7887                        ((System.ComponentModel.ISupportInitialize)(this.tbKeySpec)).BeginInit(); 
     
    8291                        this.gbGeneral.SuspendLayout(); 
    8392                        this.gbFillMode.SuspendLayout(); 
    84                         ((System.ComponentModel.ISupportInitialize)(this.tbBumpDepth)).BeginInit(); 
     93                        this.gbTopology.SuspendLayout(); 
     94                        this.gbTanBasis.SuspendLayout(); 
     95                        this.gbTopoShading.SuspendLayout(); 
    8596                        this.SuspendLayout(); 
    8697                        //  
     
    89100                        this.pnOpts.AutoScroll = true; 
    90101                        this.pnOpts.Controls.Add( this.gbShaded ); 
     102                        this.pnOpts.Controls.Add( this.gbTopology ); 
    91103                        this.pnOpts.Controls.Add( this.gbSkel ); 
    92104                        this.pnOpts.Controls.Add( this.gbGeneral ); 
     
    94106                        this.pnOpts.Location = new System.Drawing.Point( 0, 25 ); 
    95107                        this.pnOpts.Name = "pnOpts"; 
    96                         this.pnOpts.Size = new System.Drawing.Size( 307, 593 ); 
     108                        this.pnOpts.Size = new System.Drawing.Size( 307, 779 ); 
    97109                        this.pnOpts.TabIndex = 2; 
    98110                        //  
    99111                        // gbShaded 
    100112                        //  
     113                        this.gbShaded.Controls.Add( this.gbShadedLights ); 
    101114                        this.gbShaded.Controls.Add( this.tbBumpDepth ); 
    102115                        this.gbShaded.Controls.Add( this.label3 ); 
    103116                        this.gbShaded.Controls.Add( this.cbShadedUseNMap ); 
    104                         this.gbShaded.Controls.Add( this.gbShadedLights ); 
    105117                        this.gbShaded.Dock = System.Windows.Forms.DockStyle.Top; 
    106                         this.gbShaded.Location = new System.Drawing.Point( 0, 256 ); 
     118                        this.gbShaded.Location = new System.Drawing.Point( 0, 444 ); 
    107119                        this.gbShaded.Name = "gbShaded"; 
    108120                        this.gbShaded.Size = new System.Drawing.Size( 307, 334 ); 
     
    110122                        this.gbShaded.TabStop = false; 
    111123                        this.gbShaded.Text = "Shaded View"; 
     124                        //  
     125                        // tbBumpDepth 
     126                        //  
     127                        this.tbBumpDepth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     128                                                | System.Windows.Forms.AnchorStyles.Right))); 
     129                        this.tbBumpDepth.AutoSize = false; 
     130                        this.tbBumpDepth.Location = new System.Drawing.Point( 152, 42 ); 
     131                        this.tbBumpDepth.Maximum = 100; 
     132                        this.tbBumpDepth.Name = "tbBumpDepth"; 
     133                        this.tbBumpDepth.Size = new System.Drawing.Size( 149, 24 ); 
     134                        this.tbBumpDepth.TabIndex = 2; 
     135                        this.tbBumpDepth.TickFrequency = 2; 
     136                        this.tbBumpDepth.TickStyle = System.Windows.Forms.TickStyle.None; 
     137                        this.tbBumpDepth.Value = 50; 
     138                        this.tbBumpDepth.ValueChanged += new System.EventHandler( this.tbBumpDepth_ValueChanged ); 
     139                        //  
     140                        // label3 
     141                        //  
     142                        this.label3.AutoSize = true; 
     143                        this.label3.Location = new System.Drawing.Point( 25, 39 ); 
     144                        this.label3.Name = "label3"; 
     145                        this.label3.Size = new System.Drawing.Size( 66, 13 ); 
     146                        this.label3.TabIndex = 6; 
     147                        this.label3.Text = "Bump Depth"; 
    112148                        //  
    113149                        // cbShadedUseNMap 
     
    370406                        this.tbBoneSize.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    371407                                                | System.Windows.Forms.AnchorStyles.Right))); 
    372                         this.tbBoneSize.Location = new System.Drawing.Point( 67, 16 ); 
     408                        this.tbBoneSize.Location = new System.Drawing.Point( 152, 16 ); 
    373409                        this.tbBoneSize.Name = "tbBoneSize"; 
    374                         this.tbBoneSize.Size = new System.Drawing.Size( 234, 45 ); 
     410                        this.tbBoneSize.Size = new System.Drawing.Size( 149, 45 ); 
    375411                        this.tbBoneSize.TabIndex = 1; 
    376412                        this.tbBoneSize.TickFrequency = 2; 
     413                        this.tbBoneSize.TickStyle = System.Windows.Forms.TickStyle.None; 
    377414                        this.tbBoneSize.Value = 5; 
    378415                        this.tbBoneSize.ValueChanged += new System.EventHandler( this.option_ValueChanged ); 
     
    494531                        this.colorDialog.FullOpen = true; 
    495532                        //  
    496                         // label3 
    497                         //  
    498                         this.label3.AutoSize = true; 
    499                         this.label3.Location = new System.Drawing.Point( 6, 44 ); 
    500                         this.label3.Name = "label3"; 
    501                         this.label3.Size = new System.Drawing.Size( 66, 13 ); 
    502                         this.label3.TabIndex = 6; 
    503                         this.label3.Text = "Bump Depth"; 
    504                         //  
    505                         // tbBumpDepth 
    506                         //  
    507                         this.tbBumpDepth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     533                        // gbTopology 
     534                        //  
     535                        this.gbTopology.Controls.Add( this.gbTopoShading ); 
     536                        this.gbTopology.Controls.Add( this.gbTanBasis ); 
     537                        this.gbTopology.Dock = System.Windows.Forms.DockStyle.Top; 
     538                        this.gbTopology.Location = new System.Drawing.Point( 0, 256 ); 
     539                        this.gbTopology.Name = "gbTopology"; 
     540                        this.gbTopology.Size = new System.Drawing.Size( 307, 188 ); 
     541                        this.gbTopology.TabIndex = 6; 
     542                        this.gbTopology.TabStop = false; 
     543                        this.gbTopology.Text = "Topology View"; 
     544                        //  
     545                        // gbTanBasis 
     546                        //  
     547                        this.gbTanBasis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    508548                                                | System.Windows.Forms.AnchorStyles.Right))); 
    509                         this.tbBumpDepth.AutoSize = false; 
    510                         this.tbBumpDepth.Location = new System.Drawing.Point( 152, 42 ); 
    511                         this.tbBumpDepth.Maximum = 100; 
    512                         this.tbBumpDepth.Name = "tbBumpDepth"; 
    513                         this.tbBumpDepth.Size = new System.Drawing.Size( 149, 24 ); 
    514                         this.tbBumpDepth.TabIndex = 2; 
    515                         this.tbBumpDepth.TickFrequency = 2; 
    516                         this.tbBumpDepth.TickStyle = System.Windows.Forms.TickStyle.None; 
    517                         this.tbBumpDepth.Value = 50; 
    518                         this.tbBumpDepth.ValueChanged += new System.EventHandler( this.tbBumpDepth_ValueChanged ); 
     549                        this.gbTanBasis.Controls.Add( this.cbTopoTanBin ); 
     550                        this.gbTanBasis.Controls.Add( this.cbTopoNorm ); 
     551                        this.gbTanBasis.Location = new System.Drawing.Point( 9, 114 ); 
     552                        this.gbTanBasis.Name = "gbTanBasis"; 
     553                        this.gbTanBasis.Size = new System.Drawing.Size( 292, 66 ); 
     554                        this.gbTanBasis.TabIndex = 7; 
     555                        this.gbTanBasis.TabStop = false; 
     556                        this.gbTanBasis.Text = "Tangent Basis"; 
     557                        //  
     558                        // cbTopoNorm 
     559                        //  
     560                        this.cbTopoNorm.AutoSize = true; 
     561                        this.cbTopoNorm.Location = new System.Drawing.Point( 22, 19 ); 
     562                        this.cbTopoNorm.Name = "cbTopoNorm"; 
     563                        this.cbTopoNorm.Size = new System.Drawing.Size( 94, 17 ); 
     564                        this.cbTopoNorm.TabIndex = 0; 
     565                        this.cbTopoNorm.Text = "Show Normals"; 
     566                        this.cbTopoNorm.UseVisualStyleBackColor = true; 
     567                        this.cbTopoNorm.CheckedChanged += new System.EventHandler( this.option_ValueChanged ); 
     568                        //  
     569                        // cbTopoTanBin 
     570                        //  
     571                        this.cbTopoTanBin.AutoSize = true; 
     572                        this.cbTopoTanBin.Location = new System.Drawing.Point( 22, 42 ); 
     573                        this.cbTopoTanBin.Name = "cbTopoTanBin"; 
     574                        this.cbTopoTanBin.Size = new System.Drawing.Size( 170, 17 ); 
     575                        this.cbTopoTanBin.TabIndex = 1; 
     576                        this.cbTopoTanBin.Text = "Show Tangents and Binormals"; 
     577                        this.cbTopoTanBin.UseVisualStyleBackColor = true; 
     578                        this.cbTopoTanBin.CheckedChanged += new System.EventHandler( this.option_ValueChanged ); 
     579                        //  
     580                        // gbTopoShading 
     581                        //  
     582                        this.gbTopoShading.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     583                                                | System.Windows.Forms.AnchorStyles.Right))); 
     584                        this.gbTopoShading.Controls.Add( this.rbTopoShadeUVs ); 
     585                        this.gbTopoShading.Controls.Add( this.rbTopoShadeNone ); 
     586                        this.gbTopoShading.Controls.Add( this.rbTopoShadeStrips ); 
     587                        this.gbTopoShading.Location = new System.Drawing.Point( 9, 19 ); 
     588                        this.gbTopoShading.Name = "gbTopoShading"; 
     589                        this.gbTopoShading.Size = new System.Drawing.Size( 292, 89 ); 
     590                        this.gbTopoShading.TabIndex = 8; 
     591                        this.gbTopoShading.TabStop = false; 
     592                        this.gbTopoShading.Text = "Shading"; 
     593                        //  
     594                        // rbTopoShadeUVs 
     595                        //  
     596                        this.rbTopoShadeUVs.AutoSize = true; 
     597                        this.rbTopoShadeUVs.Location = new System.Drawing.Point( 19, 42 ); 
     598                        this.rbTopoShadeUVs.Name = "rbTopoShadeUVs"; 
     599                        this.rbTopoShadeUVs.Size = new System.Drawing.Size( 120, 17 ); 
     600                        this.rbTopoShadeUVs.TabIndex = 2; 
     601                        this.rbTopoShadeUVs.Text = "Texture Coordinates"; 
     602                        this.rbTopoShadeUVs.UseVisualStyleBackColor = true; 
     603                        this.rbTopoShadeUVs.CheckedChanged += new System.EventHandler( this.option_ValueChanged ); 
     604                        //  
     605                        // rbTopoShadeNone 
     606                        //  
     607                        this.rbTopoShadeNone.AutoSize = true; 
     608                        this.rbTopoShadeNone.Location = new System.Drawing.Point( 19, 65 ); 
     609                        this.rbTopoShadeNone.Name = "rbTopoShadeNone"; 
     610                        this.rbTopoShadeNone.Size = new System.Drawing.Size( 51, 17 ); 
     611                        this.rbTopoShadeNone.TabIndex = 1; 
     612                        this.rbTopoShadeNone.Text = "None"; 
     613                        this.rbTopoShadeNone.UseVisualStyleBackColor = true; 
     614                        this.rbTopoShadeNone.CheckedChanged += new System.EventHandler( this.option_ValueChanged ); 
     615                        //  
     616                        // rbTopoShadeStrips 
     617                        //  
     618                        this.rbTopoShadeStrips.AutoSize = true; 
     619                        this.rbTopoShadeStrips.Checked = true; 
     620                        this.rbTopoShadeStrips.Location = new System.Drawing.Point( 19, 19 ); 
     621                        this.rbTopoShadeStrips.Name = "rbTopoShadeStrips"; 
     622                        this.rbTopoShadeStrips.Size = new System.Drawing.Size( 51, 17 ); 
     623                        this.rbTopoShadeStrips.TabIndex = 0; 
     624                        this.rbTopoShadeStrips.TabStop = true; 
     625                        this.rbTopoShadeStrips.Text = "Strips"; 
     626                        this.rbTopoShadeStrips.UseVisualStyleBackColor = true; 
     627                        this.rbTopoShadeStrips.CheckedChanged += new System.EventHandler( this.option_ValueChanged ); 
    519628                        //  
    520629                        // PreviewOptions 
     
    525634                        this.Controls.Add( this.pnOpts ); 
    526635                        this.Name = "PreviewOptions"; 
    527                         this.Size = new System.Drawing.Size( 307, 628 ); 
     636                        this.Size = new System.Drawing.Size( 307, 814 ); 
    528637                        this.ToolImage = global::x42view.Properties.Resources.camera; 
    529638                        this.Controls.SetChildIndex( this.pnOpts, 0 ); 
     
    531640                        this.gbShaded.ResumeLayout( false ); 
    532641                        this.gbShaded.PerformLayout(); 
     642                        ((System.ComponentModel.ISupportInitialize)(this.tbBumpDepth)).EndInit(); 
    533643                        this.gbShadedLights.ResumeLayout( false ); 
    534644                        this.gbShadedLights.PerformLayout(); 
     
    542652                        this.gbFillMode.ResumeLayout( false ); 
    543653                        this.gbFillMode.PerformLayout(); 
    544                         ((System.ComponentModel.ISupportInitialize)(this.tbBumpDepth)).EndInit(); 
     654                        this.gbTopology.ResumeLayout( false ); 
     655                        this.gbTanBasis.ResumeLayout( false ); 
     656                        this.gbTanBasis.PerformLayout(); 
     657                        this.gbTopoShading.ResumeLayout( false ); 
     658                        this.gbTopoShading.PerformLayout(); 
    545659                        this.ResumeLayout( false ); 
    546660                        this.PerformLayout(); 
     
    585699                private System.Windows.Forms.TrackBar tbBumpDepth; 
    586700                private System.Windows.Forms.Label label3; 
     701                private System.Windows.Forms.GroupBox gbTopology; 
     702                private System.Windows.Forms.GroupBox gbTanBasis; 
     703                private System.Windows.Forms.CheckBox cbTopoTanBin; 
     704                private System.Windows.Forms.CheckBox cbTopoNorm; 
     705                private System.Windows.Forms.GroupBox gbTopoShading; 
     706                private System.Windows.Forms.RadioButton rbTopoShadeUVs; 
     707                private System.Windows.Forms.RadioButton rbTopoShadeNone; 
     708                private System.Windows.Forms.RadioButton rbTopoShadeStrips; 
    587709        } 
    588710} 
  • trunk/x42view.net/Gui/PreviewOptions.cs

    r487 r488  
    6666                } 
    6767 
     68                #region General Options 
    6869                public Color BackgroundColor 
    6970                { 
     
    7980                { 
    8081                        get { return cbLighting.Checked && cbSpecular.Checked; } 
    81                 } 
    82  
    83                 public int BoneSize 
    84                 { 
    85                         get { return tbBoneSize.Value; } 
    8682                } 
    8783 
     
    10096                        } 
    10197                } 
    102  
     98                #endregion 
     99 
     100                #region Skeleton View Options 
     101                public int BoneSize 
     102                { 
     103                        get { return tbBoneSize.Value; } 
     104                } 
     105                #endregion 
     106 
     107                #region Topology View Options 
     108                public ModelWindow.TopologyShadingMode TopologyShadingMode 
     109                { 
     110                        get 
     111                        { 
     112                                if( rbTopoShadeStrips.Checked ) 
     113                                        return ModelWindow.TopologyShadingMode.Strips; 
     114                                if( rbTopoShadeUVs.Checked ) 
     115                                        return ModelWindow.TopologyShadingMode.TexCoords; 
     116                                if( rbTopoShadeNone.Checked ) 
     117                                        return ModelWindow.TopologyShadingMode.None; 
     118                                 
     119                                return ModelWindow.TopologyShadingMode.None; 
     120                        } 
     121                } 
     122 
     123                public bool TopoShowNormals 
     124                { 
     125                        get { return cbTopoNorm.Checked; } 
     126                } 
     127 
     128                public bool TopoShowTanBasis 
     129                { 
     130                        get { return cbTopoTanBin.Checked; } 
     131                } 
     132                #endregion 
     133 
     134                #region Shaded View Options 
    103135                public Vector3 AmbientLightColor 
    104136                { 
     
    153185                        } 
    154186                } 
     187                #endregion 
    155188 
    156189                public event EventHandler OptionChanged; 
  • trunk/x42view.net/Gui/PreviewOptions.resx

    r479 r488  
    119119  </resheader> 
    120120  <metadata name="colorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
    121     <value>92, 17</value> 
     121    <value>95, 17</value> 
    122122  </metadata> 
    123123</root> 
  • trunk/x42view.net/x42view.net.csproj

    r484 r488  
    173173    </Compile> 
    174174    <Compile Include="Gui\Options.cs"> 
    175       <SubType>Component</SubType> 
     175      <SubType>Form</SubType> 
    176176    </Compile> 
    177177    <Compile Include="Gui\Options.Designer.cs">