CrystalSpace

Public API Reference

cstool/animeshtools.h
Go to the documentation of this file.
00001 /*
00002   Copyright (C) 2011 Christian Van Brussel, Institute of Information
00003       and Communication Technologies, Electronics and Applied Mathematics
00004       at Universite catholique de Louvain, Belgium
00005       http://www.uclouvain.be/en-icteam.html
00006 
00007   This library is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU Library General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This library is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015   Library General Public License for more details.
00016 
00017   You should have received a copy of the GNU Library General Public
00018   License along with this library; if not, write to the Free
00019   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020 */
00021 
00022 #ifndef __CS_CSTOOL_ANIMESHTOOLS_H__
00023 #define __CS_CSTOOL_ANIMESHTOOLS_H__
00024 
00029 #include "ivaria/reporter.h"
00030 
00031 #include "csutil/dirtyaccessarray.h"
00032 
00033 struct iGeneralFactoryState;
00034 struct iLoader;
00035 struct iObjectRegistry;
00036 
00037 namespace CS {
00038 namespace Mesh {
00039 
00040 struct iAnimatedMeshFactory;
00041 
00045 class CS_CRYSTALSPACE_EXPORT AnimatedMeshTools
00046 {
00047   static void ReportError (const char* msg, ...)
00048   {
00049 #ifdef CS_DEBUG
00050     va_list arg;
00051     va_start (arg, msg);
00052     csReportV (iSCF::SCF->object_reg, CS_REPORTER_SEVERITY_ERROR,
00053                "crystalspace.mesh.animeshtools", msg, arg);
00054     va_end (arg);
00055 #endif
00056   }
00057 
00058   static void ReportWarning (const char* msg, ...)
00059   {
00060 #ifdef CS_DEBUG
00061     va_list arg;
00062     va_start (arg, msg);
00063     csReportV (iSCF::SCF->object_reg, CS_REPORTER_SEVERITY_WARNING,
00064                "crystalspace.mesh.animeshtools", msg, arg);
00065     va_end (arg);
00066 #endif
00067   }
00068 
00069   static csPtr<iAnimatedMeshFactory> LoadAnimesh (iObjectRegistry* object_reg,
00070                                                   iLoader* loader,
00071                                                   const char* factoryName,
00072                                                   const char* filename);
00073 
00074  public:
00075 
00100   static csPtr<iAnimatedMeshFactory> ImportSplitMorphMesh
00101     (iObjectRegistry* object_reg, const char* path, const char* baseMesh,
00102      const char* factoryName, const char* meshMask = "");
00103 
00120   static bool ImportMorphMesh
00121     (iObjectRegistry* object_reg, iAnimatedMeshFactory* baseMesh,
00122      iAnimatedMeshFactory* morphMesh, const char* morphName,
00123      bool deleteMesh = true);
00124 
00135   static csPtr<iAnimatedMeshFactory> ImportGeneralMesh
00136     (iObjectRegistry* object_reg, iGeneralFactoryState* genmesh,
00137      bool deleteMesh = true);
00138 
00139 };
00140 
00141 } //namespace Mesh
00142 } //namespace CS
00143 
00144 #endif // __CS_CSTOOL_ANIMESHTOOLS_H__

Generated for Crystal Space 2.0 by doxygen 1.7.6.1