Skip to content

Commit

Permalink
fix win + minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielaCabiddu committed Sep 29, 2023
1 parent 9a01da5 commit 68ec261
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions include/bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ void BinarySpacePartition::create_bufferzone(const int leaf_pos, const int buffe
}

void BinarySpacePartition::fill (const std::string input_binary_filename,
const uint n_input_files)
const unsigned int n_input_files,
bool with_polys)
{
if (leaves.size() == 0)
return;
Expand All @@ -270,7 +271,7 @@ void BinarySpacePartition::fill (const std::string input_binary_filename,

stxxl::uint64 counter = 0;

for (uint f=0; f < n_input_files; f++)
for (unsigned int f=0; f < n_input_files; f++)
{
stxxl::uint64 n_vertices, n_triangles;

Expand Down Expand Up @@ -321,7 +322,7 @@ void BinarySpacePartition::fill (const std::string input_binary_filename,
counter++;
cell->n_inner_vertices++;

if (n_triangles > 0)
if (with_polys)
{
vtx2cell.push_back(curr_cell_pos); // mapping vertex --> bsp_cell
vtx2boundary.push_back(UNKNOWN_BOUNDARY_INFO); // no information about "is it on the boundary of current cell?"
Expand All @@ -338,7 +339,7 @@ void BinarySpacePartition::fill (const std::string input_binary_filename,
std::cout << "[VERTEX CLASSIFICATION] Completed." << std::endl << std::endl;


if (n_triangles > 0)
if (with_polys)
{
std::cout << "[TRIANGLE CLASSIFICATION] Running ..." << std::endl;

Expand Down
10 changes: 5 additions & 5 deletions include/bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ class BinarySpacePartition

BinarySpacePartition (const BspCell &cell) { root = cell; leaves.push_back(&root);}

uint get_n_leaves () const { return leaves.size(); }
BspCell *get_leaf (const uint i) { return leaves.at(i); }
unsigned int get_n_leaves () const { return leaves.size(); }
BspCell *get_leaf (const unsigned int i) { return leaves.at(i); }

const Point &get_point (const uint i) { return input_coords.at(i); }
const Point &get_point (const unsigned int i) { return input_coords.at(i); }

void create (const int max_vtx_per_cell, const std::string out_directory);
void fill (const std::string input_binary_filename, const uint n_input_files);
void fill (const std::string input_binary_filename, const unsigned intn_input_files, bool with_polys = true);

void split_cell (BspCell &cell, const std::string out_directory);

Expand All @@ -99,7 +99,7 @@ class BinarySpacePartition
void serialize( Archive & ar )
{
std::vector<BspCell> cells;
for (uint l=0; l < leaves.size();l++)
for (unsigned int l=0; l < leaves.size();l++)
cells.push_back(*(leaves.at(l)));
ar (CEREAL_NVP(cells));

Expand Down

0 comments on commit 68ec261

Please sign in to comment.