Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# OgreD3D9Mappings.cpp

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright © 2000-2002 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023 -----------------------------------------------------------------------------
    00024 */
    00025 #include "OgreD3D9Mappings.h"
    00026 #include "OgreString.h"
    00027 #include "OgreStringConverter.h"
    00028 #include "OgreLogManager.h"
    00029 #include "OgreException.h"
    00030
    00031 namespace Ogre
    00032 {
    00033     //---------------------------------------------------------------------
    00034     DWORD D3D9Mappings::get(ShadeOptions so)
    00035     {
    00036         switch( so )
    00037         {
    00038         case SO_FLAT:
    00039             return D3DSHADE_FLAT;
    00040         case SO_GOURAUD:
    00041             return D3DSHADE_GOURAUD;
    00042         case SO_PHONG:
    00043             return D3DSHADE_PHONG;
    00044         }
    00045         return 0;
    00046     }
    00047     //---------------------------------------------------------------------
    00048     D3DLIGHTTYPE D3D9Mappings::get(Ogre::Light::LightTypes lightType)
    00049     {
    00050         switch( lightType )
    00051         {
    00052         case Light::LT_POINT:
    00053             return D3DLIGHT_POINT;
    00054         case Light::LT_DIRECTIONAL:
    00055             return D3DLIGHT_DIRECTIONAL;
    00056         case Light::LT_SPOTLIGHT:
    00057             return D3DLIGHT_SPOT;
    00058         }
    00059         return D3DLIGHT_FORCE_DWORD;
    00060     }
    00061     //---------------------------------------------------------------------
    00062     DWORD D3D9Mappings::get(TexCoordCalcMethod m, const D3DCAPS9& caps)
    00063     {
    00064         switch( m )
    00065         {
    00066         case TEXCALC_NONE:
    00067             return D3DTSS_TCI_PASSTHRU;
    00068         case TEXCALC_ENVIRONMENT_MAP_REFLECTION:
    00069             return D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR;
    00070         case TEXCALC_ENVIRONMENT_MAP_PLANAR:
    00071             if (caps.VertexProcessingCaps & D3DVTXPCAPS_TEXGEN_SPHEREMAP)
    00072             {
    00073                 // Use sphere map if available
    00074                 return D3DTSS_TCI_SPHEREMAP;
    00075             }
    00076             else
    00077             {
    00078                 // If not, fall back on camera space reflection vector which isn't as good
    00079                 return D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR;
    00080             }
    00081         case TEXCALC_ENVIRONMENT_MAP_NORMAL:
    00082             return D3DTSS_TCI_CAMERASPACENORMAL;
    00083         case TEXCALC_ENVIRONMENT_MAP:
    00084             if (caps.VertexProcessingCaps & D3DVTXPCAPS_TEXGEN_SPHEREMAP)
    00085             {
    00086                 // Use sphere map if available
    00087                 return D3DTSS_TCI_SPHEREMAP;
    00088             }
    00089             else
    00090             {
    00091                 // If not, fall back on camera space normal which isn't as good
    00092                 return D3DTSS_TCI_CAMERASPACENORMAL;
    00093             }
    00094         case TEXCALC_PROJECTIVE_TEXTURE:
    00095             return D3DTSS_TCI_CAMERASPACEPOSITION;
    00096         }
    00097         return 0;
    00098     }
    00099     //---------------------------------------------------------------------
    00100     D3DTEXTUREADDRESS D3D9Mappings::get(TextureUnitState::TextureAddressingMode tam)
    00101     {
    00102         switch( tam )
    00103         {
    00104         case TextureUnitState::TAM_WRAP:
    00105             return D3DTADDRESS_WRAP;
    00106         case TextureUnitState::TAM_MIRROR:
    00107             return D3DTADDRESS_MIRROR;
    00108         case TextureUnitState::TAM_CLAMP:
    00109             return D3DTADDRESS_CLAMP;
    00110         }
    00111         return D3DTADDRESS_FORCE_DWORD;
    00112     }
    00113     //---------------------------------------------------------------------
    00114     D3DTEXTURESTAGESTATETYPE D3D9Mappings::get(LayerBlendType lbt)
    00115     {
    00116         switch( lbt )
    00117         {
    00118         case LBT_COLOUR:
    00119             return D3DTSS_COLOROP;
    00120         case LBT_ALPHA:
    00121             return D3DTSS_ALPHAOP;
    00122         }
    00123         return  D3DTSS_FORCE_DWORD;
    00124     }
    00125     //---------------------------------------------------------------------
    00126     DWORD D3D9Mappings::get(LayerBlendSource lbs)
    00127     {
    00128         switch( lbs )
    00129         {
    00130         case LBS_CURRENT:
    00131             return D3DTA_CURRENT;
    00132         case LBS_TEXTURE:
    00133             return D3DTA_TEXTURE;
    00134         case LBS_DIFFUSE:
    00135             return D3DTA_DIFFUSE;
    00136         case LBS_SPECULAR:
    00137             return D3DTA_SPECULAR;
    00138         case LBS_MANUAL:
    00139             return D3DTA_TFACTOR;
    00140         }
    00141         return 0;
    00142     }
    00143     //---------------------------------------------------------------------
    00144     DWORD D3D9Mappings::get(LayerBlendOperationEx lbo, D3DCAPS9 devCaps)
    00145     {
    00146         switch( lbo )
    00147         {
    00148         case LBX_SOURCE1:
    00149             return D3DTOP_SELECTARG1;
    00150         case LBX_SOURCE2:
    00151             return D3DTOP_SELECTARG2;
    00152         case LBX_MODULATE:
    00153             return D3DTOP_MODULATE;
    00154         case LBX_MODULATE_X2:
    00155             return D3DTOP_MODULATE2X;
    00156         case LBX_MODULATE_X4:
    00157             return D3DTOP_MODULATE4X;
    00158         case LBX_ADD:
    00159             return D3DTOP_ADD;
    00160         case LBX_ADD_SIGNED:
    00161             return D3DTOP_ADDSIGNED;
    00162         case LBX_ADD_SMOOTH:
    00163             return D3DTOP_ADDSMOOTH;
    00164         case LBX_SUBTRACT:
    00165             return D3DTOP_SUBTRACT;
    00166         case LBX_BLEND_DIFFUSE_ALPHA:
    00167             return D3DTOP_BLENDDIFFUSEALPHA;
    00168         case LBX_BLEND_TEXTURE_ALPHA:
    00169             return D3DTOP_BLENDTEXTUREALPHA;
    00170         case LBX_BLEND_CURRENT_ALPHA:
    00171             return D3DTOP_BLENDCURRENTALPHA;
    00172         case LBX_BLEND_MANUAL:
    00173             return D3DTOP_BLENDFACTORALPHA;
    00174         case LBX_DOTPRODUCT:
    00175             if (devCaps.TextureOpCaps & D3DTEXOPCAPS_DOTPRODUCT3)
    00176                 return D3DTOP_DOTPRODUCT3;
    00177             else
    00178                 return D3DTOP_MODULATE;
    00179         }
    00180         return 0;
    00181     }
    00182     //---------------------------------------------------------------------
    00183     D3DBLEND D3D9Mappings::get(SceneBlendFactor sbf)
    00184     {
    00185         switch( sbf )
    00186         {
    00187         case SBF_ONE:
    00188             return D3DBLEND_ONE;
    00189         case SBF_ZERO:
    00190             return D3DBLEND_ZERO;
    00191         case SBF_DEST_COLOUR:
    00192             return D3DBLEND_DESTCOLOR;
    00193         case SBF_SOURCE_COLOUR:
    00194             return D3DBLEND_SRCCOLOR;
    00195         case SBF_ONE_MINUS_DEST_COLOUR:
    00196             return D3DBLEND_INVDESTCOLOR;
    00197         case SBF_ONE_MINUS_SOURCE_COLOUR:
    00198             return D3DBLEND_INVSRCCOLOR;
    00199         case SBF_DEST_ALPHA:
    00200             return D3DBLEND_DESTALPHA;
    00201         case SBF_SOURCE_ALPHA:
    00202             return D3DBLEND_SRCALPHA;
    00203         case SBF_ONE_MINUS_DEST_ALPHA:
    00204             return D3DBLEND_INVDESTALPHA;
    00205         case SBF_ONE_MINUS_SOURCE_ALPHA:
    00206             return D3DBLEND_INVSRCALPHA;
    00207         }
    00208         return D3DBLEND_FORCE_DWORD;
    00209     }
    00210     //---------------------------------------------------------------------
    00211     DWORD D3D9Mappings::get(CompareFunction cf)
    00212     {
    00213         switch( cf )
    00214         {
    00215         case CMPF_ALWAYS_FAIL:
    00216             return D3DCMP_NEVER;
    00217         case CMPF_ALWAYS_PASS:
    00218             return D3DCMP_ALWAYS;
    00219         case CMPF_LESS:
    00220             return D3DCMP_LESS;
    00221         case CMPF_LESS_EQUAL:
    00222             return D3DCMP_LESSEQUAL;
    00223         case CMPF_EQUAL:
    00224             return D3DCMP_EQUAL;
    00225         case CMPF_NOT_EQUAL:
    00226             return D3DCMP_NOTEQUAL;
    00227         case CMPF_GREATER_EQUAL:
    00228             return D3DCMP_GREATEREQUAL;
    00229         case CMPF_GREATER:
    00230             return D3DCMP_GREATER;
    00231         };
    00232         return 0;
    00233     }
    00234     //---------------------------------------------------------------------
    00235     DWORD D3D9Mappings::get(CullingMode cm, bool flip)
    00236     {
    00237         switch( cm )
    00238         {
    00239         case CULL_NONE:
    00240             return D3DCULL_NONE;
    00241         case CULL_CLOCKWISE:
    00242             if( flip )
    00243                 return D3DCULL_CCW;
    00244             else
    00245                 return D3DCULL_CW;
    00246         case CULL_ANTICLOCKWISE:
    00247             if( flip )
    00248                 return D3DCULL_CW;
    00249             else
    00250                 return D3DCULL_CCW;
    00251         }
    00252         return 0;
    00253     }
    00254     //---------------------------------------------------------------------
    00255     D3DFOGMODE D3D9Mappings::get(FogMode fm)
    00256     {
    00257         switch( fm )
    00258         {
    00259         case FOG_EXP:
    00260             return D3DFOG_EXP;
    00261         case FOG_EXP2:
    00262             return D3DFOG_EXP2;
    00263         case FOG_LINEAR:
    00264             return D3DFOG_LINEAR;
    00265         }
    00266         return D3DFOG_FORCE_DWORD;
    00267     }
    00268     //---------------------------------------------------------------------
    00269     D3DFILLMODE D3D9Mappings::get(SceneDetailLevel level)
    00270     {
    00271         switch(level)
    00272         {
    00273         case SDL_POINTS:
    00274             return D3DFILL_POINT;
    00275         case SDL_WIREFRAME:
    00276             return D3DFILL_WIREFRAME;
    00277         case SDL_SOLID:
    00278             return D3DFILL_SOLID;
    00279         }
    00280         return D3DFILL_FORCE_DWORD;
    00281     }
    00282     //---------------------------------------------------------------------
    00283     DWORD D3D9Mappings::get(StencilOperation op, bool invert)
    00284     {
    00285         switch(op)
    00286         {
    00287         case SOP_KEEP:
    00288             return D3DSTENCILOP_KEEP;
    00289         case SOP_ZERO:
    00290             return D3DSTENCILOP_ZERO;
    00291         case SOP_REPLACE:
    00292             return D3DSTENCILOP_REPLACE;
    00293         case SOP_INCREMENT:
    00294             return invert? D3DSTENCILOP_DECRSAT : D3DSTENCILOP_INCRSAT;
    00295         case SOP_DECREMENT:
    00296             return invert? D3DSTENCILOP_INCRSAT : D3DSTENCILOP_DECRSAT;
    00297         case SOP_INCREMENT_WRAP:
    00298             return invert? D3DSTENCILOP_DECR : D3DSTENCILOP_INCR;
    00299         case SOP_DECREMENT_WRAP:
    00300             return invert? D3DSTENCILOP_INCR : D3DSTENCILOP_DECR;
    00301         case SOP_INVERT:
    00302             return D3DSTENCILOP_INVERT;
    00303         }
    00304         return 0;
    00305     }
    00306     //---------------------------------------------------------------------
    00307     D3DSAMPLERSTATETYPE D3D9Mappings::get(FilterType ft)
    00308     {
    00309         switch (ft)
    00310         {
    00311         case FT_MIN:
    00312             return D3DSAMP_MINFILTER;
    00313             break;
    00314         case FT_MAG:
    00315             return D3DSAMP_MAGFILTER;
    00316             break;
    00317         case FT_MIP:
    00318             return D3DSAMP_MIPFILTER;
    00319             break;
    00320         }
    00321
    00322         // to keep compiler happy
    00323         return D3DSAMP_MINFILTER;
    00324     }
    00325     //---------------------------------------------------------------------
    00326     DWORD D3D9Mappings::get(FilterType ft, FilterOptions fo, D3DCAPS9 devCaps,
    00327         eD3DTexType texType)
    00328     {
    00329         DWORD capsType;
    00330
    00331         switch( texType )
    00332         {
    00333         case D3D_TEX_TYPE_NORMAL:
    00334             capsType = devCaps.TextureFilterCaps;
    00335             break;
    00336         case D3D_TEX_TYPE_CUBE:
    00337             capsType = devCaps.CubeTextureFilterCaps;
    00338             break;
    00339         case D3D_TEX_TYPE_VOLUME:
    00340             capsType = devCaps.VolumeTextureFilterCaps;
    00341             break;
    00342         }
    00343
    00344         switch (ft)
    00345         {
    00346         case FT_MIN:
    00347             switch( fo )
    00348             {
    00349                 // NOTE: Fall through if device doesn't support requested type
    00350             case FO_ANISOTROPIC:
    00351                 if( capsType & D3DPTFILTERCAPS_MINFANISOTROPIC )
    00352                 {
    00353                     return D3DTEXF_ANISOTROPIC;
    00354                     break;
    00355                 }
    00356             case FO_LINEAR:
    00357                 if( capsType & D3DPTFILTERCAPS_MINFLINEAR )
    00358                 {
    00359                     return D3DTEXF_LINEAR;
    00360                     break;
    00361                 }
    00362             case FO_POINT:
    00363             case TFO_NONE:
    00364                 return D3DTEXF_POINT;
    00365                 break;
    00366             }
    00367             break;
    00368         case FT_MAG:
    00369             switch( fo )
    00370             {
    00371             // NOTE: Fall through if device doesn't support requested type
    00372             case FO_ANISOTROPIC:
    00373                 if( capsType & D3DPTFILTERCAPS_MAGFANISOTROPIC )
    00374                 {
    00375                     return D3DTEXF_ANISOTROPIC;
    00376                     break;
    00377                 }
    00378             case FO_LINEAR:
    00379                 if( capsType & D3DPTFILTERCAPS_MAGFLINEAR )
    00380                 {
    00381                     return D3DTEXF_LINEAR;
    00382                     break;
    00383                 }
    00384             case FO_POINT:
    00385             case FO_NONE:
    00386                 return D3DTEXF_POINT;
    00387                 break;
    00388             }
    00389             break;
    00390         case FT_MIP:
    00391             switch( fo )
    00392             {
    00393             case FO_ANISOTROPIC:
    00394             case FO_LINEAR:
    00395                 if( capsType & D3DPTFILTERCAPS_MIPFLINEAR )
    00396                 {
    00397                     return D3DTEXF_LINEAR;
    00398                     break;
    00399                 }
    00400             case FO_POINT:
    00401                 if( capsType & D3DPTFILTERCAPS_MIPFPOINT )
    00402                 {
    00403                     return D3DTEXF_POINT;
    00404                     break;
    00405                 }
    00406             case TFO_NONE:
    00407                 return D3DTEXF_NONE;
    00408                 break;
    00409             }
    00410             break;
    00411         }
    00412
    00413         // should never get here
    00414         return 0;
    00415
    00416     }
    00417     //---------------------------------------------------------------------
    00418     D3D9Mappings::eD3DTexType D3D9Mappings::get(TextureType ogreTexType)
    00419     {
    00420         switch( ogreTexType )
    00421         {
    00422         case TEX_TYPE_1D :
    00423         case TEX_TYPE_2D :
    00424             return D3D9Mappings::D3D_TEX_TYPE_NORMAL;
    00425         case TEX_TYPE_CUBE_MAP :
    00426             return D3D9Mappings::D3D_TEX_TYPE_CUBE;
    00427         case TEX_TYPE_3D :
    00428             return D3D9Mappings::D3D_TEX_TYPE_VOLUME;
    00429         }
    00430         return D3D9Mappings::D3D_TEX_TYPE_NONE;
    00431     }
    00432     //---------------------------------------------------------------------
    00433     DWORD D3D9Mappings::get(HardwareBuffer::Usage usage)
    00434     {
    00435         DWORD ret = 0;
    00436         if (usage & HardwareBuffer::HBU_DYNAMIC)
    00437         {
    00438 #if OGRE_D3D_MANAGE_BUFFERS
    00439             // Don't add the dynamic flag since not supported in managed mode
    00440 #else
    00441             ret |= D3DUSAGE_DYNAMIC;
    00442 #endif
    00443         }
    00444         if (usage & HardwareBuffer::HBU_WRITE_ONLY)
    00445         {
    00446             ret |= D3DUSAGE_WRITEONLY;
    00447         }
    00448         return ret;
    00449     }
    00450     //---------------------------------------------------------------------
    00451     DWORD D3D9Mappings::get(HardwareBuffer::LockOptions options)
    00452     {
    00453         DWORD ret = 0;
    00454         if (options == HardwareBuffer::HBL_DISCARD)
    00455         {
    00456 #if OGRE_D3D_MANAGE_BUFFERS
    00457             // Don't add the discard flag since not supported in managed mode
    00458 #else
    00459             ret |= D3DLOCK_DISCARD;
    00460 #endif
    00461         }
    00462         if (options == HardwareBuffer::HBL_READ_ONLY)
    00463         {
    00464             ret |= D3DLOCK_READONLY;
    00465         }
    00466         if (options == HardwareBuffer::HBL_NO_OVERWRITE)
    00467         {
    00468 #if OGRE_D3D_MANAGE_BUFFERS
    00469             // Don't add the nooverwrite flag since not supported in managed mode
    00470 #else
    00471             ret |= D3DLOCK_NOOVERWRITE;
    00472 #endif
    00473         }
    00474
    00475         return ret;
    00476     }
    00477     //---------------------------------------------------------------------
    00478     D3DFORMAT D3D9Mappings::get(HardwareIndexBuffer::IndexType itype)
    00479     {
    00480         if (itype == HardwareIndexBuffer::IT_32BIT)
    00481         {
    00482             return D3DFMT_INDEX32;
    00483         }
    00484         else
    00485         {
    00486             return D3DFMT_INDEX16;
    00487         }
    00488     }
    00489     //---------------------------------------------------------------------
    00490     D3DDECLTYPE D3D9Mappings::get(VertexElementType vType)
    00491     {
    00492         switch (vType)
    00493         {
    00494         case VET_COLOUR:
    00495             return D3DDECLTYPE_D3DCOLOR;
    00496             break;
    00497         case VET_FLOAT1:
    00498             return D3DDECLTYPE_FLOAT1;
    00499             break;
    00500         case VET_FLOAT2:
    00501             return D3DDECLTYPE_FLOAT2;
    00502             break;
    00503         case VET_FLOAT3:
    00504             return D3DDECLTYPE_FLOAT3;
    00505             break;
    00506         case VET_FLOAT4:
    00507             return D3DDECLTYPE_FLOAT4;
    00508             break;
    00509         case VET_SHORT2:
    00510             return D3DDECLTYPE_SHORT2;
    00511             break;
    00512         case VET_SHORT4:
    00513             return D3DDECLTYPE_SHORT4;
    00514             break;
    00515         case VET_UBYTE4:
    00516             return D3DDECLTYPE_UBYTE4;
    00517             break;
    00518         }
    00519         // to keep compiler happy
    00520         return D3DDECLTYPE_FLOAT3;
    00521     }
    00522     //---------------------------------------------------------------------
    00523     D3DDECLUSAGE D3D9Mappings::get(VertexElementSemantic sem)
    00524     {
    00525         switch (sem)
    00526         {
    00527         case VES_BLEND_INDICES:
    00528             return D3DDECLUSAGE_BLENDINDICES;
    00529             break;
    00530         case VES_BLEND_WEIGHTS:
    00531             return D3DDECLUSAGE_BLENDWEIGHT;
    00532             break;
    00533         case VES_DIFFUSE:
    00534             return D3DDECLUSAGE_COLOR; // NB index will differentiate
    00535             break;
    00536         case VES_SPECULAR:
    00537             return D3DDECLUSAGE_COLOR; // NB index will differentiate
    00538             break;
    00539         case VES_NORMAL:
    00540             return D3DDECLUSAGE_NORMAL;
    00541             break;
    00542         case VES_POSITION:
    00543             return D3DDECLUSAGE_POSITION;
    00544             break;
    00545         case VES_TEXTURE_COORDINATES:
    00546             return D3DDECLUSAGE_TEXCOORD;
    00547             break;
    00548         case VES_BINORMAL:
    00549             return D3DDECLUSAGE_BINORMAL;
    00550             break;
    00551         case VES_TANGENT:
    00552             return D3DDECLUSAGE_TANGENT;
    00553             break;
    00554         }
    00555         // to keep compiler happy
    00556         return D3DDECLUSAGE_POSITION;
    00557     }
    00558     //---------------------------------------------------------------------
    00559     D3DXMATRIX D3D9Mappings::makeD3DXMatrix( const Matrix4& mat )
    00560     {
    00561         // Transpose matrix
    00562         // D3D9 uses row vectors i.e. V*M
    00563         // Ogre, OpenGL and everything else uses column vectors i.e. M*V
    00564         D3DXMATRIX d3dMat;
    00565         d3dMat.m[0][0] = mat[0][0];
    00566         d3dMat.m[0][1] = mat[1][0];
    00567         d3dMat.m[0][2] = mat[2][0];
    00568         d3dMat.m[0][3] = mat[3][0];
    00569
    00570         d3dMat.m[1][0] = mat[0][1];
    00571         d3dMat.m[1][1] = mat[1][1];
    00572         d3dMat.m[1][2] = mat[2][1];
    00573         d3dMat.m[1][3] = mat[3][1];
    00574
    00575         d3dMat.m[2][0] = mat[0][2];
    00576         d3dMat.m[2][1] = mat[1][2];
    00577         d3dMat.m[2][2] = mat[2][2];
    00578         d3dMat.m[2][3] = mat[3][2];
    00579
    00580         d3dMat.m[3][0] = mat[0][3];
    00581         d3dMat.m[3][1] = mat[1][3];
    00582         d3dMat.m[3][2] = mat[2][3];
    00583         d3dMat.m[3][3] = mat[3][3];
    00584
    00585         return d3dMat;
    00586     }
    00587     //---------------------------------------------------------------------
    00588     Matrix4 D3D9Mappings::convertD3DXMatrix( const D3DXMATRIX& mat )
    00589     {
    00590         Matrix4 ogreMat;
    00591         ogreMat[0][0] = mat.m[0][0];
    00592         ogreMat[1][0] = mat.m[0][1];
    00593         ogreMat[2][0] = mat.m[0][2];
    00594         ogreMat[3][0] = mat.m[0][3];
    00595
    00596         ogreMat[0][1] = mat.m[1][0];
    00597         ogreMat[1][1] = mat.m[1][1];
    00598         ogreMat[2][1] = mat.m[1][2];
    00599         ogreMat[3][1] = mat.m[1][3];
    00600
    00601         ogreMat[0][2] = mat.m[2][0];
    00602         ogreMat[1][2] = mat.m[2][1];
    00603         ogreMat[2][2] = mat.m[2][2];
    00604         ogreMat[3][2] = mat.m[2][3];
    00605
    00606         ogreMat[0][3] = mat.m[3][0];
    00607         ogreMat[1][3] = mat.m[3][1];
    00608         ogreMat[2][3] = mat.m[3][2];
    00609         ogreMat[3][3] = mat.m[3][3];
    00610
    00611         return ogreMat;
    00612     }
    00613
    00614
    00615 }

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:20 2004