Initiual commit: AssetImporter source moved from ZFXCE repository to its own repository. PLease do not use the ZFXCE repo any more.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
60
code/SplitLargeMeshes.h
Normal file
60
code/SplitLargeMeshes.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/** @file Defines a post processing step to split large meshes into submeshes*/
|
||||
#ifndef AI_SPLITLARGEMESHES_H_INC
|
||||
#define AI_SPLITLARGEMESHES_H_INC
|
||||
|
||||
#include <vector>
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/aiMesh.h"
|
||||
#include "../include/aiScene.h"
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
|
||||
#define AI_SLM_MAX_VERTICES 1000000
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** Postprocessing filter to split large meshes into submeshes
|
||||
*/
|
||||
class SplitLargeMeshesProcess : public BaseProcess
|
||||
{
|
||||
friend class Importer;
|
||||
|
||||
protected:
|
||||
/** Constructor to be privately used by Importer */
|
||||
SplitLargeMeshesProcess();
|
||||
|
||||
/** Destructor, private as well */
|
||||
~SplitLargeMeshesProcess();
|
||||
|
||||
public:
|
||||
// -------------------------------------------------------------------
|
||||
/** Returns whether the processing step is present in the given flag field.
|
||||
* @param pFlags The processing flags the importer was called with. A bitwise
|
||||
* combination of #aiPostProcessSteps.
|
||||
* @return true if the process is present in this flag fields, false if not.
|
||||
*/
|
||||
bool IsActive( unsigned int pFlags) const;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
/** Executes the post processing step on the given imported data.
|
||||
* At the moment a process is not supposed to fail.
|
||||
* @param pScene The imported data to work at.
|
||||
*/
|
||||
void Execute( aiScene* pScene);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//! Apply the algorithm to a given mesh
|
||||
void SplitMesh (unsigned int a, aiMesh* pcMesh,
|
||||
std::vector<std::pair<aiMesh*, unsigned int> >& avList);
|
||||
|
||||
//! Update a node in the asset after a few of its meshes
|
||||
//! have been split
|
||||
void UpdateNode(aiNode* pcNode,
|
||||
const std::vector<std::pair<aiMesh*, unsigned int> >& avList);
|
||||
};
|
||||
|
||||
} // end of namespace Assimp
|
||||
|
||||
#endif // !!AI_SPLITLARGEMESHES_H_INC
|
||||
Reference in New Issue
Block a user