From e67bcca744ac854b7631c4e83ad4b968cdb42255 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Fri, 14 Aug 2015 14:02:16 +0300 Subject: [PATCH] IFC: Fix more bad references --- code/IFCOpenings.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/IFCOpenings.cpp b/code/IFCOpenings.cpp index b2a6bf6c5..d1dd9f50c 100644 --- a/code/IFCOpenings.cpp +++ b/code/IFCOpenings.cpp @@ -602,12 +602,12 @@ bool IntersectingLineSegments(const IfcVector2& n0, const IfcVector2& n1, const IfcVector2& m0, const IfcVector2& m1, IfcVector2& out0, IfcVector2& out1) { - const IfcVector2& n0_to_n1 = n1 - n0; + const IfcVector2 n0_to_n1 = n1 - n0; - const IfcVector2& n0_to_m0 = m0 - n0; - const IfcVector2& n1_to_m1 = m1 - n1; + const IfcVector2 n0_to_m0 = m0 - n0; + const IfcVector2 n1_to_m1 = m1 - n1; - const IfcVector2& n0_to_m1 = m1 - n0; + const IfcVector2 n0_to_m1 = m1 - n0; const IfcFloat e = 1e-5f; const IfcFloat smalle = 1e-9f; @@ -927,7 +927,7 @@ size_t CloseWindows(ContourVector& contours, IfcFloat best = static_cast(1e10); IfcVector3 bestv; - const IfcVector3& world_point = minv * IfcVector3(proj_point.x,proj_point.y,0.0f); + const IfcVector3 world_point = minv * IfcVector3(proj_point.x,proj_point.y,0.0f); BOOST_FOREACH(const TempOpening* opening, refs) { BOOST_FOREACH(const IfcVector3& other, opening->wallPoints) { @@ -1066,7 +1066,7 @@ IfcMatrix4 ProjectOntoPlane(std::vector& out_contour, const TempMesh // Project all points into the new coordinate system, collect min/max verts on the way BOOST_FOREACH(const IfcVector3& x, in_verts) { - const IfcVector3& vv = m * x; + const IfcVector3 vv = m * x; // keep Z offset in the plane coordinate system. Ignoring precision issues // (which are present, of course), this should be the same value for // all polygon vertices (assuming the polygon is planar). @@ -1144,7 +1144,7 @@ bool GenerateOpenings(std::vector& openings, std::vector contour_flat; IfcVector3 nor; - const IfcMatrix4& m = ProjectOntoPlane(contour_flat, curmesh, ok, nor); + const IfcMatrix4 m = ProjectOntoPlane(contour_flat, curmesh, ok, nor); if(!ok) { return false; } @@ -1242,7 +1242,7 @@ bool GenerateOpenings(std::vector& openings, for (unsigned int vi = 0, vend = profile_vertcnts[f]; vi < vend; ++vi, ++vi_total) { const IfcVector3& x = profile_verts[vi_total]; - const IfcVector3& v = m * x; + const IfcVector3 v = m * x; IfcVector2 vv(v.x, v.y); //if(check_intersection) { @@ -1322,7 +1322,7 @@ bool GenerateOpenings(std::vector& openings, MakeDisjunctWindowContours(other, temp_contour, poly); if(poly.size() == 1) { - const BoundingBox& newbb = GetBoundingBox(poly[0].outer); + const BoundingBox newbb = GetBoundingBox(poly[0].outer); if (!BoundingBoxesOverlapping(ibb, newbb )) { // Good guy bounding box bb = newbb ; @@ -1438,7 +1438,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector& openings,const std: // working coordinate system. bool ok; IfcVector3 nor; - const IfcMatrix3& m = DerivePlaneCoordinateSpace(curmesh, ok, nor); + const IfcMatrix3 m = DerivePlaneCoordinateSpace(curmesh, ok, nor); if (!ok) { return false; } @@ -1686,7 +1686,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector& openings,const std: continue; } - const std::vector& tris = cdt->GetTriangles(); + const std::vector tris = cdt->GetTriangles(); // Collect the triangles we just produced BOOST_FOREACH(p2t::Triangle* tri, tris) {