Merge branch 'master' into patch-1

This commit is contained in:
Kim Kulling
2022-09-04 09:52:42 +02:00
committed by GitHub
129 changed files with 249 additions and 547 deletions

View File

@@ -48,15 +48,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
/// The default class constructor.
ArmaturePopulate::ArmaturePopulate() :
BaseProcess() {
// do nothing
}
ArmaturePopulate::ArmaturePopulate() = default;
/// The class destructor.
ArmaturePopulate::~ArmaturePopulate() {
// do nothing
}
ArmaturePopulate::~ArmaturePopulate() = default;
bool ArmaturePopulate::IsActive(unsigned int pFlags) const {
return (pFlags & aiProcess_PopulateArmatureData) != 0;

View File

@@ -62,9 +62,7 @@ CalcTangentsProcess::CalcTangentsProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
CalcTangentsProcess::~CalcTangentsProcess() {
// nothing to do here
}
CalcTangentsProcess::~CalcTangentsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -59,17 +59,11 @@ namespace {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
ComputeUVMappingProcess::ComputeUVMappingProcess()
{
// nothing to do here
}
ComputeUVMappingProcess::ComputeUVMappingProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
ComputeUVMappingProcess::~ComputeUVMappingProcess()
{
// nothing to do here
}
ComputeUVMappingProcess::~ComputeUVMappingProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -81,16 +81,11 @@ void flipUVs(aiMeshType *pMesh) {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
MakeLeftHandedProcess::MakeLeftHandedProcess() :
BaseProcess() {
// empty
}
MakeLeftHandedProcess::MakeLeftHandedProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
MakeLeftHandedProcess::~MakeLeftHandedProcess() {
// empty
}
MakeLeftHandedProcess::~MakeLeftHandedProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@@ -250,11 +245,11 @@ void MakeLeftHandedProcess::ProcessAnimation(aiNodeAnim *pAnim) {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FlipUVsProcess::FlipUVsProcess() {}
FlipUVsProcess::FlipUVsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FlipUVsProcess::~FlipUVsProcess() {}
FlipUVsProcess::~FlipUVsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@@ -312,11 +307,11 @@ void FlipUVsProcess::ProcessMesh(aiMesh *pMesh) {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FlipWindingOrderProcess::FlipWindingOrderProcess() {}
FlipWindingOrderProcess::FlipWindingOrderProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FlipWindingOrderProcess::~FlipWindingOrderProcess() {}
FlipWindingOrderProcess::~FlipWindingOrderProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -66,10 +66,7 @@ DeboneProcess::DeboneProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
DeboneProcess::~DeboneProcess()
{
// nothing to do here
}
DeboneProcess::~DeboneProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@@ -156,7 +153,7 @@ void DeboneProcess::Execute( aiScene* pScene)
}
else {
// Mesh is kept unchanged - store it's new place in the mesh array
mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(static_cast<unsigned int>(meshes.size()),(aiNode*)0));
mSubMeshIndices[a].emplace_back(static_cast<unsigned int>(meshes.size()), (aiNode *)0);
meshes.push_back(srcMesh);
}
}

View File

@@ -56,17 +56,11 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
DropFaceNormalsProcess::DropFaceNormalsProcess()
{
// nothing to do here
}
DropFaceNormalsProcess::DropFaceNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
DropFaceNormalsProcess::~DropFaceNormalsProcess()
{
// nothing to do here
}
DropFaceNormalsProcess::~DropFaceNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -49,14 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
EmbedTexturesProcess::EmbedTexturesProcess() :
BaseProcess() {
// empty
}
EmbedTexturesProcess::EmbedTexturesProcess() = default;
EmbedTexturesProcess::~EmbedTexturesProcess() {
// empty
}
EmbedTexturesProcess::~EmbedTexturesProcess() = default;
bool EmbedTexturesProcess::IsActive(unsigned int pFlags) const {
return (pFlags & aiProcess_EmbedTextures) != 0;

View File

@@ -65,9 +65,7 @@ FindDegeneratesProcess::FindDegeneratesProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FindDegeneratesProcess::~FindDegeneratesProcess() {
// nothing to do here
}
FindDegeneratesProcess::~FindDegeneratesProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -60,8 +60,7 @@ FindInstancesProcess::FindInstancesProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FindInstancesProcess::~FindInstancesProcess()
{}
FindInstancesProcess::~FindInstancesProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -62,9 +62,7 @@ FindInvalidDataProcess::FindInvalidDataProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FindInvalidDataProcess::~FindInvalidDataProcess() {
// nothing to do here
}
FindInvalidDataProcess::~FindInvalidDataProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -59,17 +59,11 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FixInfacingNormalsProcess::FixInfacingNormalsProcess()
{
// nothing to do here
}
FixInfacingNormalsProcess::FixInfacingNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
FixInfacingNormalsProcess::~FixInfacingNormalsProcess()
{
// nothing to do here
}
FixInfacingNormalsProcess::~FixInfacingNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -48,14 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
GenBoundingBoxesProcess::GenBoundingBoxesProcess()
: BaseProcess() {
GenBoundingBoxesProcess::GenBoundingBoxesProcess() = default;
}
GenBoundingBoxesProcess::~GenBoundingBoxesProcess() {
// empty
}
GenBoundingBoxesProcess::~GenBoundingBoxesProcess() = default;
bool GenBoundingBoxesProcess::IsActive(unsigned int pFlags) const {
return 0 != ( pFlags & aiProcess_GenBoundingBoxes );

View File

@@ -56,15 +56,11 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
GenFaceNormalsProcess::GenFaceNormalsProcess() {
// nothing to do here
}
GenFaceNormalsProcess::GenFaceNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
GenFaceNormalsProcess::~GenFaceNormalsProcess() {
// nothing to do here
}
GenFaceNormalsProcess::~GenFaceNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -62,9 +62,7 @@ GenVertexNormalsProcess::GenVertexNormalsProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
GenVertexNormalsProcess::~GenVertexNormalsProcess() {
// nothing to do here
}
GenVertexNormalsProcess::~GenVertexNormalsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -70,9 +70,7 @@ ImproveCacheLocalityProcess::ImproveCacheLocalityProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
ImproveCacheLocalityProcess::~ImproveCacheLocalityProcess() {
// nothing to do here
}
ImproveCacheLocalityProcess::~ImproveCacheLocalityProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -57,15 +57,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
JoinVerticesProcess::JoinVerticesProcess() {
// nothing to do here
}
JoinVerticesProcess::JoinVerticesProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
JoinVerticesProcess::~JoinVerticesProcess() {
// nothing to do here
}
JoinVerticesProcess::~JoinVerticesProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -62,10 +62,7 @@ LimitBoneWeightsProcess::LimitBoneWeightsProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
LimitBoneWeightsProcess::~LimitBoneWeightsProcess()
{
// nothing to do here
}
LimitBoneWeightsProcess::~LimitBoneWeightsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -50,13 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
MakeVerboseFormatProcess::MakeVerboseFormatProcess() {
// nothing to do here
}
MakeVerboseFormatProcess::MakeVerboseFormatProcess() = default;
// ------------------------------------------------------------------------------------------------
MakeVerboseFormatProcess::~MakeVerboseFormatProcess() {
// nothing to do here
}
MakeVerboseFormatProcess::~MakeVerboseFormatProcess() = default;
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
void MakeVerboseFormatProcess::Execute(aiScene *pScene) {

View File

@@ -80,9 +80,7 @@ OptimizeGraphProcess::OptimizeGraphProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
OptimizeGraphProcess::~OptimizeGraphProcess() {
// empty
}
OptimizeGraphProcess::~OptimizeGraphProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -71,9 +71,7 @@ OptimizeMeshesProcess::OptimizeMeshesProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
OptimizeMeshesProcess::~OptimizeMeshesProcess() {
// empty
}
OptimizeMeshesProcess::~OptimizeMeshesProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -70,9 +70,7 @@ PretransformVertices::PretransformVertices() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
PretransformVertices::~PretransformVertices() {
// nothing to do here
}
PretransformVertices::~PretransformVertices() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -208,7 +208,7 @@ VertexWeightTable *ComputeVertexBoneWeightTable(const aiMesh *pMesh) {
aiBone *bone = pMesh->mBones[i];
for (unsigned int a = 0; a < bone->mNumWeights; ++a) {
const aiVertexWeight &weight = bone->mWeights[a];
avPerVertexWeights[weight.mVertexId].push_back(std::pair<unsigned int, float>(i, weight.mWeight));
avPerVertexWeights[weight.mVertexId].emplace_back(i, weight.mWeight);
}
}
return avPerVertexWeights;

View File

@@ -64,10 +64,7 @@ RemoveRedundantMatsProcess::RemoveRedundantMatsProcess()
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
RemoveRedundantMatsProcess::~RemoveRedundantMatsProcess()
{
// nothing to do here
}
RemoveRedundantMatsProcess::~RemoveRedundantMatsProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -58,7 +58,7 @@ RemoveVCProcess::RemoveVCProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
RemoveVCProcess::~RemoveVCProcess() {}
RemoveVCProcess::~RemoveVCProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -52,9 +52,7 @@ ScaleProcess::ScaleProcess()
, mScale( AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT ) {
}
ScaleProcess::~ScaleProcess() {
// empty
}
ScaleProcess::~ScaleProcess() = default;
void ScaleProcess::setScale( ai_real scale ) {
mScale = scale;

View File

@@ -61,9 +61,7 @@ SortByPTypeProcess::SortByPTypeProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
SortByPTypeProcess::~SortByPTypeProcess() {
// nothing to do here
}
SortByPTypeProcess::~SortByPTypeProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@@ -311,7 +309,7 @@ void SortByPTypeProcess::Execute(aiScene *pScene) {
VertexWeightTable &tbl = avw[idx];
for (VertexWeightTable::const_iterator it = tbl.begin(), end = tbl.end();
it != end; ++it) {
tempBones[(*it).first].push_back(aiVertexWeight(outIdx, (*it).second));
tempBones[(*it).first].emplace_back(outIdx, (*it).second);
}
}

View File

@@ -67,10 +67,7 @@ SplitByBoneCountProcess::SplitByBoneCountProcess()
// ------------------------------------------------------------------------------------------------
// Destructor
SplitByBoneCountProcess::~SplitByBoneCountProcess()
{
// nothing to do here
}
SplitByBoneCountProcess::~SplitByBoneCountProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag.
@@ -176,7 +173,7 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
if (bone->mWeights[b].mWeight > 0.0f)
{
int vertexId = bone->mWeights[b].mVertexId;
vertexBones[vertexId].push_back( BoneWeight( a, bone->mWeights[b].mWeight));
vertexBones[vertexId].emplace_back(a, bone->mWeights[b].mWeight);
if (vertexBones[vertexId].size() > mMaxBoneCount)
{
throw DeadlyImportError("SplitByBoneCountProcess: Single face requires more bones than specified max bone count!");

View File

@@ -56,9 +56,7 @@ SplitLargeMeshesProcess_Triangle::SplitLargeMeshesProcess_Triangle() {
}
// ------------------------------------------------------------------------------------------------
SplitLargeMeshesProcess_Triangle::~SplitLargeMeshesProcess_Triangle() {
// nothing to do here
}
SplitLargeMeshesProcess_Triangle::~SplitLargeMeshesProcess_Triangle() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@@ -332,9 +330,7 @@ SplitLargeMeshesProcess_Vertex::SplitLargeMeshesProcess_Vertex() {
}
// ------------------------------------------------------------------------------------------------
SplitLargeMeshesProcess_Vertex::~SplitLargeMeshesProcess_Vertex() {
// nothing to do here
}
SplitLargeMeshesProcess_Vertex::~SplitLargeMeshesProcess_Vertex() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -64,10 +64,7 @@ TextureTransformStep::TextureTransformStep() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
TextureTransformStep::~TextureTransformStep()
{
// nothing to do here
}
TextureTransformStep::~TextureTransformStep() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.
@@ -437,7 +434,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
if (ref[n])
continue;
trafo.push_back(STransformVecInfo());
trafo.emplace_back();
trafo.back().uvIndex = n;
}

View File

@@ -159,17 +159,11 @@ namespace {
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
TriangulateProcess::TriangulateProcess()
{
// nothing to do here
}
TriangulateProcess::TriangulateProcess() = default;
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
TriangulateProcess::~TriangulateProcess()
{
// nothing to do here
}
TriangulateProcess::~TriangulateProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.

View File

@@ -65,7 +65,7 @@ ValidateDSProcess::ValidateDSProcess() :
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
ValidateDSProcess::~ValidateDSProcess() {}
ValidateDSProcess::~ValidateDSProcess() = default;
// ------------------------------------------------------------------------------------------------
// Returns whether the processing step is present in the given flag field.