Fix the compile pass, still unresolved symbols.

This commit is contained in:
Kim Kulling
2019-06-10 23:26:00 +02:00
parent 2d985b92c9
commit 2da3a38d60
89 changed files with 426 additions and 466 deletions

View File

@@ -42,11 +42,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Defines a post processing step to calculate tangents and
bitangents on all imported meshes.*/
bi-tangents on all imported meshes.*/
#ifndef AI_CALCTANGENTSPROCESS_H_INC
#define AI_CALCTANGENTSPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiMesh;

View File

@@ -45,7 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_COMPUTEUVMAPPING_H_INC
#define AI_COMPUTEUVMAPPING_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
#include <assimp/material.h>
#include <assimp/types.h>

View File

@@ -52,7 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_CONVERTTOLHPROCESS_H_INC
#include <assimp/types.h>
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiMesh;
struct aiNodeAnim;

View File

@@ -44,17 +44,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_DEBONEPROCESS_H_INC
#define AI_DEBONEPROCESS_H_INC
#include <vector>
#include <utility>
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
#include <assimp/scene.h>
#include <vector>
#include <utility>
#// Forward declarations
class DeboneTest;
namespace Assimp
{
namespace Assimp {
#if (!defined AI_DEBONE_THRESHOLD)
# define AI_DEBONE_THRESHOLD 1.0f
@@ -66,14 +67,11 @@ namespace Assimp
* the bone are split from the mesh. The split off (new) mesh is boneless. At any
* point in time, bones without affect upon a given mesh are to be removed.
*/
class DeboneProcess : public BaseProcess
{
class DeboneProcess : public BaseProcess {
public:
DeboneProcess();
~DeboneProcess();
public:
// -------------------------------------------------------------------
/** Returns whether the processing step is present in the given flag.
* @param pFlags The processing flags the importer was called with.
@@ -91,7 +89,6 @@ public:
void SetupProperties(const Importer* pImp);
protected:
// -------------------------------------------------------------------
/** Executes the post processing step on the given imported data.
* At the moment a process is not supposed to fail.

View File

@@ -44,23 +44,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_DROPFACENORMALPROCESS_H_INC
#define AI_DROPFACENORMALPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
/** The DropFaceNormalsProcess computes face normals for all faces of all meshes
*/
class ASSIMP_API_WINONLY DropFaceNormalsProcess : public BaseProcess
{
class ASSIMP_API_WINONLY DropFaceNormalsProcess : public BaseProcess {
public:
DropFaceNormalsProcess();
~DropFaceNormalsProcess();
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

View File

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <string>

View File

@@ -45,7 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_FINDDEGENERATESPROCESS_H_INC
#define AI_FINDDEGENERATESPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
class FindDegeneratesProcessTest;

View File

@@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_FINDINSTANCES_H_INC
#define AI_FINDINSTANCES_H_INC
#include "BaseProcess.h"
#include "ProcessHelper.h"
#include "Common/BaseProcess.h"
#include "PostProcessing/ProcessHelper.h"
class FindInstancesProcessTest;
namespace Assimp {

View File

@@ -46,7 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_FINDINVALIDDATA_H_INC
#define AI_FINDINVALIDDATA_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/types.h>
#include <assimp/anim.h>

View File

@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_FIXNORMALSPROCESS_H_INC
#define AI_FIXNORMALSPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiMesh;

View File

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_GENFACENORMALPROCESS_H_INC
#define AI_GENFACENORMALPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
namespace Assimp

View File

@@ -45,24 +45,24 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_GENVERTEXNORMALPROCESS_H_INC
#define AI_GENVERTEXNORMALPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/assbin_chunks.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
// Forward declarations
class GenNormalsTest;
namespace Assimp {
// ---------------------------------------------------------------------------
/** The GenFaceNormalsProcess computes vertex normals for all vertizes
/** The GenFaceNormalsProcess computes vertex normals for all vertices
*/
class ASSIMP_API GenVertexNormalsProcess : public BaseProcess
{
class ASSIMP_API GenVertexNormalsProcess : public BaseProcess {
public:
GenVertexNormalsProcess();
~GenVertexNormalsProcess();
public:
// -------------------------------------------------------------------
/** Returns whether the processing step is present in the given flag.
* @param pFlags The processing flags the importer was called with.
@@ -88,13 +88,10 @@ public:
// setter for configMaxAngle
inline void SetMaxSmoothAngle(ai_real f)
{
inline void SetMaxSmoothAngle(ai_real f) {
configMaxAngle =f;
}
public:
// -------------------------------------------------------------------
/** Computes normals for a specific mesh
* @param pcMesh Mesh
@@ -104,7 +101,6 @@ public:
bool GenMeshVertexNormals (aiMesh* pcMesh, unsigned int meshIndex);
private:
/** Configuration option: maximum smoothing angle, in radians*/
ai_real configMaxAngle;
mutable bool force_ = false;

View File

@@ -45,14 +45,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* <br>
* The algorithm is roughly basing on this paper:
* http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf
* .. although overdraw rduction isn't implemented yet ...
* .. although overdraw reduction isn't implemented yet ...
*/
// internal headers
#include "ImproveCacheLocality.h"
#include "VertexTriangleAdjacency.h"
#include "PostProcessing/ImproveCacheLocality.h"
#include "Common/VertexTriangleAdjacency.h"
#include <assimp/StringUtils.h>
#include <assimp/postprocess.h>
#include <assimp/scene.h>
@@ -64,36 +63,33 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
ImproveCacheLocalityProcess::ImproveCacheLocalityProcess() {
configCacheDepth = PP_ICL_PTCACHE_SIZE;
ImproveCacheLocalityProcess::ImproveCacheLocalityProcess()
: mConfigCacheDepth(PP_ICL_PTCACHE_SIZE) {
// empty
}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
ImproveCacheLocalityProcess::~ImproveCacheLocalityProcess()
{
ImproveCacheLocalityProcess::~ImproveCacheLocalityProcess() {
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
bool ImproveCacheLocalityProcess::IsActive( unsigned int pFlags) const
{
bool ImproveCacheLocalityProcess::IsActive( unsigned int pFlags) const {
return (pFlags & aiProcess_ImproveCacheLocality) != 0;
}
// ------------------------------------------------------------------------------------------------
// Setup configuration
void ImproveCacheLocalityProcess::SetupProperties(const Importer* pImp)
{
void ImproveCacheLocalityProcess::SetupProperties(const Importer* pImp) {
// AI_CONFIG_PP_ICL_PTCACHE_SIZE controls the target cache size for the optimizer
configCacheDepth = pImp->GetPropertyInteger(AI_CONFIG_PP_ICL_PTCACHE_SIZE,PP_ICL_PTCACHE_SIZE);
mConfigCacheDepth = pImp->GetPropertyInteger(AI_CONFIG_PP_ICL_PTCACHE_SIZE,PP_ICL_PTCACHE_SIZE);
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
void ImproveCacheLocalityProcess::Execute( aiScene* pScene)
{
void ImproveCacheLocalityProcess::Execute( aiScene* pScene) {
if (!pScene->mNumMeshes) {
ASSIMP_LOG_DEBUG("ImproveCacheLocalityProcess skipped; there are no meshes");
return;
@@ -103,7 +99,7 @@ void ImproveCacheLocalityProcess::Execute( aiScene* pScene)
float out = 0.f;
unsigned int numf = 0, numm = 0;
for( unsigned int a = 0; a < pScene->mNumMeshes; a++){
for( unsigned int a = 0; a < pScene->mNumMeshes; ++a ){
const float res = ProcessMesh( pScene->mMeshes[a],a);
if (res) {
numf += pScene->mMeshes[a]->mNumFaces;
@@ -121,44 +117,41 @@ void ImproveCacheLocalityProcess::Execute( aiScene* pScene)
// ------------------------------------------------------------------------------------------------
// Improves the cache coherency of a specific mesh
float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshNum)
{
ai_real ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshNum) {
// TODO: rewrite this to use std::vector or boost::shared_array
ai_assert(NULL != pMesh);
ai_assert(nullptr != pMesh);
// Check whether the input data is valid
// - there must be vertices and faces
// - all faces must be triangulated or we can't operate on them
if (!pMesh->HasFaces() || !pMesh->HasPositions())
return 0.f;
return static_cast<ai_real>(0.f);
if (pMesh->mPrimitiveTypes != aiPrimitiveType_TRIANGLE) {
ASSIMP_LOG_ERROR("This algorithm works on triangle meshes only");
return 0.f;
return static_cast<ai_real>(0.f);
}
if(pMesh->mNumVertices <= configCacheDepth) {
return 0.f;
if(pMesh->mNumVertices <= mConfigCacheDepth) {
return static_cast<ai_real>(0.f);
}
float fACMR = 3.f;
ai_real fACMR = 3.f;
const aiFace* const pcEnd = pMesh->mFaces+pMesh->mNumFaces;
// Input ACMR is for logging purposes only
if (!DefaultLogger::isNullLogger()) {
unsigned int* piFIFOStack = new unsigned int[configCacheDepth];
memset(piFIFOStack,0xff,configCacheDepth*sizeof(unsigned int));
unsigned int* piFIFOStack = new unsigned int[mConfigCacheDepth];
memset(piFIFOStack,0xff,mConfigCacheDepth*sizeof(unsigned int));
unsigned int* piCur = piFIFOStack;
const unsigned int* const piCurEnd = piFIFOStack + configCacheDepth;
const unsigned int* const piCurEnd = piFIFOStack + mConfigCacheDepth;
// count the number of cache misses
unsigned int iCacheMisses = 0;
for (const aiFace* pcFace = pMesh->mFaces;pcFace != pcEnd;++pcFace) {
for (unsigned int qq = 0; qq < 3;++qq) {
bool bInCache = false;
for (unsigned int* pp = piFIFOStack;pp < piCurEnd;++pp) {
if (*pp == pcFace->mIndices[qq]) {
// the vertex is in cache
@@ -176,7 +169,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
}
}
delete[] piFIFOStack;
fACMR = (float)iCacheMisses / pMesh->mNumFaces;
fACMR = (ai_real) iCacheMisses / pMesh->mNumFaces;
if (3.0 == fACMR) {
char szBuff[128]; // should be sufficiently large in every case
@@ -185,7 +178,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// smaller than 3.0 ...
ai_snprintf(szBuff,128,"Mesh %u: Not suitable for vcache optimization",meshNum);
ASSIMP_LOG_WARN(szBuff);
return 0.f;
return static_cast<ai_real>(0.f);
}
}
@@ -258,7 +251,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
int ivdx = 0;
int ics = 1;
int iStampCnt = configCacheDepth+1;
int iStampCnt = mConfigCacheDepth+1;
while (ivdx >= 0) {
unsigned int icnt = piNumTriPtrNoModify[ivdx];
@@ -294,7 +287,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
*piCSIter++ = dp;
// if the vertex is not yet in cache, set its cache count
if (iStampCnt-piCachingStamps[dp] > configCacheDepth) {
if (iStampCnt-piCachingStamps[dp] > mConfigCacheDepth) {
piCachingStamps[dp] = iStampCnt++;
++iCacheMisses;
}
@@ -319,7 +312,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// will the vertex be in cache, even after fanning occurs?
unsigned int tmp;
if ((tmp = iStampCnt-piCachingStamps[dp]) + 2*piNumTriPtr[dp] <= configCacheDepth) {
if ((tmp = iStampCnt-piCachingStamps[dp]) + 2*piNumTriPtr[dp] <= mConfigCacheDepth) {
priority = tmp;
}
@@ -356,7 +349,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
}
}
}
float fACMR2 = 0.0f;
ai_real fACMR2 = 0.0f;
if (!DefaultLogger::isNullLogger()) {
fACMR2 = (float)iCacheMisses / pMesh->mNumFaces;

View File

@@ -45,7 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_IMPROVECACHELOCALITY_H_INC
#define AI_IMPROVECACHELOCALITY_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/types.h>
struct aiMesh;
@@ -87,12 +88,12 @@ protected:
* @param pMesh The mesh to process.
* @param meshNum Index of the mesh to process
*/
float ProcessMesh( aiMesh* pMesh, unsigned int meshNum);
ai_real ProcessMesh( aiMesh* pMesh, unsigned int meshNum);
private:
//! Configuration parameter: specifies the size of the cache to
//! optimize the vertex data for.
unsigned int configCacheDepth;
unsigned int mConfigCacheDepth;
};
} // end of namespace Assimp

View File

@@ -45,7 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_JOINVERTICESPROCESS_H_INC
#define AI_JOINVERTICESPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/types.h>
struct aiMesh;
@@ -61,13 +62,11 @@ namespace Assimp
* erases all but one of the copies. This usually reduces the number of vertices
* in a mesh by a serious amount and is the standard form to render a mesh.
*/
class ASSIMP_API JoinVerticesProcess : public BaseProcess
{
class ASSIMP_API JoinVerticesProcess : public BaseProcess {
public:
JoinVerticesProcess();
~JoinVerticesProcess();
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
@@ -83,15 +82,12 @@ public:
*/
void Execute( aiScene* pScene);
public:
// -------------------------------------------------------------------
/** Unites identical vertices in the given mesh.
* @param pMesh The mesh to process.
* @param meshIndex Index of the mesh to process
*/
int ProcessMesh( aiMesh* pMesh, unsigned int meshIndex);
private:
};
} // end of namespace Assimp

View File

@@ -44,14 +44,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_LIMITBONEWEIGHTSPROCESS_H_INC
#define AI_LIMITBONEWEIGHTSPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
// Forward declarations
struct aiMesh;
class LimitBoneWeightsTest;
namespace Assimp
{
namespace Assimp {
// NOTE: If you change these limits, don't forget to change the
// corresponding values in all Assimp ports
@@ -72,14 +72,11 @@ namespace Assimp
* The other weights on this bone are then renormalized to assure the sum weight
* to be 1.
*/
class ASSIMP_API LimitBoneWeightsProcess : public BaseProcess
{
class ASSIMP_API LimitBoneWeightsProcess : public BaseProcess {
public:
LimitBoneWeightsProcess();
~LimitBoneWeightsProcess();
public:
// -------------------------------------------------------------------
/** Returns whether the processing step is present in the given flag.
* @param pFlags The processing flags the importer was called with.
@@ -96,8 +93,6 @@ public:
*/
void SetupProperties(const Importer* pImp);
public:
// -------------------------------------------------------------------
/** Limits the bone weight count for all vertices in the given mesh.
* @param pMesh The mesh to process.
@@ -111,34 +106,29 @@ public:
*/
void Execute( aiScene* pScene);
public:
// -------------------------------------------------------------------
/** Describes a bone weight on a vertex */
struct Weight
{
struct Weight {
unsigned int mBone; ///< Index of the bone
float mWeight; ///< Weight of that bone on this vertex
Weight() AI_NO_EXCEPT
: mBone(0)
, mWeight(0.0f)
{ }
, mWeight(0.0f) {
// empty
}
Weight( unsigned int pBone, float pWeight)
{
mBone = pBone;
mWeight = pWeight;
: mBone(pBone)
, mWeight(pWeight) {
// empty
}
/** Comparison operator to sort bone weights by descending weight */
bool operator < (const Weight& pWeight) const
{
bool operator < (const Weight& pWeight) const {
return mWeight > pWeight.mWeight;
}
};
public:
/** Maximum number of bones influencing any single vertex. */
unsigned int mMaxWeights;
};

View File

@@ -46,7 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_MAKEVERBOSEFORMAT_H_INC
#define AI_MAKEVERBOSEFORMAT_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiMesh;
namespace Assimp {

View File

@@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2019, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,

View File

@@ -46,13 +46,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_OPTIMIZEGRAPHPROCESS_H_INC
#define AI_OPTIMIZEGRAPHPROCESS_H_INC
#include "BaseProcess.h"
#include "ProcessHelper.h"
#include "Common/BaseProcess.h"
#include "PostProcessing/ProcessHelper.h"
#include <assimp/types.h>
#include <set>
// Forward declarations
struct aiMesh;
class OptimizeGraphProcessTest;
namespace Assimp {
// -----------------------------------------------------------------------------
@@ -64,14 +69,11 @@ namespace Assimp {
* @see aiProcess_OptimizeGraph for a detailed description of the
* algorithm being applied.
*/
class OptimizeGraphProcess : public BaseProcess
{
class OptimizeGraphProcess : public BaseProcess {
public:
OptimizeGraphProcess();
~OptimizeGraphProcess();
public:
// -------------------------------------------------------------------
bool IsActive( unsigned int pFlags) const;
@@ -81,14 +83,12 @@ public:
// -------------------------------------------------------------------
void SetupProperties(const Importer* pImp);
// -------------------------------------------------------------------
/** @brief Add a list of node names to be locked and not modified.
* @param in List of nodes. See #AI_CONFIG_PP_OG_EXCLUDE_LIST for
* format explanations.
*/
inline void AddLockedNodeList(std::string& in)
{
inline void AddLockedNodeList(std::string& in) {
ConvertListToStrings (in,locked_nodes);
}
@@ -96,8 +96,7 @@ public:
/** @brief Add another node to be locked and not modified.
* @param name Name to be locked
*/
inline void AddLockedNode(std::string& name)
{
inline void AddLockedNode(std::string& name) {
locked_nodes.push_back(name);
}
@@ -105,25 +104,21 @@ public:
/** @brief Remove a node from the list of locked nodes.
* @param name Name to be unlocked
*/
inline void RemoveLockedNode(std::string& name)
{
inline void RemoveLockedNode(std::string& name) {
locked_nodes.remove(name);
}
protected:
void CollectNewChildren(aiNode* nd, std::list<aiNode*>& nodes);
void FindInstancedMeshes (aiNode* pNode);
private:
#ifdef AI_OG_USE_HASHING
typedef std::set<unsigned int> LockedSetType;
#else
typedef std::set<std::string> LockedSetType;
#endif
//! Scene we're working with
aiScene* mScene;

View File

@@ -46,8 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_OPTIMIZEMESHESPROCESS_H_INC
#define AI_OPTIMIZEMESHESPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/types.h>
#include <vector>
struct aiMesh;
@@ -64,16 +66,14 @@ namespace Assimp {
*
* @note Instanced meshes are currently not processed.
*/
class OptimizeMeshesProcess : public BaseProcess
{
class OptimizeMeshesProcess : public BaseProcess {
public:
/// @brief The class constructor.
OptimizeMeshesProcess();
/// @brief The class destcructor,
/// @brief The class destructor.
~OptimizeMeshesProcess();
/** @brief Internal utility to store additional mesh info
*/
struct MeshInfo {

View File

@@ -47,13 +47,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_PRETRANSFORMVERTICES_H_INC
#define AI_PRETRANSFORMVERTICES_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
#include <list>
#include <vector>
// Forward declarations
struct aiNode;
class PretransformVerticesTest;
namespace Assimp {
// ---------------------------------------------------------------------------
@@ -80,10 +85,10 @@ public:
// -------------------------------------------------------------------
/** @brief Toggle the 'keep hierarchy' option
* @param d hm ... difficult to guess what this means, hu!?
* @param keep true for keep configuration.
*/
void KeepHierarchy(bool d) {
configKeepHierarchy = d;
void KeepHierarchy(bool keep) {
configKeepHierarchy = keep;
}
// -------------------------------------------------------------------
@@ -148,8 +153,6 @@ private:
// Build reference counters for all meshes
void BuildMeshRefCountArray(aiNode* nd, unsigned int * refs);
//! Configuration option: keep scene hierarchy as long as possible
bool configKeepHierarchy;
bool configNormalize;

View File

@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h>
#include <assimp/SpatialSort.h>
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/ParsingUtils.h>
#include <list>

View File

@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "RemoveRedundantMaterials.h"
#include <assimp/ParsingUtils.h>
#include "ProcessHelper.h"
#include "MaterialSystem.h"
#include "Material/MaterialSystem.h"
#include <stdio.h>
using namespace Assimp;
@@ -57,7 +57,7 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
RemoveRedundantMatsProcess::RemoveRedundantMatsProcess()
: configFixedMaterials() {
: mConfigFixedMaterials() {
// nothing to do here
}
@@ -80,7 +80,7 @@ bool RemoveRedundantMatsProcess::IsActive( unsigned int pFlags) const
void RemoveRedundantMatsProcess::SetupProperties(const Importer* pImp)
{
// Get value of AI_CONFIG_PP_RRM_EXCLUDE_LIST
configFixedMaterials = pImp->GetPropertyString(AI_CONFIG_PP_RRM_EXCLUDE_LIST,"");
mConfigFixedMaterials = pImp->GetPropertyString(AI_CONFIG_PP_RRM_EXCLUDE_LIST,"");
}
// ------------------------------------------------------------------------------------------------
@@ -100,10 +100,10 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
// If a list of materials to be excluded was given, match the list with
// our imported materials and 'salt' all positive matches to ensure that
// we get unique hashes later.
if (configFixedMaterials.length()) {
if (mConfigFixedMaterials.length()) {
std::list<std::string> strings;
ConvertListToStrings(configFixedMaterials,strings);
ConvertListToStrings(mConfigFixedMaterials,strings);
for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
aiMaterial* mat = pScene->mMaterials[i];

View File

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_REMOVEREDUNDANTMATERIALS_H_INC
#define AI_REMOVEREDUNDANTMATERIALS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
class RemoveRedundantMatsTest;
@@ -57,8 +57,7 @@ namespace Assimp {
/** RemoveRedundantMatsProcess: Post-processing step to remove redundant
* materials from the imported scene.
*/
class ASSIMP_API RemoveRedundantMatsProcess : public BaseProcess
{
class ASSIMP_API RemoveRedundantMatsProcess : public BaseProcess {
public:
/// The default class constructor.
RemoveRedundantMatsProcess();
@@ -66,7 +65,6 @@ public:
/// The class destructor.
~RemoveRedundantMatsProcess();
public:
// -------------------------------------------------------------------
// Check whether step is active
bool IsActive( unsigned int pFlags) const;
@@ -79,27 +77,25 @@ public:
// Setup import settings
void SetupProperties(const Importer* pImp);
// -------------------------------------------------------------------
/** @brief Set list of fixed (unmutable) materials
/** @brief Set list of fixed (inmutable) materials
* @param fixed See #AI_CONFIG_PP_RRM_EXCLUDE_LIST
*/
void SetFixedMaterialsString(const std::string& fixed = "") {
configFixedMaterials = fixed;
mConfigFixedMaterials = fixed;
}
// -------------------------------------------------------------------
/** @brief Get list of fixed (unmutable) materials
/** @brief Get list of fixed (inmutable) materials
* @return See #AI_CONFIG_PP_RRM_EXCLUDE_LIST
*/
const std::string& GetFixedMaterialsString() const {
return configFixedMaterials;
return mConfigFixedMaterials;
}
private:
//! Configuration option: list of all fixed materials
std::string configFixedMaterials;
std::string mConfigFixedMaterials;
};
} // end of namespace Assimp

View File

@@ -44,7 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_REMOVEVCPROCESS_H_INCLUDED
#define AI_REMOVEVCPROCESS_H_INCLUDED
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
class RemoveVCProcessTest;

View File

@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiNode;

View File

@@ -57,8 +57,8 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
SortByPTypeProcess::SortByPTypeProcess()
{
configRemoveMeshes = 0;
: mConfigRemoveMeshes( 0 ) {
// empty
}
// ------------------------------------------------------------------------------------------------
@@ -78,7 +78,7 @@ bool SortByPTypeProcess::IsActive( unsigned int pFlags) const
// ------------------------------------------------------------------------------------------------
void SortByPTypeProcess::SetupProperties(const Importer* pImp)
{
configRemoveMeshes = pImp->GetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE,0);
mConfigRemoveMeshes = pImp->GetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE,0);
}
// ------------------------------------------------------------------------------------------------
@@ -172,7 +172,7 @@ void SortByPTypeProcess::Execute( aiScene* pScene) {
}
if (1 == num) {
if (!(configRemoveMeshes & mesh->mPrimitiveTypes)) {
if (!(mConfigRemoveMeshes & mesh->mPrimitiveTypes)) {
*meshIdx = static_cast<unsigned int>( outMeshes.size() );
outMeshes.push_back(mesh);
} else {
@@ -206,7 +206,7 @@ void SortByPTypeProcess::Execute( aiScene* pScene) {
VertexWeightTable* avw = ComputeVertexBoneWeightTable(mesh);
for (unsigned int real = 0; real < 4; ++real,++meshIdx)
{
if ( !aiNumPerPType[real] || configRemoveMeshes & (1u << real))
if ( !aiNumPerPType[real] || mConfigRemoveMeshes & (1u << real))
{
continue;
}
@@ -392,10 +392,10 @@ void SortByPTypeProcess::Execute( aiScene* pScene) {
{
char buffer[1024];
::ai_snprintf(buffer,1024,"Points: %u%s, Lines: %u%s, Triangles: %u%s, Polygons: %u%s (Meshes, X = removed)",
aiNumMeshesPerPType[0], ((configRemoveMeshes & aiPrimitiveType_POINT) ? "X" : ""),
aiNumMeshesPerPType[1], ((configRemoveMeshes & aiPrimitiveType_LINE) ? "X" : ""),
aiNumMeshesPerPType[2], ((configRemoveMeshes & aiPrimitiveType_TRIANGLE) ? "X" : ""),
aiNumMeshesPerPType[3], ((configRemoveMeshes & aiPrimitiveType_POLYGON) ? "X" : ""));
aiNumMeshesPerPType[0], ((mConfigRemoveMeshes & aiPrimitiveType_POINT) ? "X" : ""),
aiNumMeshesPerPType[1], ((mConfigRemoveMeshes & aiPrimitiveType_LINE) ? "X" : ""),
aiNumMeshesPerPType[2], ((mConfigRemoveMeshes & aiPrimitiveType_TRIANGLE) ? "X" : ""),
aiNumMeshesPerPType[3], ((mConfigRemoveMeshes & aiPrimitiveType_POLYGON) ? "X" : ""));
ASSIMP_LOG_INFO(buffer);
ASSIMP_LOG_DEBUG("SortByPTypeProcess finished");
}

View File

@@ -45,10 +45,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_SORTBYPTYPEPROCESS_H_INC
#define AI_SORTBYPTYPEPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
class SortByPTypeProcessTest;
namespace Assimp {
@@ -57,14 +58,11 @@ namespace Assimp {
* A mesh with 5 lines, 3 points and 145 triangles would be split in 3
* submeshes.
*/
class ASSIMP_API SortByPTypeProcess : public BaseProcess
{
class ASSIMP_API SortByPTypeProcess : public BaseProcess {
public:
SortByPTypeProcess();
~SortByPTypeProcess();
public:
// -------------------------------------------------------------------
bool IsActive( unsigned int pFlags) const;
@@ -75,8 +73,7 @@ public:
void SetupProperties(const Importer* pImp);
private:
int configRemoveMeshes;
int mConfigRemoveMeshes;
};

View File

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_SPLITLARGEMESHES_H_INC
#include <vector>
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/mesh.h>
#include <assimp/scene.h>

View File

@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_TEXTURE_TRANSFORM_H_INCLUDED
#include <assimp/BaseImporter.h>
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
#include <assimp/material.h>
#include <list>

View File

@@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
Copyright (c) 2006-2019, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
@@ -60,9 +58,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* a file
*/
#ifndef ASSIMP_BUILD_NO_TRIANGULATE_PROCESS
#include "TriangulateProcess.h"
#include "ProcessHelper.h"
#include "PolyTools.h"
#include "PostProcessing/TriangulateProcess.h"
#include "PostProcessing/ProcessHelper.h"
#include "Common/PolyTools.h"
#include <memory>
//#define AI_BUILD_TRIANGULATE_COLOR_FACE_WINDING

View File

@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_TRIANGULATEPROCESS_H_INC
#define AI_TRIANGULATEPROCESS_H_INC
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiMesh;
@@ -59,14 +59,11 @@ namespace Assimp {
* into triangles. You usually want this to happen because the graphics cards
* need their data as triangles.
*/
class ASSIMP_API TriangulateProcess : public BaseProcess
{
class ASSIMP_API TriangulateProcess : public BaseProcess {
public:
TriangulateProcess();
~TriangulateProcess();
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
@@ -82,7 +79,6 @@ public:
*/
void Execute( aiScene* pScene);
public:
// -------------------------------------------------------------------
/** Triangulates the given mesh.
* @param pMesh The mesh to triangulate.

View File

@@ -48,7 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
#include <assimp/material.h>
#include "BaseProcess.h"
#include "Common/BaseProcess.h"
struct aiBone;
struct aiMesh;