vrshoot

annotate libs/assimp/PostStepRegistry.cpp @ 1:e7ca128b8713

looks nice :)
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 00:35:22 +0200
parents
children
rev   line source
nuclear@0 1 /*
nuclear@0 2 ---------------------------------------------------------------------------
nuclear@0 3 Open Asset Import Library (assimp)
nuclear@0 4 ---------------------------------------------------------------------------
nuclear@0 5
nuclear@0 6 Copyright (c) 2006-2012, assimp team
nuclear@0 7
nuclear@0 8 All rights reserved.
nuclear@0 9
nuclear@0 10 Redistribution and use of this software in source and binary forms,
nuclear@0 11 with or without modification, are permitted provided that the following
nuclear@0 12 conditions are met:
nuclear@0 13
nuclear@0 14 * Redistributions of source code must retain the above
nuclear@0 15 copyright notice, this list of conditions and the
nuclear@0 16 following disclaimer.
nuclear@0 17
nuclear@0 18 * Redistributions in binary form must reproduce the above
nuclear@0 19 copyright notice, this list of conditions and the
nuclear@0 20 following disclaimer in the documentation and/or other
nuclear@0 21 materials provided with the distribution.
nuclear@0 22
nuclear@0 23 * Neither the name of the assimp team, nor the names of its
nuclear@0 24 contributors may be used to endorse or promote products
nuclear@0 25 derived from this software without specific prior
nuclear@0 26 written permission of the assimp team.
nuclear@0 27
nuclear@0 28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
nuclear@0 29 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
nuclear@0 30 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
nuclear@0 31 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
nuclear@0 32 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
nuclear@0 33 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
nuclear@0 34 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
nuclear@0 35 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
nuclear@0 36 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
nuclear@0 37 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
nuclear@0 38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
nuclear@0 39 ---------------------------------------------------------------------------
nuclear@0 40 */
nuclear@0 41
nuclear@0 42 /** @file ImporterRegistry.cpp
nuclear@0 43
nuclear@0 44 Central registry for all postprocessing steps available. Do not edit this file
nuclear@0 45 directly (unless you are adding new steps), instead use the
nuclear@0 46 corresponding preprocessor flag to selectively disable steps.
nuclear@0 47 */
nuclear@0 48
nuclear@0 49 #include "AssimpPCH.h"
nuclear@0 50
nuclear@0 51 #ifndef ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS
nuclear@0 52 # include "CalcTangentsProcess.h"
nuclear@0 53 #endif
nuclear@0 54 #ifndef ASSIMP_BUILD_NO_JOINVERTICES_PROCESS
nuclear@0 55 # include "JoinVerticesProcess.h"
nuclear@0 56 #endif
nuclear@0 57 #if !(defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS && defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS && defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS)
nuclear@0 58 # include "ConvertToLHProcess.h"
nuclear@0 59 #endif
nuclear@0 60 #ifndef ASSIMP_BUILD_NO_TRIANGULATE_PROCESS
nuclear@0 61 # include "TriangulateProcess.h"
nuclear@0 62 #endif
nuclear@0 63 #ifndef ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS
nuclear@0 64 # include "GenFaceNormalsProcess.h"
nuclear@0 65 #endif
nuclear@0 66 #ifndef ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS
nuclear@0 67 # include "GenVertexNormalsProcess.h"
nuclear@0 68 #endif
nuclear@0 69 #ifndef ASSIMP_BUILD_NO_REMOVEVC_PROCESS
nuclear@0 70 # include "RemoveVCProcess.h"
nuclear@0 71 #endif
nuclear@0 72 #ifndef ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS
nuclear@0 73 # include "SplitLargeMeshes.h"
nuclear@0 74 #endif
nuclear@0 75 #ifndef ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS
nuclear@0 76 # include "PretransformVertices.h"
nuclear@0 77 #endif
nuclear@0 78 #ifndef ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS
nuclear@0 79 # include "LimitBoneWeightsProcess.h"
nuclear@0 80 #endif
nuclear@0 81 #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
nuclear@0 82 # include "ValidateDataStructure.h"
nuclear@0 83 #endif
nuclear@0 84 #ifndef ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS
nuclear@0 85 # include "ImproveCacheLocality.h"
nuclear@0 86 #endif
nuclear@0 87 #ifndef ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS
nuclear@0 88 # include "FixNormalsStep.h"
nuclear@0 89 #endif
nuclear@0 90 #ifndef ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS
nuclear@0 91 # include "RemoveRedundantMaterials.h"
nuclear@0 92 #endif
nuclear@0 93 #ifndef ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS
nuclear@0 94 # include "FindInvalidDataProcess.h"
nuclear@0 95 #endif
nuclear@0 96 #ifndef ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS
nuclear@0 97 # include "FindDegenerates.h"
nuclear@0 98 #endif
nuclear@0 99 #ifndef ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS
nuclear@0 100 # include "SortByPTypeProcess.h"
nuclear@0 101 #endif
nuclear@0 102 #ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS
nuclear@0 103 # include "ComputeUVMappingProcess.h"
nuclear@0 104 #endif
nuclear@0 105 #ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
nuclear@0 106 # include "TextureTransform.h"
nuclear@0 107 #endif
nuclear@0 108 #ifndef ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS
nuclear@0 109 # include "FindInstancesProcess.h"
nuclear@0 110 #endif
nuclear@0 111 #ifndef ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS
nuclear@0 112 # include "OptimizeMeshes.h"
nuclear@0 113 #endif
nuclear@0 114 #ifndef ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS
nuclear@0 115 # include "OptimizeGraph.h"
nuclear@0 116 #endif
nuclear@0 117 #ifndef ASSIMP_BUILD_NO_SPLITBYBONECOUNT_PROCESS
nuclear@0 118 # include "SplitByBoneCountProcess.h"
nuclear@0 119 #endif
nuclear@0 120 #ifndef ASSIMP_BUILD_NO_DEBONE_PROCESS
nuclear@0 121 # include "DeboneProcess.h"
nuclear@0 122 #endif
nuclear@0 123
nuclear@0 124 namespace Assimp {
nuclear@0 125
nuclear@0 126 // ------------------------------------------------------------------------------------------------
nuclear@0 127 void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out)
nuclear@0 128 {
nuclear@0 129 // ----------------------------------------------------------------------------
nuclear@0 130 // Add an instance of each post processing step here in the order
nuclear@0 131 // of sequence it is executed. Steps that are added here are not
nuclear@0 132 // validated - as RegisterPPStep() does - all dependencies must be given.
nuclear@0 133 // ----------------------------------------------------------------------------
nuclear@0 134 out.reserve(25);
nuclear@0 135 #if (!defined ASSIMP_BUILD_NO_REMOVEVC_PROCESS)
nuclear@0 136 out.push_back( new RemoveVCProcess());
nuclear@0 137 #endif
nuclear@0 138 #if (!defined ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS)
nuclear@0 139 out.push_back( new RemoveRedundantMatsProcess());
nuclear@0 140 #endif
nuclear@0 141 #if (!defined ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS)
nuclear@0 142 out.push_back( new FindInstancesProcess());
nuclear@0 143 #endif
nuclear@0 144 #if (!defined ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS)
nuclear@0 145 out.push_back( new OptimizeGraphProcess());
nuclear@0 146 #endif
nuclear@0 147 #if (!defined ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS)
nuclear@0 148 out.push_back( new OptimizeMeshesProcess());
nuclear@0 149 #endif
nuclear@0 150 #if (!defined ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS)
nuclear@0 151 out.push_back( new FindDegeneratesProcess());
nuclear@0 152 #endif
nuclear@0 153 #ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS
nuclear@0 154 out.push_back( new ComputeUVMappingProcess());
nuclear@0 155 #endif
nuclear@0 156 #ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
nuclear@0 157 out.push_back( new TextureTransformStep());
nuclear@0 158 #endif
nuclear@0 159 #if (!defined ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS)
nuclear@0 160 out.push_back( new PretransformVertices());
nuclear@0 161 #endif
nuclear@0 162 #if (!defined ASSIMP_BUILD_NO_TRIANGULATE_PROCESS)
nuclear@0 163 out.push_back( new TriangulateProcess());
nuclear@0 164 #endif
nuclear@0 165 #if (!defined ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS)
nuclear@0 166 out.push_back( new SortByPTypeProcess());
nuclear@0 167 #endif
nuclear@0 168 #if (!defined ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS)
nuclear@0 169 out.push_back( new FindInvalidDataProcess());
nuclear@0 170 #endif
nuclear@0 171 #if (!defined ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS)
nuclear@0 172 out.push_back( new FixInfacingNormalsProcess());
nuclear@0 173 #endif
nuclear@0 174 #if (!defined ASSIMP_BUILD_NO_SPLITBYBONECOUNT_PROCESS)
nuclear@0 175 out.push_back( new SplitByBoneCountProcess());
nuclear@0 176 #endif
nuclear@0 177 #if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS)
nuclear@0 178 out.push_back( new SplitLargeMeshesProcess_Triangle());
nuclear@0 179 #endif
nuclear@0 180 #if (!defined ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS)
nuclear@0 181 out.push_back( new GenFaceNormalsProcess());
nuclear@0 182 #endif
nuclear@0 183
nuclear@0 184 // .........................................................................
nuclear@0 185 // DON'T change the order of these five ..
nuclear@0 186 // XXX this is actually a design weakness that dates back to the time
nuclear@0 187 // when Importer would maintain the postprocessing step list exclusively.
nuclear@0 188 // Now that others access it too, we need a better solution.
nuclear@0 189 out.push_back( new ComputeSpatialSortProcess());
nuclear@0 190 // .........................................................................
nuclear@0 191
nuclear@0 192 #if (!defined ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS)
nuclear@0 193 out.push_back( new GenVertexNormalsProcess());
nuclear@0 194 #endif
nuclear@0 195 #if (!defined ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS)
nuclear@0 196 out.push_back( new CalcTangentsProcess());
nuclear@0 197 #endif
nuclear@0 198 #if (!defined ASSIMP_BUILD_NO_JOINVERTICES_PROCESS)
nuclear@0 199 out.push_back( new JoinVerticesProcess());
nuclear@0 200 #endif
nuclear@0 201
nuclear@0 202 // .........................................................................
nuclear@0 203 out.push_back( new DestroySpatialSortProcess());
nuclear@0 204 // .........................................................................
nuclear@0 205
nuclear@0 206 #if (!defined ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS)
nuclear@0 207 out.push_back( new SplitLargeMeshesProcess_Vertex());
nuclear@0 208 #endif
nuclear@0 209 #if (!defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS)
nuclear@0 210 out.push_back( new MakeLeftHandedProcess());
nuclear@0 211 #endif
nuclear@0 212 #if (!defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS)
nuclear@0 213 out.push_back( new FlipUVsProcess());
nuclear@0 214 #endif
nuclear@0 215 #if (!defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS)
nuclear@0 216 out.push_back( new FlipWindingOrderProcess());
nuclear@0 217 #endif
nuclear@0 218 #if (!defined ASSIMP_BUILD_DEBONE_PROCESS)
nuclear@0 219 out.push_back( new DeboneProcess());
nuclear@0 220 #endif
nuclear@0 221 #if (!defined ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS)
nuclear@0 222 out.push_back( new LimitBoneWeightsProcess());
nuclear@0 223 #endif
nuclear@0 224 #if (!defined ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS)
nuclear@0 225 out.push_back( new ImproveCacheLocalityProcess());
nuclear@0 226 #endif
nuclear@0 227 }
nuclear@0 228
nuclear@0 229 }