nuclear@0: /* nuclear@0: --------------------------------------------------------------------------- nuclear@0: Open Asset Import Library (assimp) nuclear@0: --------------------------------------------------------------------------- nuclear@0: nuclear@0: Copyright (c) 2006-2012, assimp team nuclear@0: nuclear@0: All rights reserved. nuclear@0: nuclear@0: Redistribution and use of this software in source and binary forms, nuclear@0: with or without modification, are permitted provided that the following nuclear@0: conditions are met: nuclear@0: nuclear@0: * Redistributions of source code must retain the above nuclear@0: copyright notice, this list of conditions and the nuclear@0: following disclaimer. nuclear@0: nuclear@0: * Redistributions in binary form must reproduce the above nuclear@0: copyright notice, this list of conditions and the nuclear@0: following disclaimer in the documentation and/or other nuclear@0: materials provided with the distribution. nuclear@0: nuclear@0: * Neither the name of the assimp team, nor the names of its nuclear@0: contributors may be used to endorse or promote products nuclear@0: derived from this software without specific prior nuclear@0: written permission of the assimp team. nuclear@0: nuclear@0: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS nuclear@0: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT nuclear@0: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR nuclear@0: A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT nuclear@0: OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, nuclear@0: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT nuclear@0: LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, nuclear@0: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY nuclear@0: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT nuclear@0: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE nuclear@0: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nuclear@0: --------------------------------------------------------------------------- nuclear@0: */ nuclear@0: nuclear@0: /** @file ImporterRegistry.cpp nuclear@0: nuclear@0: Central registry for all postprocessing steps available. Do not edit this file nuclear@0: directly (unless you are adding new steps), instead use the nuclear@0: corresponding preprocessor flag to selectively disable steps. nuclear@0: */ nuclear@0: nuclear@0: #include "AssimpPCH.h" nuclear@0: nuclear@0: #ifndef ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS nuclear@0: # include "CalcTangentsProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_JOINVERTICES_PROCESS nuclear@0: # include "JoinVerticesProcess.h" nuclear@0: #endif nuclear@0: #if !(defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS && defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS && defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS) nuclear@0: # include "ConvertToLHProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_TRIANGULATE_PROCESS nuclear@0: # include "TriangulateProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS nuclear@0: # include "GenFaceNormalsProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS nuclear@0: # include "GenVertexNormalsProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_REMOVEVC_PROCESS nuclear@0: # include "RemoveVCProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS nuclear@0: # include "SplitLargeMeshes.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS nuclear@0: # include "PretransformVertices.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS nuclear@0: # include "LimitBoneWeightsProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS nuclear@0: # include "ValidateDataStructure.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS nuclear@0: # include "ImproveCacheLocality.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS nuclear@0: # include "FixNormalsStep.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS nuclear@0: # include "RemoveRedundantMaterials.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS nuclear@0: # include "FindInvalidDataProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS nuclear@0: # include "FindDegenerates.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS nuclear@0: # include "SortByPTypeProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS nuclear@0: # include "ComputeUVMappingProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS nuclear@0: # include "TextureTransform.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS nuclear@0: # include "FindInstancesProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS nuclear@0: # include "OptimizeMeshes.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS nuclear@0: # include "OptimizeGraph.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_SPLITBYBONECOUNT_PROCESS nuclear@0: # include "SplitByBoneCountProcess.h" nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_DEBONE_PROCESS nuclear@0: # include "DeboneProcess.h" nuclear@0: #endif nuclear@0: nuclear@0: namespace Assimp { nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out) nuclear@0: { nuclear@0: // ---------------------------------------------------------------------------- nuclear@0: // Add an instance of each post processing step here in the order nuclear@0: // of sequence it is executed. Steps that are added here are not nuclear@0: // validated - as RegisterPPStep() does - all dependencies must be given. nuclear@0: // ---------------------------------------------------------------------------- nuclear@0: out.reserve(25); nuclear@0: #if (!defined ASSIMP_BUILD_NO_REMOVEVC_PROCESS) nuclear@0: out.push_back( new RemoveVCProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS) nuclear@0: out.push_back( new RemoveRedundantMatsProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS) nuclear@0: out.push_back( new FindInstancesProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS) nuclear@0: out.push_back( new OptimizeGraphProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS) nuclear@0: out.push_back( new OptimizeMeshesProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS) nuclear@0: out.push_back( new FindDegeneratesProcess()); nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS nuclear@0: out.push_back( new ComputeUVMappingProcess()); nuclear@0: #endif nuclear@0: #ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS nuclear@0: out.push_back( new TextureTransformStep()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS) nuclear@0: out.push_back( new PretransformVertices()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_TRIANGULATE_PROCESS) nuclear@0: out.push_back( new TriangulateProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS) nuclear@0: out.push_back( new SortByPTypeProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS) nuclear@0: out.push_back( new FindInvalidDataProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS) nuclear@0: out.push_back( new FixInfacingNormalsProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_SPLITBYBONECOUNT_PROCESS) nuclear@0: out.push_back( new SplitByBoneCountProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS) nuclear@0: out.push_back( new SplitLargeMeshesProcess_Triangle()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS) nuclear@0: out.push_back( new GenFaceNormalsProcess()); nuclear@0: #endif nuclear@0: nuclear@0: // ......................................................................... nuclear@0: // DON'T change the order of these five .. nuclear@0: // XXX this is actually a design weakness that dates back to the time nuclear@0: // when Importer would maintain the postprocessing step list exclusively. nuclear@0: // Now that others access it too, we need a better solution. nuclear@0: out.push_back( new ComputeSpatialSortProcess()); nuclear@0: // ......................................................................... nuclear@0: nuclear@0: #if (!defined ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS) nuclear@0: out.push_back( new GenVertexNormalsProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS) nuclear@0: out.push_back( new CalcTangentsProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_JOINVERTICES_PROCESS) nuclear@0: out.push_back( new JoinVerticesProcess()); nuclear@0: #endif nuclear@0: nuclear@0: // ......................................................................... nuclear@0: out.push_back( new DestroySpatialSortProcess()); nuclear@0: // ......................................................................... nuclear@0: nuclear@0: #if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS) nuclear@0: out.push_back( new SplitLargeMeshesProcess_Vertex()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS) nuclear@0: out.push_back( new MakeLeftHandedProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS) nuclear@0: out.push_back( new FlipUVsProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS) nuclear@0: out.push_back( new FlipWindingOrderProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_DEBONE_PROCESS) nuclear@0: out.push_back( new DeboneProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS) nuclear@0: out.push_back( new LimitBoneWeightsProcess()); nuclear@0: #endif nuclear@0: #if (!defined ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS) nuclear@0: out.push_back( new ImproveCacheLocalityProcess()); nuclear@0: #endif nuclear@0: } nuclear@0: nuclear@0: }