mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-25 15:19:30 +00:00
update assimp lib
This commit is contained in:
parent
03a348deb7
commit
d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -82,8 +82,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// this is intended as stress test - by default, entities are evaluated
|
||||
// lazily and therefore not unless needed.
|
||||
|
||||
//#define ASSIMP_IFC_TEST
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
// ********************************************************************************
|
||||
|
|
@ -121,7 +119,7 @@ namespace STEP {
|
|||
|
||||
// -------------------------------------------------------------------------------
|
||||
/** Exception class used by the STEP loading & parsing code. It is typically
|
||||
* coupled with a line number.
|
||||
* coupled with a line number.
|
||||
*/
|
||||
// -------------------------------------------------------------------------------
|
||||
struct SyntaxError : DeadlyImportError {
|
||||
|
|
@ -195,42 +193,34 @@ public:
|
|||
template <typename T>
|
||||
const T *ResolveSelectPtr(const DB &db) const {
|
||||
const EXPRESS::ENTITY *e = ToPtr<EXPRESS::ENTITY>();
|
||||
return e ? Couple<T>(db).MustGetObject(*e)->template ToPtr<T>() : (const T *)0;
|
||||
return e ? Couple<T>(db).MustGetObject(*e)->template ToPtr<T>() : (const T *)nullptr;
|
||||
}
|
||||
|
||||
public:
|
||||
/** parse a variable from a string and set 'inout' to the character
|
||||
* behind the last consumed character. An optional schema enables,
|
||||
* if specified, automatic conversion of custom data types.
|
||||
*
|
||||
* @throw SyntaxError
|
||||
*/
|
||||
static std::shared_ptr<const EXPRESS::DataType> Parse(const char *&inout,
|
||||
uint64_t line = SyntaxError::LINE_NOT_SPECIFIED,
|
||||
const EXPRESS::ConversionSchema *schema = NULL);
|
||||
/// @brief Parse a variable from a string and set 'inout' to the character behind the last consumed character.
|
||||
///
|
||||
/// An optional schema enables, if specified, automatic conversion of custom data types.
|
||||
///
|
||||
/// @throw SyntaxError
|
||||
static std::shared_ptr<const EXPRESS::DataType> Parse(const char *&inout, const char *end,
|
||||
uint64_t line = SyntaxError::LINE_NOT_SPECIFIED, const EXPRESS::ConversionSchema *schema = nullptr);
|
||||
};
|
||||
|
||||
typedef DataType SELECT;
|
||||
typedef DataType LOGICAL;
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
/** Sentinel class to represent explicitly unset (optional) fields ($) */
|
||||
/// Sentinel class to represent explicitly unset (optional) fields ($)
|
||||
// -------------------------------------------------------------------------------
|
||||
class UNSET : public DataType {
|
||||
public:
|
||||
private:
|
||||
};
|
||||
class UNSET : public DataType {};
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
/** Sentinel class to represent explicitly derived fields (*) */
|
||||
/// Sentinel class to represent explicitly derived fields (*)
|
||||
// -------------------------------------------------------------------------------
|
||||
class ISDERIVED : public DataType {
|
||||
public:
|
||||
private:
|
||||
};
|
||||
class ISDERIVED : public DataType {};
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
/** Shared implementation for some of the primitive data type, i.e. int, float
|
||||
/** Shared implementation for some of the primitive data type, i.e. int, float
|
||||
*/
|
||||
// -------------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
|
|
@ -278,7 +268,7 @@ public:
|
|||
typedef ENUMERATION BOOLEAN;
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
/** This is just a reference to an entity/object somewhere else
|
||||
/** This is just a reference to an entity/object somewhere else
|
||||
*/
|
||||
// -------------------------------------------------------------------------------
|
||||
class ENTITY : public PrimitiveDataType<uint64_t> {
|
||||
|
|
@ -302,11 +292,11 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
/** @see DaraType::Parse
|
||||
/** @see DaraType::Parse
|
||||
*/
|
||||
static std::shared_ptr<const EXPRESS::LIST> Parse(const char *&inout,
|
||||
static std::shared_ptr<const EXPRESS::LIST> Parse(const char *&inout, const char *end,
|
||||
uint64_t line = SyntaxError::LINE_NOT_SPECIFIED,
|
||||
const EXPRESS::ConversionSchema *schema = NULL);
|
||||
const EXPRESS::ConversionSchema *schema = nullptr);
|
||||
|
||||
private:
|
||||
typedef std::vector<std::shared_ptr<const DataType>> MemberList;
|
||||
|
|
@ -322,7 +312,7 @@ public:
|
|||
// -------------------------------------------------------------------------------
|
||||
/* Not exactly a full EXPRESS schema but rather a list of conversion functions
|
||||
* to extract valid C++ objects out of a STEP file. Those conversion functions
|
||||
* may, however, perform further schema validations.
|
||||
* may, however, perform further schema validations.
|
||||
*/
|
||||
// -------------------------------------------------------------------------------
|
||||
class ConversionSchema {
|
||||
|
|
@ -384,7 +374,7 @@ struct HeaderInfo {
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Base class for all concrete object instances
|
||||
/** Base class for all concrete object instances
|
||||
*/
|
||||
// ------------------------------------------------------------------------------
|
||||
class Object {
|
||||
|
|
@ -511,7 +501,7 @@ private:
|
|||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** A LazyObject is created when needed. Before this happens, we just keep
|
||||
* the text line that contains the object definition.
|
||||
* the text line that contains the object definition.
|
||||
*/
|
||||
// -------------------------------------------------------------------------------
|
||||
class LazyObject {
|
||||
|
|
@ -539,6 +529,7 @@ public:
|
|||
|
||||
template <typename T>
|
||||
const T &To() const {
|
||||
|
||||
return dynamic_cast<const T &>(**this);
|
||||
}
|
||||
|
||||
|
|
@ -589,12 +580,12 @@ private:
|
|||
};
|
||||
|
||||
template <typename T>
|
||||
inline bool operator==(const std::shared_ptr<LazyObject> &lo, T whatever) {
|
||||
inline bool operator == (const std::shared_ptr<LazyObject> &lo, T whatever) {
|
||||
return *lo == whatever; // XXX use std::forward if we have 0x
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool operator==(const std::pair<uint64_t, std::shared_ptr<LazyObject>> &lo, T whatever) {
|
||||
inline bool operator == (const std::pair<uint64_t, std::shared_ptr<LazyObject>> &lo, T whatever) {
|
||||
return *(lo.second) == whatever; // XXX use std::forward if we have 0x
|
||||
}
|
||||
|
||||
|
|
@ -607,18 +598,30 @@ struct Lazy {
|
|||
Lazy(const LazyObject *obj = nullptr) : obj(obj) {}
|
||||
|
||||
operator const T *() const {
|
||||
if (obj == nullptr) {
|
||||
throw TypeError("Obj type is nullptr.");
|
||||
}
|
||||
return obj->ToPtr<T>();
|
||||
}
|
||||
|
||||
operator const T &() const {
|
||||
if (obj == nullptr) {
|
||||
throw TypeError("Obj type is nullptr.");
|
||||
}
|
||||
return obj->To<T>();
|
||||
}
|
||||
|
||||
const T &operator*() const {
|
||||
if (obj == nullptr) {
|
||||
throw TypeError("Obj type is nullptr.");
|
||||
}
|
||||
return obj->To<T>();
|
||||
}
|
||||
|
||||
const T *operator->() const {
|
||||
if (obj == nullptr) {
|
||||
throw TypeError("Obj type is nullptr.");
|
||||
}
|
||||
return &obj->To<T>();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue