mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
|
||||
|
||||
#include "AssetLib/IFC/IFCUtil.h"
|
||||
#include "IFCUtil.h"
|
||||
#include "Common/PolyTools.h"
|
||||
#include "PostProcessing/ProcessHelper.h"
|
||||
|
||||
|
|
@ -669,7 +669,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPoly
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedAreaSolid *as,
|
||||
void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedAreaSolid *as,
|
||||
TempMesh &result,
|
||||
const TempMesh &first_operand,
|
||||
ConversionData &conv) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -102,10 +102,10 @@ class Circle : public Conic {
|
|||
public:
|
||||
// --------------------------------------------------
|
||||
Circle(const Schema_2x3::IfcCircle& entity, ConversionData& conv) : Conic(entity,conv) , entity(entity) {}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
~Circle() override = default;
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
IfcVector3 Eval(IfcFloat u) const override {
|
||||
u = -conv.angle_scale * u;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
@ -127,7 +127,7 @@ void ProcessPolygonBoundaries(TempMesh& result, const TempMesh& inmesh, size_t m
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (outer_polygon_it == end) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ void ProcessRevolvedAreaSolid(const Schema_2x3::IfcRevolvedAreaSolid& solid, Tem
|
|||
return;
|
||||
}
|
||||
|
||||
const unsigned int cnt_segments =
|
||||
const unsigned int cnt_segments =
|
||||
std::max(2u,static_cast<unsigned int>(conv.settings.cylindricalTessellation * std::fabs(max_angle)/AI_MATH_HALF_PI_F));
|
||||
const IfcFloat delta = max_angle/cnt_segments;
|
||||
|
||||
|
|
@ -294,8 +294,8 @@ void ProcessRevolvedAreaSolid(const Schema_2x3::IfcRevolvedAreaSolid& solid, Tem
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessSweptDiskSolid(const Schema_2x3::IfcSweptDiskSolid &solid,
|
||||
TempMesh& result,
|
||||
void ProcessSweptDiskSolid(const Schema_2x3::IfcSweptDiskSolid &solid,
|
||||
TempMesh& result,
|
||||
ConversionData& conv) {
|
||||
const Curve* const curve = Curve::Convert(*solid.Directrix, conv);
|
||||
if(!curve) {
|
||||
|
|
@ -687,9 +687,9 @@ void ProcessExtrudedArea(const Schema_2x3::IfcExtrudedAreaSolid& solid, const Te
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessExtrudedAreaSolid(const Schema_2x3::IfcExtrudedAreaSolid& solid,
|
||||
void ProcessExtrudedAreaSolid(const Schema_2x3::IfcExtrudedAreaSolid& solid,
|
||||
TempMesh& result,
|
||||
ConversionData& conv,
|
||||
ConversionData& conv,
|
||||
bool collect_openings) {
|
||||
TempMesh meshout;
|
||||
|
||||
|
|
@ -728,7 +728,7 @@ void ProcessExtrudedAreaSolid(const Schema_2x3::IfcExtrudedAreaSolid& solid,
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept,
|
||||
void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept,
|
||||
TempMesh& meshout,
|
||||
ConversionData& conv) {
|
||||
if(const Schema_2x3::IfcExtrudedAreaSolid* const solid = swept.ToPtr<Schema_2x3::IfcExtrudedAreaSolid>()) {
|
||||
|
|
@ -741,8 +741,8 @@ void ProcessSweptAreaSolid(const Schema_2x3::IfcSweptAreaSolid& swept,
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo,
|
||||
unsigned int matid,
|
||||
bool ProcessGeometricItem(const Schema_2x3::IfcRepresentationItem& geo,
|
||||
unsigned int matid,
|
||||
std::set<unsigned int>& mesh_indices,
|
||||
ConversionData& conv) {
|
||||
bool fix_orientation = false;
|
||||
|
|
@ -841,7 +841,7 @@ void AssignAddedMeshes(std::set<unsigned int>& mesh_indices,aiNode* nd, Conversi
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool TryQueryMeshCache(const Schema_2x3::IfcRepresentationItem& item,
|
||||
std::set<unsigned int>& mesh_indices,
|
||||
std::set<unsigned int>& mesh_indices,
|
||||
unsigned int mat_index,
|
||||
ConversionData& conv) {
|
||||
ConversionData::MeshCacheIndex idx(&item, mat_index);
|
||||
|
|
@ -855,7 +855,7 @@ bool TryQueryMeshCache(const Schema_2x3::IfcRepresentationItem& item,
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void PopulateMeshCache(const Schema_2x3::IfcRepresentationItem& item,
|
||||
const std::set<unsigned int>& mesh_indices,
|
||||
const std::set<unsigned int>& mesh_indices,
|
||||
unsigned int mat_index,
|
||||
ConversionData& conv) {
|
||||
ConversionData::MeshCacheIndex idx(&item, mat_index);
|
||||
|
|
@ -863,7 +863,7 @@ void PopulateMeshCache(const Schema_2x3::IfcRepresentationItem& item,
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool ProcessRepresentationItem(const Schema_2x3::IfcRepresentationItem& item,
|
||||
bool ProcessRepresentationItem(const Schema_2x3::IfcRepresentationItem& item,
|
||||
unsigned int matid,
|
||||
std::set<unsigned int>& mesh_indices,
|
||||
ConversionData& conv) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -245,11 +245,11 @@ void IFCImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
|||
|
||||
// tell the reader for which types we need to simulate STEPs reverse indices
|
||||
static const char *const inverse_indices_to_track[] = {
|
||||
"ifcrelcontainedinspatialstructure",
|
||||
"ifcrelaggregates",
|
||||
"ifcrelvoidselement",
|
||||
"ifcreldefinesbyproperties",
|
||||
"ifcpropertyset",
|
||||
"ifcrelcontainedinspatialstructure",
|
||||
"ifcrelaggregates",
|
||||
"ifcrelvoidselement",
|
||||
"ifcreldefinesbyproperties",
|
||||
"ifcpropertyset",
|
||||
"ifcstyleditem"
|
||||
};
|
||||
|
||||
|
|
@ -260,8 +260,6 @@ void IFCImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
|
|||
ThrowException("missing IfcProject entity");
|
||||
}
|
||||
|
||||
|
||||
|
||||
ConversionData conv(*db, proj->To<Schema_2x3::IfcProject>(), pScene, settings);
|
||||
SetUnits(conv);
|
||||
SetCoordinateSpace(conv);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
@ -69,7 +69,7 @@ AI_FORCE_INLINE ulong64 to_int64(IfcFloat p) {
|
|||
|
||||
AI_FORCE_INLINE IfcFloat from_int64(ulong64 p) {
|
||||
return (static_cast<IfcFloat>((p)) / max_ulong64);
|
||||
}
|
||||
}
|
||||
|
||||
AI_FORCE_INLINE void fillRectangle(const IfcVector2& pmin, const IfcVector2& pmax, std::vector<IfcVector2>& out) {
|
||||
out.emplace_back(pmin.x, pmin.y);
|
||||
|
|
@ -176,7 +176,7 @@ struct ProjectedWindowContour {
|
|||
SkipList skiplist;
|
||||
bool is_rectangular;
|
||||
|
||||
ProjectedWindowContour(const Contour& contour, const BoundingBox& bb, bool is_rectangular)
|
||||
ProjectedWindowContour(const Contour& contour, const BoundingBox& bb, bool is_rectangular)
|
||||
: contour(contour), bb(bb) , is_rectangular(is_rectangular) {}
|
||||
|
||||
~ProjectedWindowContour() = default;
|
||||
|
|
@ -215,7 +215,7 @@ static bool IsDuplicateVertex(const IfcVector2& vv, const std::vector<IfcVector2
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ExtractVerticesFromClipper(const ClipperLib::Path& poly, std::vector<IfcVector2>& temp_contour,
|
||||
void ExtractVerticesFromClipper(const ClipperLib::Path& poly, std::vector<IfcVector2>& temp_contour,
|
||||
bool filter_duplicates = false) {
|
||||
temp_contour.clear();
|
||||
for(const ClipperLib::IntPoint& point : poly) {
|
||||
|
|
@ -362,7 +362,7 @@ void InsertWindowContours(const ContourVector& contours, const std::vector<TempO
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void MergeWindowContours (const std::vector<IfcVector2>& a, const std::vector<IfcVector2>& b,
|
||||
void MergeWindowContours (const std::vector<IfcVector2>& a, const std::vector<IfcVector2>& b,
|
||||
ClipperLib::Paths& out) {
|
||||
out.clear();
|
||||
|
||||
|
|
@ -988,16 +988,16 @@ void Quadrify(const ContourVector& contours, TempMesh& curmesh) {
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour,
|
||||
IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour,
|
||||
const TempMesh& in_mesh,
|
||||
bool &ok,
|
||||
bool &ok,
|
||||
IfcVector3& nor_out) {
|
||||
const std::vector<IfcVector3>& in_verts = in_mesh.mVerts;
|
||||
if (in_verts.empty()){
|
||||
ok = false;
|
||||
return IfcMatrix4();
|
||||
}
|
||||
|
||||
|
||||
ok = true;
|
||||
IfcMatrix4 m = IfcMatrix4(DerivePlaneCoordinateSpace(in_mesh, ok, nor_out));
|
||||
if(!ok) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -50,8 +50,8 @@ namespace Assimp {
|
|||
namespace IFC {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessPolyLine(const Schema_2x3::IfcPolyline& def,
|
||||
TempMesh& meshout,
|
||||
void ProcessPolyLine(const Schema_2x3::IfcPolyline& def,
|
||||
TempMesh& meshout,
|
||||
ConversionData& /*conv*/) {
|
||||
// this won't produce a valid mesh, it just spits out a list of vertices
|
||||
IfcVector3 t;
|
||||
|
|
@ -63,8 +63,8 @@ void ProcessPolyLine(const Schema_2x3::IfcPolyline& def,
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool ProcessCurve(const Schema_2x3::IfcCurve& curve,
|
||||
TempMesh& meshout,
|
||||
bool ProcessCurve(const Schema_2x3::IfcCurve& curve,
|
||||
TempMesh& meshout,
|
||||
ConversionData& conv) {
|
||||
std::unique_ptr<const Curve> cv(Curve::Convert(curve,conv));
|
||||
if (!cv) {
|
||||
|
|
@ -90,22 +90,22 @@ bool ProcessCurve(const Schema_2x3::IfcCurve& curve,
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessClosedProfile(const Schema_2x3::IfcArbitraryClosedProfileDef& def,
|
||||
TempMesh& meshout,
|
||||
void ProcessClosedProfile(const Schema_2x3::IfcArbitraryClosedProfileDef& def,
|
||||
TempMesh& meshout,
|
||||
ConversionData& conv) {
|
||||
ProcessCurve(def.OuterCurve,meshout,conv);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessOpenProfile(const Schema_2x3::IfcArbitraryOpenProfileDef& def,
|
||||
TempMesh& meshout,
|
||||
void ProcessOpenProfile(const Schema_2x3::IfcArbitraryOpenProfileDef& def,
|
||||
TempMesh& meshout,
|
||||
ConversionData& conv) {
|
||||
ProcessCurve(def.Curve,meshout,conv);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ProcessParametrizedProfile(const Schema_2x3::IfcParameterizedProfileDef& def,
|
||||
TempMesh& meshout,
|
||||
void ProcessParametrizedProfile(const Schema_2x3::IfcParameterizedProfileDef& def,
|
||||
TempMesh& meshout,
|
||||
ConversionData& conv) {
|
||||
if(const Schema_2x3::IfcRectangleProfileDef* const cprofile = def.ToPtr<Schema_2x3::IfcRectangleProfileDef>()) {
|
||||
const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
|
||||
|
||||
#include "AssetLib/IFC/IFCUtil.h"
|
||||
#include "IFCUtil.h"
|
||||
#include "Common/PolyTools.h"
|
||||
#include "Geometry/GeometryUtils.h"
|
||||
#include "PostProcessing/ProcessHelper.h"
|
||||
|
|
@ -375,7 +375,7 @@ void TempMesh::RemoveAdjacentDuplicates() {
|
|||
ArrayBounds(&*base, cnt ,vmin,vmax);
|
||||
|
||||
const IfcFloat epsilon = (vmax-vmin).SquareLength() / static_cast<IfcFloat>(1e9);
|
||||
|
||||
|
||||
// drop any identical, adjacent vertices. this pass will collect the dropouts
|
||||
// of the previous pass as a side-effect.
|
||||
FuzzyVectorCompare fz(epsilon);
|
||||
|
|
@ -461,7 +461,7 @@ void ConvertColor(aiColor4D& out, const Schema_2x3::IfcColourRgb& in) {
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ConvertColor(aiColor4D& out,
|
||||
void ConvertColor(aiColor4D& out,
|
||||
const Schema_2x3::IfcColourOrFactor& in,
|
||||
ConversionData& conv,
|
||||
const aiColor4D* base) {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -47,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef INCLUDED_IFCUTIL_H
|
||||
#define INCLUDED_IFCUTIL_H
|
||||
|
||||
#include "AssetLib/IFC/IFCReaderGen_2x3.h"
|
||||
#include "AssetLib/IFC/IFCLoader.h"
|
||||
#include "IFCReaderGen_2x3.h"
|
||||
#include "IFCLoader.h"
|
||||
#include "AssetLib/Step/STEPFile.h"
|
||||
|
||||
#include <assimp/mesh.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue