mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Fixes after restructuring
This commit is contained in:
@@ -476,7 +476,7 @@ IfcGeom::Representation::Triangulation::Triangulation(const BRep& shape_model)
|
|||||||
/// Generates UVs for a single mesh using box projection.
|
/// Generates UVs for a single mesh using box projection.
|
||||||
/// @todo Very simple impl. Assumes that input vertices and normals match 1:1.
|
/// @todo Very simple impl. Assumes that input vertices and normals match 1:1.
|
||||||
|
|
||||||
inline std::vector<double> IfcGeom::Representation::Triangulation::box_project_uvs(const std::vector<double>& vertices, const std::vector<double>& normals)
|
std::vector<double> IfcGeom::Representation::Triangulation::box_project_uvs(const std::vector<double>& vertices, const std::vector<double>& normals)
|
||||||
{
|
{
|
||||||
std::vector<double> uvs;
|
std::vector<double> uvs;
|
||||||
uvs.resize(vertices.size() / 3 * 2);
|
uvs.resize(vertices.size() / 3 * 2);
|
||||||
@@ -504,9 +504,7 @@ inline std::vector<double> IfcGeom::Representation::Triangulation::box_project_u
|
|||||||
return uvs;
|
return uvs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Welds vertices that belong to different faces
|
int IfcGeom::Representation::Triangulation::addVertex(int material_index, const gp_XYZ & p) {
|
||||||
|
|
||||||
inline int IfcGeom::Representation::Triangulation::addVertex(int material_index, const gp_XYZ & p) {
|
|
||||||
const bool convert = settings().get(IteratorSettings::CONVERT_BACK_UNITS);
|
const bool convert = settings().get(IteratorSettings::CONVERT_BACK_UNITS);
|
||||||
const double X = convert ? (p.X() / settings().unit_magnitude()) : p.X();
|
const double X = convert ? (p.X() / settings().unit_magnitude()) : p.X();
|
||||||
const double Y = convert ? (p.Y() / settings().unit_magnitude()) : p.Y();
|
const double Y = convert ? (p.Y() / settings().unit_magnitude()) : p.Y();
|
||||||
@@ -525,7 +523,7 @@ inline int IfcGeom::Representation::Triangulation::addVertex(int material_index,
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void IfcGeom::Representation::Triangulation::addEdge(int n1, int n2, std::map<std::pair<int, int>, int>& edgecount, std::vector<std::pair<int, int>>& edges_temp) {
|
void IfcGeom::Representation::Triangulation::addEdge(int n1, int n2, std::map<std::pair<int, int>, int>& edgecount, std::vector<std::pair<int, int>>& edges_temp) {
|
||||||
const Edge e = Edge((std::min)(n1, n2), (std::max)(n1, n2));
|
const Edge e = Edge((std::min)(n1, n2), (std::max)(n1, n2));
|
||||||
if (edgecount.find(e) == edgecount.end()) edgecount[e] = 1;
|
if (edgecount.find(e) == edgecount.end()) edgecount[e] = 1;
|
||||||
else edgecount[e] ++;
|
else edgecount[e] ++;
|
||||||
|
|||||||
@@ -172,9 +172,9 @@ namespace IfcGeom {
|
|||||||
static std::vector<double> box_project_uvs(const std::vector<double> &vertices, const std::vector<double> &normals);
|
static std::vector<double> box_project_uvs(const std::vector<double> &vertices, const std::vector<double> &normals);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Welds vertices that belong to different faces
|
/// Welds vertices that belong to different faces
|
||||||
int addVertex(int material_index, const gp_XYZ& p);
|
int addVertex(int material_index, const gp_XYZ& p);
|
||||||
inline void addEdge(int n1, int n2, std::map<std::pair<int, int>, int>& edgecount, std::vector<std::pair<int, int> >& edges_temp);
|
void addEdge(int n1, int n2, std::map<std::pair<int, int>, int>& edgecount, std::vector<std::pair<int, int> >& edges_temp);
|
||||||
|
|
||||||
Triangulation();
|
Triangulation();
|
||||||
Triangulation(const Triangulation&);
|
Triangulation(const Triangulation&);
|
||||||
|
|||||||
Reference in New Issue
Block a user