mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 04:15:36 +00:00
Update Assimp from 5.2.3 to 5.2.5
This commit is contained in:
parent
ea7ca63301
commit
16f3710058
379 changed files with 14469 additions and 47175 deletions
|
|
@ -114,9 +114,9 @@ void QuadrifyPart(const IfcVector2& pmin, const IfcVector2& pmax, XYSortedField&
|
|||
if (!found) {
|
||||
// the rectangle [pmin,pend] is opaque, fill it
|
||||
out.push_back(pmin);
|
||||
out.push_back(IfcVector2(pmin.x,pmax.y));
|
||||
out.emplace_back(pmin.x,pmax.y);
|
||||
out.push_back(pmax);
|
||||
out.push_back(IfcVector2(pmax.x,pmin.y));
|
||||
out.emplace_back(pmax.x,pmin.y);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -126,9 +126,9 @@ void QuadrifyPart(const IfcVector2& pmin, const IfcVector2& pmax, XYSortedField&
|
|||
// see if there's an offset to fill at the top of our quad
|
||||
if (xs - pmin.x) {
|
||||
out.push_back(pmin);
|
||||
out.push_back(IfcVector2(pmin.x,pmax.y));
|
||||
out.push_back(IfcVector2(xs,pmax.y));
|
||||
out.push_back(IfcVector2(xs,pmin.y));
|
||||
out.emplace_back(pmin.x,pmax.y);
|
||||
out.emplace_back(xs,pmax.y);
|
||||
out.emplace_back(xs,pmin.y);
|
||||
}
|
||||
|
||||
// search along the y-axis for all openings that overlap xs and our quad
|
||||
|
|
@ -159,10 +159,10 @@ void QuadrifyPart(const IfcVector2& pmin, const IfcVector2& pmax, XYSortedField&
|
|||
}
|
||||
if (!found) {
|
||||
// the rectangle [pmin,pend] is opaque, fill it
|
||||
out.push_back(IfcVector2(xs,pmin.y));
|
||||
out.push_back(IfcVector2(xs,pmax.y));
|
||||
out.push_back(IfcVector2(xe,pmax.y));
|
||||
out.push_back(IfcVector2(xe,pmin.y));
|
||||
out.emplace_back(xs,pmin.y);
|
||||
out.emplace_back(xs,pmax.y);
|
||||
out.emplace_back(xe,pmax.y);
|
||||
out.emplace_back(xe,pmin.y);
|
||||
return;
|
||||
}
|
||||
if (ylast < pmax.y) {
|
||||
|
|
@ -342,7 +342,7 @@ void InsertWindowContours(const ContourVector& contours,
|
|||
if ((contour[a] - edge).SquareLength() > diag*diag*0.7) {
|
||||
continue;
|
||||
}
|
||||
curmesh.mVerts.push_back(IfcVector3(contour[a].x, contour[a].y, 0.0f));
|
||||
curmesh.mVerts.emplace_back(contour[a].x, contour[a].y, 0.0f);
|
||||
}
|
||||
|
||||
if (edge != contour[last_hit]) {
|
||||
|
|
@ -363,7 +363,7 @@ void InsertWindowContours(const ContourVector& contours,
|
|||
corner.y = bb.second.y;
|
||||
}
|
||||
|
||||
curmesh.mVerts.push_back(IfcVector3(corner.x, corner.y, 0.0f));
|
||||
curmesh.mVerts.emplace_back(corner.x, corner.y, 0.0f);
|
||||
}
|
||||
else if (cnt == 1) {
|
||||
// avoid degenerate polygons (also known as lines or points)
|
||||
|
|
@ -399,7 +399,7 @@ void MergeWindowContours (const std::vector<IfcVector2>& a,
|
|||
ClipperLib::Polygon clip;
|
||||
|
||||
for(const IfcVector2& pip : a) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
|
|
@ -410,7 +410,7 @@ void MergeWindowContours (const std::vector<IfcVector2>& a,
|
|||
clip.clear();
|
||||
|
||||
for(const IfcVector2& pip : b) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
|
|
@ -433,7 +433,7 @@ void MakeDisjunctWindowContours (const std::vector<IfcVector2>& a,
|
|||
ClipperLib::Polygon clip;
|
||||
|
||||
for(const IfcVector2& pip : a) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
|
|
@ -444,7 +444,7 @@ void MakeDisjunctWindowContours (const std::vector<IfcVector2>& a,
|
|||
clip.clear();
|
||||
|
||||
for(const IfcVector2& pip : b) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
|
|
@ -466,7 +466,7 @@ void CleanupWindowContour(ProjectedWindowContour& window)
|
|||
ClipperLib::ExPolygons clipped;
|
||||
|
||||
for(const IfcVector2& pip : contour) {
|
||||
subject.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
subject.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
clipper.AddPolygon(subject,ClipperLib::ptSubject);
|
||||
|
|
@ -524,7 +524,7 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
|
|||
ClipperLib::Polygon clip;
|
||||
clip.reserve(contour_flat.size());
|
||||
for(const IfcVector2& pip : contour_flat) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (!ClipperLib::Orientation(clip)) {
|
||||
|
|
@ -544,7 +544,7 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
|
|||
continue;
|
||||
}
|
||||
}
|
||||
subject.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
subject.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
if (--countdown == 0) {
|
||||
if (!ClipperLib::Orientation(subject)) {
|
||||
std::reverse(subject.begin(), subject.end());
|
||||
|
|
@ -558,10 +558,10 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
|
|||
for(const ClipperLib::ExPolygon& ex : clipped) {
|
||||
iold.push_back(static_cast<unsigned int>(ex.outer.size()));
|
||||
for(const ClipperLib::IntPoint& point : ex.outer) {
|
||||
vold.push_back(IfcVector3(
|
||||
vold.emplace_back(
|
||||
from_int64(point.X),
|
||||
from_int64(point.Y),
|
||||
0.0f));
|
||||
0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1039,7 +1039,7 @@ void Quadrify(const std::vector< BoundingBox >& bbs, TempMesh& curmesh)
|
|||
curmesh.mVertcnt.resize(quads.size()/4,4);
|
||||
curmesh.mVerts.reserve(quads.size());
|
||||
for(const IfcVector2& v2 : quads) {
|
||||
curmesh.mVerts.push_back(IfcVector3(v2.x, v2.y, static_cast<IfcFloat>(0.0)));
|
||||
curmesh.mVerts.emplace_back(v2.x, v2.y, static_cast<IfcFloat>(0.0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1095,7 +1095,7 @@ IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour, const TempMesh
|
|||
vmin = std::min(vv, vmin);
|
||||
vmax = std::max(vv, vmax);
|
||||
|
||||
out_contour.push_back(IfcVector2(vv.x,vv.y));
|
||||
out_contour.emplace_back(vv.x,vv.y);
|
||||
}
|
||||
|
||||
zcoord /= in_verts.size();
|
||||
|
|
@ -1128,7 +1128,7 @@ IfcMatrix4 ProjectOntoPlane(std::vector<IfcVector2>& out_contour, const TempMesh
|
|||
for(const IfcVector3& x : in_verts) {
|
||||
const IfcVector3& vv = m * x;
|
||||
|
||||
out_contour2.push_back(IfcVector2(vv.x,vv.y));
|
||||
out_contour2.emplace_back(vv.x,vv.y);
|
||||
ai_assert(std::fabs(vv.z) < vmax.z + 1e-8);
|
||||
}
|
||||
|
||||
|
|
@ -1378,12 +1378,12 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
|||
|
||||
if(!temp_contour.empty()) {
|
||||
if (generate_connection_geometry) {
|
||||
contours_to_openings.push_back(std::vector<TempOpening*>(
|
||||
joined_openings.begin(),
|
||||
joined_openings.end()));
|
||||
contours_to_openings.emplace_back(
|
||||
joined_openings.begin(),
|
||||
joined_openings.end());
|
||||
}
|
||||
|
||||
contours.push_back(ProjectedWindowContour(temp_contour, bb, is_rectangle));
|
||||
contours.emplace_back(temp_contour, bb, is_rectangle);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1428,7 +1428,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
|||
return true;
|
||||
}
|
||||
|
||||
std::vector<IfcVector2> GetContourInPlane2D(std::shared_ptr<TempMesh> mesh,IfcMatrix3 planeSpace,
|
||||
std::vector<IfcVector2> GetContourInPlane2D(const std::shared_ptr<TempMesh>& mesh,IfcMatrix3 planeSpace,
|
||||
IfcVector3 planeNor,IfcFloat planeOffset,
|
||||
IfcVector3 extrusionDir,IfcVector3& wall_extrusion,bool& first,bool& ok) {
|
||||
std::vector<IfcVector2> contour;
|
||||
|
|
@ -1469,14 +1469,14 @@ std::vector<IfcVector2> GetContourInPlane2D(std::shared_ptr<TempMesh> mesh,IfcMa
|
|||
|
||||
// XXX should not be necessary - but it is. Why? For precision reasons?
|
||||
vv = is_extruded_side ? vv_extr : vv;
|
||||
contour.push_back(IfcVector2(vv.x,vv.y));
|
||||
contour.emplace_back(vv.x,vv.y);
|
||||
}
|
||||
ok = true;
|
||||
|
||||
return contour;
|
||||
}
|
||||
|
||||
const float close{ ai_epsilon };
|
||||
const ai_real close{ ai_epsilon };
|
||||
|
||||
static bool isClose(IfcVector2 first,IfcVector2 second) {
|
||||
auto diff = (second - first);
|
||||
|
|
@ -1491,7 +1491,7 @@ static void logSegment(std::pair<IfcVector2,IfcVector2> segment) {
|
|||
IFCImporter::LogInfo(msg2.str().c_str());
|
||||
}
|
||||
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(std::shared_ptr<TempMesh> mesh,IfcMatrix3 planeSpace,
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(const std::shared_ptr<TempMesh>& mesh,IfcMatrix3 planeSpace,
|
||||
IfcFloat planeOffset) {
|
||||
|
||||
{
|
||||
|
|
@ -1676,7 +1676,7 @@ std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(std::shared_ptr<TempMe
|
|||
std::stringstream msg;
|
||||
msg << "GetContoursInPlane3D: found " << contours.size() << " contours:\n";
|
||||
|
||||
for(auto c : contours) {
|
||||
for(const auto& c : contours) {
|
||||
msg << " Contour: \n";
|
||||
for(auto p : c) {
|
||||
msg << " " << p.x << " " << p.y << " \n";
|
||||
|
|
@ -1690,7 +1690,7 @@ std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(std::shared_ptr<TempMe
|
|||
return contours;
|
||||
}
|
||||
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane(std::shared_ptr<TempMesh> mesh,IfcMatrix3 planeSpace,
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane(const std::shared_ptr<TempMesh>& mesh,IfcMatrix3 planeSpace,
|
||||
IfcVector3 planeNor,IfcFloat planeOffset,
|
||||
IfcVector3 extrusionDir,IfcVector3& wall_extrusion,bool& first) {
|
||||
|
||||
|
|
@ -1758,7 +1758,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,
|
|||
vmin = std::min(IfcVector2(vv.x, vv.y), vmin);
|
||||
vmax = std::max(IfcVector2(vv.x, vv.y), vmax);
|
||||
|
||||
contour_flat.push_back(IfcVector2(vv.x,vv.y));
|
||||
contour_flat.emplace_back(vv.x,vv.y);
|
||||
}
|
||||
|
||||
// With the current code in DerivePlaneCoordinateSpace,
|
||||
|
|
@ -1791,7 +1791,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,
|
|||
pip.x = (pip.x - vmin.x) / vmax.x;
|
||||
pip.y = (pip.y - vmin.y) / vmax.y;
|
||||
|
||||
hole.push_back(ClipperLib::IntPoint(to_int64(pip.x),to_int64(pip.y)));
|
||||
hole.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if(!ClipperLib::Orientation(hole)) {
|
||||
|
|
@ -1833,7 +1833,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,
|
|||
pip.x = (pip.x - vmin.x) / vmax.x;
|
||||
pip.y = (pip.y - vmin.y) / vmax.y;
|
||||
|
||||
poly.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
poly.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(poly)) {
|
||||
|
|
@ -1891,7 +1891,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,
|
|||
// Build the poly2tri inner contours for all holes we got from ClipperLib
|
||||
for(ClipperLib::Polygon& opening : clip.holes) {
|
||||
|
||||
contours.push_back(std::vector<p2t::Point*>());
|
||||
contours.emplace_back();
|
||||
std::vector<p2t::Point*>& contour = contours.back();
|
||||
|
||||
for(ClipperLib::IntPoint& point : opening) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue