Minor changes

This commit is contained in:
Paolo Cignoni 2005-01-25 17:05:06 +00:00
parent 0af38855a4
commit a9d926302e
5 changed files with 14 additions and 7 deletions

View File

@ -79,12 +79,15 @@ public:
int i_idx = p1.X()-_bbox.min.X();
int k_idx = p2.Z()-_bbox.min.Z();
int index = i_idx+k_idx*_resolution.X();
if (p1.X()!=p2.X()) //intersezione della superficie con un Xedge
if (p1.X()!=p2.X()) //intersezione della superficie con un Xedge
return (p1.Y()==_current_slice)? _x_cs[index]!=-1 : _x_ns[index]!=-1;
else if (p1.Y()!=p2.Y()) //intersezione della superficie con un Yedge
else if (p1.Y()!=p2.Y()) //intersezione della superficie con un Yedge
return _y_cs[index]!=-1;
else if (p1.Z()!=p2.Z()) //intersezione della superficie con un Zedge
else if (p1.Z()!=p2.Z()) //intersezione della superficie con un Zedge
return (p1.Y()==_current_slice)? _z_cs[index]!=-1 : _z_ns[index]!=-1;
assert(false); // impossibile: i due punti non erano allineati rispetto a nessuna direzione
return false;
}
void GetXIntercept(const vcg::Point3i &p1, const vcg::Point3i &p2, VertexPointer &v)

View File

@ -19,11 +19,11 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="c:\Libraries\vcg\"
AdditionalIncludeDirectories=".\..\..\..\..\"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
@ -67,9 +67,9 @@
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="c:\Libraries\vcg"
AdditionalIncludeDirectories=".\..\..\..\..\"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="4"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"

View File

@ -21,13 +21,17 @@ int main(int argc, char *argv[])
// MARCHING CUBES
Mesh mc_mesh;
printf("[MARCHING CUBES] Building mesh...");
MarchingCubes mc(mc_mesh, walker);
walker.BuildMesh<MarchingCubes>(mc_mesh, volume, mc);
vcg::tri::io::ExporterPLY<Mesh>::Save( mc_mesh, "marching_cubes.ply");
printf("OK!\n");
// EXTENDED MARCHING CUBES
Mesh emc_mesh;
printf("[EXTENDED MARCHING CUBES] Building mesh...");
ExtendedMarchingCubes emc(emc_mesh, walker, 30);
walker.BuildMesh<ExtendedMarchingCubes>(emc_mesh, volume, emc);
vcg::tri::io::ExporterPLY<Mesh>::Save( emc_mesh, "extended_marching_cubes.ply");
printf("OK!\n");
};

Binary file not shown.

Binary file not shown.