OpenMW
components/nif/niftypes.hpp
Go to the documentation of this file.
00001 /*
00002   OpenMW - The completely unofficial reimplementation of Morrowind
00003   Copyright (C) 2008-2010  Nicolay Korslund
00004   Email: < korslund@gmail.com >
00005   WWW: http://openmw.sourceforge.net/
00006 
00007   This file (nif_types.h) is part of the OpenMW package.
00008 
00009   OpenMW is distributed as free software: you can redistribute it
00010   and/or modify it under the terms of the GNU General Public License
00011   version 3, as published by the Free Software Foundation.
00012 
00013   This program is distributed in the hope that it will be useful, but
00014   WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016   General Public License for more details.
00017 
00018   You should have received a copy of the GNU General Public License
00019   version 3 along with this program. If not, see
00020   http://www.gnu.org/licenses/ .
00021 
00022  */
00023 
00024 #ifndef OPENMW_COMPONENTS_NIF_NIFTYPES_HPP
00025 #define OPENMW_COMPONENTS_NIF_NIFTYPES_HPP
00026 
00027 #include <OgreVector3.h>
00028 #include <OgreMatrix3.h>
00029 
00030 // Common types used in NIF files
00031 
00032 namespace Nif
00033 {
00034 
00035 struct Transformation
00036 {
00037     Ogre::Vector3 pos;
00038     Ogre::Matrix3 rotation;
00039     float scale;
00040 
00041     static const Transformation& getIdentity()
00042     {
00043         static const Transformation identity = {
00044             Ogre::Vector3::ZERO, Ogre::Matrix3::IDENTITY, 1.0f
00045         };
00046         return identity;
00047     }
00048 };
00049 
00050 } // Namespace
00051 #endif