update assimp lib

This commit is contained in:
marauder2k7 2024-12-09 20:22:47 +00:00
parent 03a348deb7
commit d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions

View file

@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.
@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_FBX_DOCUMENT_H
#include <numeric>
#include <unordered_set>
#include <stdint.h>
#include <assimp/mesh.h>
#include "FBXProperties.h"
@ -54,9 +55,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define _AI_CONCAT(a,b) a ## b
#define AI_CONCAT(a,b) _AI_CONCAT(a,b)
namespace Assimp {
namespace FBX {
// Use an 'illegal' default FOV value to detect if the FBX camera has set the FOV.
static const float kFovUnknown = -1.0f;
class Parser;
class Object;
struct ImportSettings;
@ -80,6 +86,10 @@ class BlendShape;
class Skin;
class Cluster;
#define new_LazyObject new (allocator.Allocate(sizeof(LazyObject))) LazyObject
#define new_Connection new (allocator.Allocate(sizeof(Connection))) Connection
#define delete_LazyObject(_p) (_p)->~LazyObject()
#define delete_Connection(_p) (_p)->~Connection()
/** Represents a delay-parsed FBX objects. Many objects in the scene
* are not needed by assimp, so it makes no sense to parse them
@ -168,7 +178,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
private:
@ -242,7 +252,7 @@ public:
fbx_simple_property(FilmAspectRatio, float, 1.0f)
fbx_simple_property(ApertureMode, int, 0)
fbx_simple_property(FieldOfView, float, 1.0f)
fbx_simple_property(FieldOfView, float, kFovUnknown)
fbx_simple_property(FocalLength, float, 1.0f)
};
@ -432,7 +442,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
/** Get material links */
@ -503,7 +513,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
// return a 4-tuple
@ -618,7 +628,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
const uint8_t* Content() const {
@ -632,7 +642,7 @@ public:
uint8_t* RelinquishContent() {
uint8_t* ptr = content;
content = 0;
content = nullptr;
return ptr;
}
@ -663,7 +673,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
const TextureMap& Textures() const {
@ -735,7 +745,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
@ -780,7 +790,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
/* the optional white list specifies a list of property names for which the caller
@ -808,7 +818,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
const AnimationLayerList& Layers() const {
@ -829,7 +839,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
private:
@ -855,14 +865,14 @@ public:
return fullWeights;
}
const std::vector<const ShapeGeometry*>& GetShapeGeometries() const {
const std::unordered_set<const ShapeGeometry*>& GetShapeGeometries() const {
return shapeGeometries;
}
private:
float percent;
WeightArray fullWeights;
std::vector<const ShapeGeometry*> shapeGeometries;
std::unordered_set<const ShapeGeometry*> shapeGeometries;
};
/** DOM class for BlendShape deformers */
@ -872,12 +882,12 @@ public:
virtual ~BlendShape();
const std::vector<const BlendShapeChannel*>& BlendShapeChannels() const {
const std::unordered_set<const BlendShapeChannel*>& BlendShapeChannels() const {
return blendShapeChannels;
}
private:
std::vector<const BlendShapeChannel*> blendShapeChannels;
std::unordered_set<const BlendShapeChannel*> blendShapeChannels;
};
/** DOM class for skin deformer clusters (aka sub-deformers) */
@ -1018,7 +1028,7 @@ public:
const PropertyTable& Props() const {
ai_assert(props.get());
return *props.get();
return *props;
}
const Document& GetDocument() const {
@ -1072,7 +1082,7 @@ private:
/** DOM root for a FBX file */
class Document {
public:
Document(const Parser& parser, const ImportSettings& settings);
Document(Parser& parser, const ImportSettings& settings);
~Document();
@ -1097,7 +1107,7 @@ public:
const FileGlobalSettings& GlobalSettings() const {
ai_assert(globals.get());
return *globals.get();
return *globals;
}
const PropertyTemplateMap& Templates() const {
@ -1156,7 +1166,7 @@ private:
const ImportSettings& settings;
ObjectMap objects;
const Parser& parser;
Parser& parser;
PropertyTemplateMap templates;
ConnectionMap src_connections;