minor changes
This commit is contained in:
parent
14a1c4c1e7
commit
c3227ae7a0
|
@ -7,9 +7,6 @@
|
||||||
#include <vcg/complex/tetramesh/base.h>
|
#include <vcg/complex/tetramesh/base.h>
|
||||||
#include <vcg/simplex/tetrahedron/with/atavtq.h>
|
#include <vcg/simplex/tetrahedron/with/atavtq.h>
|
||||||
|
|
||||||
// the trackball
|
|
||||||
#include <wrap/gui/trackball.h>
|
|
||||||
|
|
||||||
// io
|
// io
|
||||||
#include <wrap/io_tetramesh/import_ply.h>
|
#include <wrap/io_tetramesh/import_ply.h>
|
||||||
#include <wrap/io_tetramesh/export_ply.h>
|
#include <wrap/io_tetramesh/export_ply.h>
|
||||||
|
@ -25,27 +22,24 @@ class MyTetrahedron : public vcg::TetraATAVTQ<MyVertex,MyTetrahedron>{};
|
||||||
class MyTMesh: public vcg::tetra::Tetramesh< std::vector<MyVertex>, std::vector<MyTetrahedron > >{};
|
class MyTMesh: public vcg::tetra::Tetramesh< std::vector<MyVertex>, std::vector<MyTetrahedron > >{};
|
||||||
|
|
||||||
|
|
||||||
#include <vcg/complex/local_optimization/base.h>
|
#include <vcg/complex/local_optimization.h>
|
||||||
#include <vcg/complex/local_optimization/tetra_edge_collapse.h>
|
#include <vcg/complex/local_optimization/tetra_edge_collapse.h>
|
||||||
|
|
||||||
|
|
||||||
vcg::LocalOptimization<MyTMesh> loc;
|
vcg::LocalOptimization<MyTMesh> *loc;
|
||||||
vcg::tetra::TetraEdgeCollapse<MyTMesh> c;
|
//vcg::tetra::TetraEdgeCollapse<MyTMesh> c;
|
||||||
MyTMesh mesh;
|
MyTMesh mesh;
|
||||||
|
|
||||||
int main(int,char**argv){
|
int main(int,char**argv,int num_op){
|
||||||
|
loc=new vcg::LocalOptimization<MyTMesh>(mesh);
|
||||||
loc.m = & mesh;
|
|
||||||
|
|
||||||
vcg::tetra::io::ImporterTS<MyTMesh>::Open(mesh,argv[1]);
|
vcg::tetra::io::ImporterTS<MyTMesh>::Open(mesh,argv[1]);
|
||||||
|
//vcg::tetra::io::ImporterTS<MyTMesh>::Open(mesh,"d:/sphere.ts");
|
||||||
printf("mesh loaded %d %d \n",mesh.vn,mesh.tn);
|
printf("mesh loaded %d %d \n",mesh.vn,mesh.tn);
|
||||||
// vcg::tetra::io::ExporterPLY<MyTMesh>::Save(mesh,(string(argv[1])+string(".ply")).c_str());
|
|
||||||
|
|
||||||
|
/*vcg::tetra::TetraEdgeCollapse<MyTMesh> *_ ;
|
||||||
|
bool res;*/
|
||||||
|
|
||||||
|
|
||||||
vcg::tetra::TetraEdgeCollapse<MyTMesh> *_ ;
|
|
||||||
bool res;
|
|
||||||
do{
|
|
||||||
vcg::tetra::UpdateTetraTopology<MyTMesh::VertexContainer,MyTMesh::TetraContainer>
|
vcg::tetra::UpdateTetraTopology<MyTMesh::VertexContainer,MyTMesh::TetraContainer>
|
||||||
::VTTopology(mesh.vert,mesh.tetra);
|
::VTTopology(mesh.vert,mesh.tetra);
|
||||||
|
|
||||||
|
@ -55,13 +49,13 @@ int main(int,char**argv){
|
||||||
vcg::tetra::UpdateTetraTopology<MyTMesh::VertexContainer,MyTMesh::TetraContainer>
|
vcg::tetra::UpdateTetraTopology<MyTMesh::VertexContainer,MyTMesh::TetraContainer>
|
||||||
::setExternalVertices(mesh.vert,mesh.tetra);
|
::setExternalVertices(mesh.vert,mesh.tetra);
|
||||||
|
|
||||||
_=new vcg::tetra::TetraEdgeCollapse<MyTMesh>();
|
vcg::tetra::TetraEdgeCollapse<MyTMesh>::Init(mesh,loc->h);
|
||||||
loc.h.push_back(vcg::LocalOptimization<MyTMesh>::HeapElem(_));
|
|
||||||
|
|
||||||
loc.Init();
|
bool res;
|
||||||
loc.SetTargetSimplices(10);
|
do{
|
||||||
|
loc->SetTargetOperations(num_op);
|
||||||
|
|
||||||
res = loc.DoOptimization();
|
res = loc->DoOptimization();
|
||||||
|
|
||||||
printf("ood %d\n bor %d\n vol %d \n lkv %d \n lke %d \n lkf %d \n",
|
printf("ood %d\n bor %d\n vol %d \n lkv %d \n lke %d \n lkf %d \n",
|
||||||
FAIL::OFD(),
|
FAIL::OFD(),
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
EnableIntrinsicFunctions="FALSE"
|
EnableIntrinsicFunctions="FALSE"
|
||||||
AdditionalIncludeDirectories="d:/sf"
|
AdditionalIncludeDirectories="d:/sf;d:/;"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
MinimalRebuild="TRUE"
|
MinimalRebuild="TRUE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
|
@ -28,15 +28,7 @@
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="4">
|
DebugInformationFormat="4"/>
|
||||||
<IntelOptions
|
|
||||||
Optimization="0"
|
|
||||||
EnableIntrinsicFunctions="0"
|
|
||||||
MinimalRebuild="1"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="5"
|
|
||||||
AllOptions="/c /I "d:/sf" /ZI /nologo /W3 /Wp64 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Gm /EHsc /RTC1 /MLd /Fo"Debug/" /Fd"Debug/vc70.pdb" /Gd /TP"/>
|
|
||||||
</Tool>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -47,10 +39,7 @@
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
ProgramDatabaseFile="$(OutDir)/tetra_decimator.pdb"
|
ProgramDatabaseFile="$(OutDir)/tetra_decimator.pdb"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1">
|
TargetMachine="1"/>
|
||||||
<IntelOptions
|
|
||||||
AllOptions="/NOLOGO /OUT:"Debug/tetra_decimator.exe" /INCREMENTAL /DEBUG /PDB:"Debug/tetra_decimator.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
|
|
||||||
</Tool>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -85,11 +74,7 @@
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="3">
|
DebugInformationFormat="3"/>
|
||||||
<IntelOptions
|
|
||||||
RuntimeLibrary="4"
|
|
||||||
AllOptions="/c /Zi /nologo /W3 /Wp64 /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /EHsc /ML /Fo"Release/" /Fd"Release/vc70.pdb" /Gd /TP"/>
|
|
||||||
</Tool>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -101,10 +86,7 @@
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
TargetMachine="1">
|
TargetMachine="1"/>
|
||||||
<IntelOptions
|
|
||||||
AllOptions="/NOLOGO /OUT:"Release/tetra_decimator.exe" /INCREMENTAL:NO /DEBUG /PDB:"Release/tetra_decimator.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
|
|
||||||
</Tool>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"/>
|
Name="VCMIDLTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
|
@ -145,9 +127,6 @@
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\vcg\complex\local_optimization\base.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\vcg\complex\tetramesh\edge_collapse.h">
|
RelativePath="..\..\..\vcg\complex\tetramesh\edge_collapse.h">
|
||||||
</File>
|
</File>
|
||||||
|
@ -164,4 +143,3 @@
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
</VisualStudioProject>
|
</VisualStudioProject>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue