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.
@ -39,15 +39,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
/** @file IFCProfile.cpp
* @brief Read profile and curves entities from IFC files
*/
/// @file IFCProfile.cpp
/// @brief Read profile and curves entities from IFC files
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
#include "IFCUtil.h"
namespace Assimp {
namespace IFC {
namespace {
// --------------------------------------------------------------------------------
@ -56,8 +56,7 @@ namespace {
class Conic : public Curve {
public:
// --------------------------------------------------
Conic(const Schema_2x3::IfcConic& entity, ConversionData& conv)
: Curve(entity,conv) {
Conic(const Schema_2x3::IfcConic& entity, ConversionData& conv) : Curve(entity,conv) {
IfcMatrix4 trafo;
ConvertAxisPlacement(trafo,*entity.Position,conv);
@ -69,12 +68,12 @@ public:
}
// --------------------------------------------------
bool IsClosed() const {
bool IsClosed() const override {
return true;
}
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const override {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
@ -88,7 +87,7 @@ public:
}
// --------------------------------------------------
ParamRange GetParametricRange() const {
ParamRange GetParametricRange() const override {
return std::make_pair(static_cast<IfcFloat>( 0. ), static_cast<IfcFloat>( AI_MATH_TWO_PI / conv.angle_scale ));
}
@ -102,14 +101,13 @@ protected:
class Circle : public Conic {
public:
// --------------------------------------------------
Circle(const Schema_2x3::IfcCircle& entity, ConversionData& conv)
: Conic(entity,conv)
, entity(entity)
{
}
Circle(const Schema_2x3::IfcCircle& entity, ConversionData& conv) : Conic(entity,conv) , entity(entity) {}
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
~Circle() override = default;
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const override {
u = -conv.angle_scale * u;
return location + static_cast<IfcFloat>(entity.Radius)*(static_cast<IfcFloat>(std::cos(u))*p[0] +
static_cast<IfcFloat>(std::sin(u))*p[1]);
@ -132,7 +130,7 @@ public:
}
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
IfcVector3 Eval(IfcFloat u) const override {
u = -conv.angle_scale * u;
return location + static_cast<IfcFloat>(entity.SemiAxis1)*static_cast<IfcFloat>(std::cos(u))*p[0] +
static_cast<IfcFloat>(entity.SemiAxis2)*static_cast<IfcFloat>(std::sin(u))*p[1];
@ -155,17 +153,17 @@ public:
}
// --------------------------------------------------
bool IsClosed() const {
bool IsClosed() const override {
return false;
}
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
IfcVector3 Eval(IfcFloat u) const override {
return p + u*v;
}
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const override {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
// two points are always sufficient for a line segment
@ -174,7 +172,7 @@ public:
// --------------------------------------------------
void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const override {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
@ -188,7 +186,7 @@ public:
}
// --------------------------------------------------
ParamRange GetParametricRange() const {
ParamRange GetParametricRange() const override {
const IfcFloat inf = std::numeric_limits<IfcFloat>::infinity();
return std::make_pair(-inf,+inf);
@ -234,7 +232,7 @@ public:
}
// --------------------------------------------------
IfcVector3 Eval(IfcFloat u) const {
IfcVector3 Eval(IfcFloat u) const override {
if (curves.empty()) {
return IfcVector3();
}
@ -254,7 +252,7 @@ public:
}
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const override {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
size_t cnt = 0;
@ -275,7 +273,7 @@ public:
}
// --------------------------------------------------
void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const {
void SampleDiscrete(TempMesh& out,IfcFloat a, IfcFloat b) const override {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
@ -293,7 +291,7 @@ public:
}
// --------------------------------------------------
ParamRange GetParametricRange() const {
ParamRange GetParametricRange() const override {
return std::make_pair(static_cast<IfcFloat>( 0. ),total);
}
@ -373,27 +371,27 @@ public:
}
// --------------------------------------------------
IfcVector3 Eval(IfcFloat p) const {
IfcVector3 Eval(IfcFloat p) const override {
ai_assert(InRange(p));
return base->Eval( TrimParam(p) );
}
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const override {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
return base->EstimateSampleCount(TrimParam(a),TrimParam(b));
}
// --------------------------------------------------
void SampleDiscrete(TempMesh& out,IfcFloat a,IfcFloat b) const {
void SampleDiscrete(TempMesh& out,IfcFloat a,IfcFloat b) const override {
ai_assert(InRange(a));
ai_assert(InRange(b));
return base->SampleDiscrete(out,TrimParam(a),TrimParam(b));
}
// --------------------------------------------------
ParamRange GetParametricRange() const {
ParamRange GetParametricRange() const override {
return std::make_pair(static_cast<IfcFloat>( 0. ),maxval);
}
@ -431,7 +429,7 @@ public:
}
// --------------------------------------------------
IfcVector3 Eval(IfcFloat p) const {
IfcVector3 Eval(IfcFloat p) const override {
ai_assert(InRange(p));
const size_t b = static_cast<size_t>(std::floor(p));
@ -444,14 +442,14 @@ public:
}
// --------------------------------------------------
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const {
size_t EstimateSampleCount(IfcFloat a, IfcFloat b) const override {
ai_assert(InRange(a));
ai_assert(InRange(b));
return static_cast<size_t>( std::ceil(b) - std::floor(a) );
}
// --------------------------------------------------
ParamRange GetParametricRange() const {
ParamRange GetParametricRange() const override {
return std::make_pair(static_cast<IfcFloat>( 0. ),static_cast<IfcFloat>(points.size()-1));
}
@ -516,7 +514,7 @@ size_t Curve::EstimateSampleCount(IfcFloat a, IfcFloat b) const {
ai_assert( InRange( a ) );
ai_assert( InRange( b ) );
// arbitrary default value, deriving classes should supply better suited values
// arbitrary default value, deriving classes should supply better-suited values
return 16;
}