Changeset 529

Show
Ignore:
Timestamp:
02/29/08 16:04:59 (10 months ago)
Author:
phill
Message:

o X42 viewer stuff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/x42view-upgrade/dependencies/licenses.txt

    r415 r529  
    1 Boo/ 
    2         MIT/BSD, license and copyright info in folder. 
    3  
    41ICSharpCode/ 
    5         TextEditor: LGPL, license and copyright info in folder. 
    62        SharpZipLib: GPL w/ special exception, info at http://www.icsharpcode.net/OpenSource/SharpZipLib/ 
    73 
    8 7zip
    9         LGPL, license and copyright info in folder. 
     4SlimmerDX
     5        Trimmed down version of SlimDX (http://slimdx.mdxinfo.com/, released under MIT) - MIT license applies 
  • branches/x42view-upgrade/x42view.net/Helpers.TextureUtils.cs

    r493 r529  
    2525using System.Drawing; 
    2626using System.IO; 
     27 
     28#if false 
    2729 
    2830using Microsoft.DirectX; 
     
    163165        } 
    164166} 
     167#endif 
  • branches/x42view-upgrade/x42view.net/Helpers.cs

    r479 r529  
    141141                } 
    142142 
    143                 public static Microsoft.DirectX.Vector3 ColorToVector3( Color cl ) 
    144                 { 
    145                         const float conv = 1.0F / 0xFF; 
    146                         return new Microsoft.DirectX.Vector3( cl.R * conv, cl.G * conv, cl.B * conv ); 
    147                 } 
    148  
    149                 public static IntPtr OffsetIntPtr( IntPtr ptr, long offset ) 
    150                 { 
    151                         return new IntPtr( ptr.ToInt64() + offset ); 
    152                 } 
    153  
    154                 public static Microsoft.DirectX.Vector3 ConvertToDX( Libx42.Math.Vector3 v ) 
    155                 { 
    156                         return new Microsoft.DirectX.Vector3( v.x, v.y, v.z ); 
    157                 } 
    158  
    159                 public static Microsoft.DirectX.Matrix ConvertToDX( Libx42.Math.Affine a ) 
    160                 { 
    161                         Microsoft.DirectX.Matrix ret = new Microsoft.DirectX.Matrix(); 
    162  
    163                         ret.M11 = a.c00; 
    164                         ret.M12 = a.c01; 
    165                         ret.M13 = a.c02; 
    166                         ret.M14 = 0; 
    167  
    168                         ret.M21 = a.c10; 
    169                         ret.M22 = a.c11; 
    170                         ret.M23 = a.c12; 
    171                         ret.M24 = 0; 
    172  
    173                         ret.M31 = a.c20; 
    174                         ret.M32 = a.c21; 
    175                         ret.M33 = a.c22; 
    176                         ret.M34 = 0; 
    177  
    178                         ret.M41 = a.c30; 
    179                         ret.M42 = a.c31; 
    180                         ret.M43 = a.c32; 
    181                         ret.M44 = 1; 
    182  
    183                         return ret; 
    184                 } 
    185  
    186                 public static Microsoft.DirectX.Direct3D.PrimitiveType ConvertToDX( Libx42.PrimitiveType primType ) 
    187                 { 
    188                         switch( primType ) 
    189                         { 
    190                         case Libx42.PrimitiveType.PointList: 
    191                                 return Microsoft.DirectX.Direct3D.PrimitiveType.PointList; 
    192  
    193                         case Libx42.PrimitiveType.LineList: 
    194                                 return Microsoft.DirectX.Direct3D.PrimitiveType.LineList; 
    195  
    196                         case Libx42.PrimitiveType.LineStrip: 
    197                                 return Microsoft.DirectX.Direct3D.PrimitiveType.LineStrip; 
    198  
    199                         case Libx42.PrimitiveType.TriangleList: 
    200                                 return Microsoft.DirectX.Direct3D.PrimitiveType.TriangleList; 
    201  
    202                         case Libx42.PrimitiveType.TriangleStrip: 
    203                                 return Microsoft.DirectX.Direct3D.PrimitiveType.TriangleStrip; 
    204  
    205                         case Libx42.PrimitiveType.TriangleFan: 
    206                                 return Microsoft.DirectX.Direct3D.PrimitiveType.TriangleFan; 
    207  
    208                         default: 
    209                                 throw new ArgumentException(); 
    210                         } 
    211                 } 
    212  
    213143                public static void InitArray<T>( ref T[] array, int length ) 
    214144                { 
     
    217147                        else 
    218148                                Array.Clear( array, 0, length ); 
    219                 } 
    220  
    221                 public static Microsoft.DirectX.Vector3 GetIncenter( 
    222                         Microsoft.DirectX.Vector3 A, 
    223                         Microsoft.DirectX.Vector3 B, 
    224                         Microsoft.DirectX.Vector3 C 
    225                         ) 
    226                 { 
    227                         float a = (B - C).Length(); 
    228                         float b = (C - A).Length(); 
    229                         float c = (A - B).Length(); 
    230  
    231                         float div = 1.0F / (a + b + c); 
    232  
    233                         return (a * A + b * B + c * C) * div; 
    234149                } 
    235150 
  • branches/x42view-upgrade/x42view.net/Program.cs

    r402 r529  
    4545                        Application.SetCompatibleTextRenderingDefault( false ); 
    4646 
    47                         Gui.MainWnd main = new Gui.MainWnd(); 
    48  
    4947                        for( int i = 0; i < args.Length; i++ ) 
    5048                        { 
     
    5755                                        { 
    5856                                                //open a diff window 
    59                                                 main.OpenDiffView( args[i + 1], args[i + 2] ); 
     57                                                //main.OpenDiffView( args[i + 1], args[i + 2] ); 
    6058                                        } 
    6159 
     
    6563 
    6664                                //default is to just open the model 
    67                                 main.OpenModelViewer( arg ); 
     65                                //main.OpenModelViewer( arg ); 
    6866                        } 
    6967 
    70                         Application.Run( main ); 
     68                        Application.Run(); 
    7169 
    7270                        return 0; 
  • branches/x42view-upgrade/x42view.net/x42view.net.csproj

    r528 r529  
    5555      <HintPath>..\dependencies\ICSharpCode\ICSharpCode.SharpZipLib.dll</HintPath> 
    5656    </Reference> 
    57     <Reference Include="Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /
    58     <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /
    59     <Reference Include="Microsoft.DirectX.Direct3DX, Version=1.0.2911.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /
    60     <Reference Include="Microsoft.VisualC" /
     57    <Reference Include="SlimerDX, Version=0.1.0.0, Culture=neutral, processorArchitecture=x86"
     58      <SpecificVersion>False</SpecificVersion
     59      <HintPath>..\dependencies\SlimmerDX\SlimerDX.dll</HintPath
     60    </Reference
    6161    <Reference Include="System" /> 
    6262    <Reference Include="System.configuration" /> 
     
    7575    <Compile Include="DataBrowser\IDisplayControl.cs" /> 
    7676    <Compile Include="DataBrowser\PageHandler.cs" /> 
    77     <Compile Include="Gui\Camera.cs"> 
    78       <SubType>Component</SubType> 
    79     </Compile> 
    80     <Compile Include="Gui\ChildWindow.cs"> 
    81       <SubType>Form</SubType> 
    82     </Compile> 
    83     <Compile Include="Gui\DXPanel.cs"> 
    84       <SubType>Component</SubType> 
    85     </Compile> 
    86     <Compile Include="Gui\DXPanel.Designer.cs"> 
    87       <DependentUpon>DXPanel.cs</DependentUpon> 
    88     </Compile> 
    89     <Compile Include="Gui\GroupsPanel.cs"> 
    90       <SubType>UserControl</SubType> 
    91     </Compile> 
    92     <Compile Include="Gui\GroupsPanel.Designer.cs"> 
    93       <DependentUpon>GroupsPanel.cs</DependentUpon> 
    94     </Compile> 
    95     <Compile Include="Gui\IModelItemContext.cs" /> 
    96     <Compile Include="Gui\MainWnd.cs"> 
    97       <SubType>Form</SubType> 
    98     </Compile> 
    99     <Compile Include="Gui\MainWnd.Designer.cs"> 
    100       <DependentUpon>MainWnd.cs</DependentUpon> 
    101     </Compile> 
    102     <Compile Include="Gui\ModelBrowser.cs"> 
    103       <SubType>Form</SubType> 
    104     </Compile> 
    105     <Compile Include="Gui\ModelBrowser.Designer.cs"> 
    106       <DependentUpon>ModelBrowser.cs</DependentUpon> 
    107     </Compile> 
    108     <Compile Include="Gui\ModelContainer.cs"> 
    109       <SubType>Component</SubType> 
    110     </Compile> 
    111     <Compile Include="Gui\ModelContainer.Designer.cs"> 
    112       <DependentUpon>ModelContainer.cs</DependentUpon> 
    113     </Compile> 
    114     <Compile Include="Gui\ModelRenderHelper.cs"> 
    115       <SubType>Component</SubType> 
    116     </Compile> 
    117     <Compile Include="Gui\ModelRenderHelper.Designer.cs"> 
    118       <DependentUpon>ModelRenderHelper.cs</DependentUpon> 
    119     </Compile> 
    120     <Compile Include="Gui\ModelWindow.Audit.cs"> 
    121       <SubType>Form</SubType> 
    122     </Compile> 
    123     <Compile Include="Gui\ModelWindow.cs"> 
    124       <SubType>Form</SubType> 
    125     </Compile> 
    126     <Compile Include="Gui\ModelWindow.Designer.cs"> 
    127       <DependentUpon>ModelWindow.cs</DependentUpon> 
    128     </Compile> 
    129     <Compile Include="Gui\ModelWindow.Preview.cs"> 
    130       <SubType>Form</SubType> 
    131     </Compile> 
    132     <Compile Include="Gui\ModelWindow.Preview.Skeleton.cs"> 
    133       <SubType>Form</SubType> 
    134     </Compile> 
    135     <Compile Include="Gui\ModelWindow.Preview.Surface.cs"> 
    136       <SubType>Form</SubType> 
    137     </Compile> 
    138     <Compile Include="Gui\ModelWindow.Preview.Topology.cs"> 
    139       <SubType>Form</SubType> 
    140     </Compile> 
    141     <Compile Include="Gui\MoveHelper.cs"> 
    142       <SubType>Component</SubType> 
    143     </Compile> 
    144     <Compile Include="Gui\Options.cs"> 
    145       <SubType>Form</SubType> 
    146     </Compile> 
    147     <Compile Include="Gui\Options.Designer.cs"> 
    148       <DependentUpon>Options.cs</DependentUpon> 
    149     </Compile> 
    150     <Compile Include="Gui\PreviewOptions.cs"> 
    151       <SubType>UserControl</SubType> 
    152     </Compile> 
    153     <Compile Include="Gui\PreviewOptions.Designer.cs"> 
    154       <DependentUpon>PreviewOptions.cs</DependentUpon> 
    155     </Compile> 
    156     <Compile Include="Gui\TimeControl.cs"> 
    157       <SubType>UserControl</SubType> 
    158     </Compile> 
    159     <Compile Include="Gui\TimeControl.Designer.cs"> 
    160       <DependentUpon>TimeControl.cs</DependentUpon> 
    161     </Compile> 
    162     <Compile Include="Gui\TimeSlider.cs"> 
    163       <SubType>Component</SubType> 
    164     </Compile> 
    165     <Compile Include="Gui\ToolPanel.cs"> 
    166       <SubType>UserControl</SubType> 
    167     </Compile> 
    168     <Compile Include="Gui\ToolPanel.Designer.cs"> 
    169       <DependentUpon>ToolPanel.cs</DependentUpon> 
    170     </Compile> 
    171     <Compile Include="Gui\HeirarchyPanel.cs"> 
    172       <SubType>UserControl</SubType> 
    173     </Compile> 
    174     <Compile Include="Gui\HeirarchyPanel.Designer.cs"> 
    175       <DependentUpon>HeirarchyPanel.cs</DependentUpon> 
    176     </Compile> 
    177     <Compile Include="Gui\ToolStripTextBoxEx.cs"> 
    178       <SubType>Component</SubType> 
    179     </Compile> 
    180     <Compile Include="Gui\ToolStripTextBoxEx.Designer.cs"> 
    181       <DependentUpon>ToolStripTextBoxEx.cs</DependentUpon> 
    182     </Compile> 
    183     <Compile Include="Gui\RawDataView.cs"> 
    184       <SubType>Form</SubType> 
    185     </Compile> 
    186     <Compile Include="Gui\RawDataView.Designer.cs"> 
    187       <DependentUpon>RawDataView.cs</DependentUpon> 
    188     </Compile> 
    189     <Compile Include="Gui\VisualDiff.cs"> 
    190       <SubType>Form</SubType> 
    191     </Compile> 
    192     <Compile Include="Gui\VisualDiff.Designer.cs"> 
    193       <DependentUpon>VisualDiff.cs</DependentUpon> 
    194     </Compile> 
    19577    <Compile Include="Helpers.Adjacency.cs" /> 
    19678    <Compile Include="Helpers.cs" /> 
     
    19880    <Compile Include="Program.cs" /> 
    19981    <Compile Include="Properties\AssemblyInfo.cs" /> 
    200     <EmbeddedResource Include="Gui\AnimationsPanel.resx"> 
    201       <SubType>Designer</SubType> 
    202       <DependentUpon>AnimationsPanel.cs</DependentUpon> 
    203     </EmbeddedResource> 
    204     <EmbeddedResource Include="Gui\DXPanel.resx"> 
    205       <SubType>Designer</SubType> 
    206       <DependentUpon>DXPanel.cs</DependentUpon> 
    207     </EmbeddedResource> 
    208     <EmbeddedResource Include="Gui\GroupsPanel.resx"> 
    209       <SubType>Designer</SubType> 
    210       <DependentUpon>GroupsPanel.cs</DependentUpon> 
    211     </EmbeddedResource> 
    212     <EmbeddedResource Include="Gui\HeirarchyPanel.resx"> 
    213       <SubType>Designer</SubType> 
    214       <DependentUpon>HeirarchyPanel.cs</DependentUpon> 
    215     </EmbeddedResource> 
    216     <EmbeddedResource Include="Gui\MainWnd.resx"> 
    217       <SubType>Designer</SubType> 
    218       <DependentUpon>MainWnd.cs</DependentUpon> 
    219     </EmbeddedResource> 
    220     <EmbeddedResource Include="Gui\ModelBrowser.resx"> 
    221       <SubType>Designer</SubType> 
    222       <DependentUpon>ModelBrowser.cs</DependentUpon> 
    223     </EmbeddedResource> 
    224     <EmbeddedResource Include="Gui\ModelWindow.resx"> 
    225       <SubType>Designer</SubType> 
    226       <DependentUpon>ModelWindow.cs</DependentUpon> 
    227     </EmbeddedResource> 
    228     <EmbeddedResource Include="Gui\Options.resx"> 
    229       <SubType>Designer</SubType> 
    230       <DependentUpon>Options.cs</DependentUpon> 
    231     </EmbeddedResource> 
    232     <EmbeddedResource Include="Gui\PreviewOptions.resx"> 
    233       <SubType>Designer</SubType> 
    234       <DependentUpon>PreviewOptions.cs</DependentUpon> 
    235     </EmbeddedResource> 
    236     <EmbeddedResource Include="Gui\ProxyObjectListPanel.resx"> 
    237       <SubType>Designer</SubType> 
    238       <DependentUpon>ProxyObjectListPanel.cs</DependentUpon> 
    239     </EmbeddedResource> 
    240     <EmbeddedResource Include="Gui\RawDataViewer.resx"> 
    241       <SubType>Designer</SubType> 
    242       <DependentUpon>RawDataViewer.cs</DependentUpon> 
    243     </EmbeddedResource> 
    244     <EmbeddedResource Include="Gui\RawDataViewPanel.resx"> 
    245       <SubType>Designer</SubType> 
    246       <DependentUpon>RawDataViewPanel.cs</DependentUpon> 
    247     </EmbeddedResource> 
    248     <EmbeddedResource Include="Gui\SceneWindow.resx"> 
    249       <SubType>Designer</SubType> 
    250       <DependentUpon>SceneWindow.cs</DependentUpon> 
    251     </EmbeddedResource> 
    252     <EmbeddedResource Include="Gui\TimeControl.resx"> 
    253       <SubType>Designer</SubType> 
    254       <DependentUpon>TimeControl.cs</DependentUpon> 
    255     </EmbeddedResource> 
    256     <EmbeddedResource Include="Gui\ToolPanel.resx"> 
    257       <SubType>Designer</SubType> 
    258       <DependentUpon>ToolPanel.cs</DependentUpon> 
    259     </EmbeddedResource> 
    260     <EmbeddedResource Include="Gui\RawDataView.resx"> 
    261       <SubType>Designer</SubType> 
    262       <DependentUpon>RawDataView.cs</DependentUpon> 
    263     </EmbeddedResource> 
    264     <EmbeddedResource Include="Gui\VisualDiff.resx"> 
    265       <SubType>Designer</SubType> 
    266       <DependentUpon>VisualDiff.cs</DependentUpon> 
    267     </EmbeddedResource> 
    26882    <EmbeddedResource Include="Properties\Resources.resx"> 
    26983      <Generator>ResXFileCodeGenerator</Generator> 
     
    307121      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 
    308122    </Content> 
     123    <Compile Include="Gui\Graphics\DeviceController.cs"> 
     124      <SubType>Component</SubType> 
     125    </Compile> 
     126    <Compile Include="Gui\Graphics\DeviceController.Designer.cs"> 
     127      <DependentUpon>DeviceController.cs</DependentUpon> 
     128    </Compile> 
     129    <Compile Include="Gui\Graphics\DeviceEventHook.cs"> 
     130      <SubType>Component</SubType> 
     131    </Compile> 
     132    <Compile Include="Gui\Graphics\DeviceEventHook.Designer.cs"> 
     133      <DependentUpon>DeviceEventHook.cs</DependentUpon> 
     134    </Compile> 
     135    <Compile Include="Gui\Graphics\DXControl.cs"> 
     136      <SubType>Component</SubType> 
     137    </Compile> 
     138    <Compile Include="Gui\Graphics\DXControl.Designer.cs"> 
     139      <DependentUpon>DXControl.cs</DependentUpon> 
     140    </Compile> 
    309141    <Compile Include="Helpers.TokenParser.cs" /> 
    310142    <None Include="Resources\video.png" /> 
     
    332164    <Compile Include="DataBrowser\PageHandlers\ModelScorePageHandler.cs" /> 
    333165    <Compile Include="Analysis\SpeedTest.cs" /> 
    334     <Compile Include="Gui\AnimationsPanel.cs"> 
    335       <SubType>UserControl</SubType> 
    336     </Compile> 
    337     <Compile Include="Gui\AnimationsPanel.Designer.cs"> 
    338       <DependentUpon>AnimationsPanel.cs</DependentUpon> 
    339     </Compile> 
    340     <Compile Include="Gui\ModelWindow.Preview.Bounds.cs"> 
    341       <SubType>Form</SubType> 
    342     </Compile> 
    343     <Compile Include="Gui\ModelWindow.Preview.Shaded.cs"> 
    344       <SubType>Form</SubType> 
    345     </Compile> 
    346     <Compile Include="Gui\ProxyObjectListPanel.cs"> 
    347       <SubType>UserControl</SubType> 
    348     </Compile> 
    349     <Compile Include="Gui\ProxyObjectListPanel.Designer.cs"> 
    350       <DependentUpon>ProxyObjectListPanel.cs</DependentUpon> 
    351     </Compile> 
    352     <Compile Include="Gui\RawDataViewer.cs"> 
    353       <SubType>Component</SubType> 
    354     </Compile> 
    355     <Compile Include="Gui\RawDataViewer.Designer.cs"> 
    356       <DependentUpon>RawDataViewer.cs</DependentUpon> 
    357     </Compile> 
    358     <Compile Include="Gui\RawDataViewPanel.cs"> 
    359       <SubType>UserControl</SubType> 
    360     </Compile> 
    361     <Compile Include="Gui\RawDataViewPanel.Designer.cs"> 
    362       <DependentUpon>RawDataViewPanel.cs</DependentUpon> 
    363     </Compile> 
    364     <Compile Include="Gui\SceneWindow.cs"> 
    365       <SubType>Form</SubType> 
    366     </Compile> 
    367     <Compile Include="Gui\SceneWindow.Designer.cs"> 
    368       <DependentUpon>SceneWindow.cs</DependentUpon> 
    369     </Compile> 
    370166    <Compile Include="Helpers.TextureUtils.cs" /> 
    371     <Compile Include="Scene\GraphicsResourceContainer.cs" /> 
    372     <Compile Include="Scene\IGraphicsDeviceService.cs" /> 
    373     <Compile Include="Scene\ModelContext.cs" /> 
    374     <Compile Include="Scene\ModelRenderBuffers.cs" /> 
    375     <Compile Include="Scene\Scene.cs" /> 
    376167    <None Include="Resources\treeview.gif" /> 
    377168    <None Include="Resources\forward.gif" />