Yet another big cleaning pass to the samples
This commit is contained in:
parent
ba4a51e02d
commit
69000a6af7
|
@ -1,20 +1,35 @@
|
|||
// standard headers
|
||||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#include <stdio.h>
|
||||
|
||||
// stl headers
|
||||
#include <vector>
|
||||
|
||||
// vcg headers
|
||||
|
||||
#include<vcg/simplex/face/distance.h>
|
||||
#include<vcg/complex/complex.h>
|
||||
#include<vcg/simplex/face/distance.h>
|
||||
#include<vcg/simplex/face/component_ep.h>
|
||||
#include <vcg/complex/algorithms/create/platonic.h>
|
||||
#include <vcg/complex/algorithms/update/normal.h>
|
||||
#include <vcg/complex/algorithms/update/component_ep.h>
|
||||
#include <vcg/complex/algorithms/update/flag.h>
|
||||
#include <vcg/space/intersection3.h>
|
||||
|
||||
#include <vcg/space/index/aabb_binary_tree/aabb_binary_tree.h>
|
||||
|
||||
typedef float AScalarType;
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = aabb_binary_tree
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console
|
||||
TEMPLATE = app
|
||||
SOURCES += aabb_binary_tree.cpp
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
# Mac specific Config required to avoid to make application bundles
|
||||
CONFIG -= app_bundle
|
|
@ -1,52 +1,37 @@
|
|||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include <vector>
|
||||
|
||||
/*include the base definition for the vertex */
|
||||
#include <vcg/simplex/vertex/base.h>
|
||||
|
||||
/*include the base definition for the face */
|
||||
#include <vcg/simplex/face/base.h>
|
||||
|
||||
/*include the base definition for the edge */
|
||||
#include <vcg/connectors/hedge.h>
|
||||
|
||||
/*include the base definition for the trimesh*/
|
||||
#include <vcg/complex/complex.h>
|
||||
|
||||
/*include the algorithms for updating: */
|
||||
#include <vcg/complex/algorithms/update/topology.h> /* topology */
|
||||
#include <vcg/complex/algorithms/update/bounding.h> /* bounding box */
|
||||
#include <vcg/complex/algorithms/update/normal.h> /* normal */
|
||||
#include <vcg/complex/algorithms/update/topology.h>
|
||||
#include <vcg/complex/algorithms/update/bounding.h>
|
||||
#include <vcg/complex/algorithms/update/normal.h>
|
||||
|
||||
/*include the algorithms for mesh fixing */
|
||||
#include <vcg/complex/algorithms/clean.h>
|
||||
|
||||
/*include the importer from disk*/
|
||||
#include <wrap/io_trimesh/import.h>
|
||||
|
||||
/*include the exporter to disk (in ply)*/
|
||||
#include <wrap/io_trimesh/export_ply.h>
|
||||
|
||||
/* include the support for polygon meshes (function to convert from/to trimesh)*/
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
TARGET = polygonmesh_base
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
include(../common.pri)
|
||||
TARGET = polygonmesh_base
|
||||
SOURCES += polygonmesh.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -34,18 +34,11 @@ class MyFace : public vcg::Face< MyUsedTypes, vcg::face::VertexRef, vcg::face
|
|||
|
||||
class MyMesh : public vcg::tri::TriMesh< std::vector<MyVertex>, std::vector<MyFace> > {};
|
||||
|
||||
|
||||
float Irradiance(MyMesh::VertexType v){
|
||||
// .....
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
|
||||
MyMesh m;
|
||||
//...here m is filled
|
||||
|
||||
|
||||
// add a per-vertex attribute with type float named "Irradiance"
|
||||
MyMesh::PerVertexAttributeHandle<float> ih = vcg::tri::Allocator<MyMesh>::AddPerVertexAttribute<float> (m,std::string("Irradiance"));
|
||||
|
@ -56,15 +49,15 @@ int main()
|
|||
// add a per-vertex attribute with type bool and no name specified
|
||||
MyMesh::PerVertexAttributeHandle<bool> blocked_h = vcg::tri::Allocator<MyMesh>::AddPerVertexAttribute<bool> (m);
|
||||
|
||||
// add a per-vertex attribute with type bool and no name specified
|
||||
// add a per-face attribute with type bool and no name specified
|
||||
MyMesh::PerFaceAttributeHandle<bool> blocked_hf = vcg::tri::Allocator<MyMesh>::AddPerFaceAttribute<bool> (m);
|
||||
|
||||
MyMesh::VertexIterator vi; int i = 0;
|
||||
for(vi = m.vert.begin(); vi != m.vert.end(); ++vi,++i){
|
||||
ih[vi] = Irradiance(*vi); // [] operator takes a iterator
|
||||
ih[*vi] = Irradiance(*vi); // or a MyMesh::VertexType object
|
||||
ih[&*vi]= Irradiance(*vi); // or a pointer to it
|
||||
ih[i] = Irradiance(*vi); // or an integer index
|
||||
ih[vi] = 1.0f; // [] operator takes a iterator
|
||||
ih[*vi] = 1.0f; // or a MyMesh::VertexType object
|
||||
ih[&*vi]= 1.0f; // or a pointer to it
|
||||
ih[i] = 1.0f; // or an integer index
|
||||
}
|
||||
|
||||
// Once created with AddPerVertexAttribute, an handle to the attribute can be obtained as follows
|
||||
|
@ -80,7 +73,6 @@ int main()
|
|||
vcg::tri::Allocator<MyMesh>::DeletePerVertexAttribute(m,blocked_h);
|
||||
|
||||
bool res ;
|
||||
|
||||
res = vcg::tri::Allocator<MyMesh>::IsValidHandle(m,ih);printf("%d\n",res);
|
||||
res = vcg::tri::Allocator<MyMesh>::IsValidHandle(m,blocked_hf);printf("%d\n",res);
|
||||
vcg::tri::Allocator<MyMesh>::DeletePerVertexAttribute(m,ih);
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
# To solve issue related to slash vs. backslash under cygwin try:
|
||||
# env MINGW_IN_SHELL=1 qmake -spec win32-g++
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_attribute
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_attribute.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
|
||||
// mesh definition
|
||||
//#include <vcg/simplex/vertex/with/vn.h>
|
||||
//#include <vcg/simplex/face/with/af.h>
|
||||
//#include <vcg/complex/complex.h>
|
||||
|
||||
#include<vcg/simplex/vertex/base.h>
|
||||
#include<vcg/simplex/face/base.h>
|
||||
#include<vcg/simplex/face/topology.h>
|
||||
|
||||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#include<vcg/complex/complex.h>
|
||||
|
||||
#include <vcg/complex/algorithms/update/bounding.h>
|
||||
|
@ -20,11 +32,6 @@
|
|||
#include <wrap/io_trimesh/import_ply.h>
|
||||
#include <wrap/io_trimesh/export_ply.h>
|
||||
|
||||
// std
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <time.h>
|
||||
|
||||
using namespace vcg;
|
||||
using namespace std;
|
||||
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
# To solve issue related to slash vs. backslash under cygwin try:
|
||||
# env MINGW_IN_SHELL=1 qmake -spec win32-g++
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_ball_pivoting
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_ball_pivoting.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_base
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_base.cpp
|
||||
# Mac specific Config required to avoid to make application bundles
|
||||
CONFIG -= app_bundle
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
# To solve issue related to slash vs. backslash under cygwin try:
|
||||
# env MINGW_IN_SHELL=1 qmake -spec win32-g++
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_clustering
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_clustering.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2009 \/)\/ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
|
@ -20,17 +20,19 @@
|
|||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#include <QtOpenGL/qgl.h>
|
||||
|
||||
#include<vcg/simplex/vertex/base.h>
|
||||
#include<vcg/simplex/vertex/component.h>
|
||||
// This sample require gl.
|
||||
#ifndef GLU_VERSIONS
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <vcg/complex/used_types.h>
|
||||
|
||||
#include<vcg/simplex/face/base.h>
|
||||
#include<vcg/simplex/face/component.h>
|
||||
|
||||
#include<vcg/simplex/face/topology.h>
|
||||
#include<vcg/complex/complex.h>
|
||||
#include<vcg/complex/append.h>
|
||||
|
||||
|
@ -41,12 +43,11 @@
|
|||
// topology computation
|
||||
#include<vcg/complex/algorithms/update/topology.h>
|
||||
#include<vcg/complex/algorithms/update/bounding.h>
|
||||
#include<vcg/complex/algorithms/update/normal.h>
|
||||
#include <vcg/complex/algorithms/update/position.h>
|
||||
#include <vcg/complex/algorithms/update/quality.h>
|
||||
#include <vcg/complex/algorithms/stat.h>
|
||||
|
||||
// normals
|
||||
#include<vcg/complex/algorithms/update/normal.h>
|
||||
#include <vcg/complex/algorithms/intersection.h>
|
||||
#include <vcg/complex/algorithms/refine.h>
|
||||
#include <wrap/gl/glu_tessellator_cap.h>
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
include(../common.pri)
|
||||
TARGET = trimesh_edge
|
||||
DEPENDPATH += . ../../..
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl opengl
|
||||
TEMPLATE = app
|
||||
CONFIG += opengl
|
||||
SOURCES += trimesh_edge.cpp ../../../wrap/ply/plylib.cpp
|
||||
HEADERS += ../../../vcg/complex/algorithms/update/topology.h
|
||||
HEADERS += ../../../wrap/gl/glu_tessellator_cap.h
|
||||
# Mac specific Config required to avoid to make application bundles
|
||||
CONFIG -= app_bundle
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include<vcg/space/triangle3.h>
|
||||
#include<vcg/complex/complex.h>
|
||||
#include<vcg/complex/algorithms/hole.h>
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_hole
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_hole.cpp ../../../wrap/ply/plylib.cpp
|
||||
HEADERS += ../../../wrap/ply/plylib.h
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#include <vcg/complex/complex.h>
|
||||
#include <vcg/complex/algorithms/update/topology.h>
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
include(../common.pri)
|
||||
TARGET = trimesh_intersection
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_intersection.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,22 +1,35 @@
|
|||
#include <stdio.h>
|
||||
#include <vcg/space/point3.h>
|
||||
#include <vcg/space/box3.h>
|
||||
#include <vcg/math/perlin_noise.h>
|
||||
#include <vcg/simplex/vertex/base.h>
|
||||
#include <vcg/simplex/face/base.h>
|
||||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#include <vcg/complex/complex.h>
|
||||
#include <vcg/complex/allocate.h>
|
||||
#include <vcg/math/perlin_noise.h>
|
||||
#include <vcg/complex/algorithms/create/marching_cubes.h>
|
||||
#include <vcg/complex/algorithms/create/extended_marching_cubes.h>
|
||||
#include <vcg/complex/algorithms/create/mc_trivial_walker.h>
|
||||
#include <wrap/io_trimesh/export_ply.h>
|
||||
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace vcg;
|
||||
|
||||
|
||||
typedef float ScalarType;
|
||||
|
||||
class MyFace;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
# Input
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_isosurface
|
||||
SOURCES += trimesh_isosurface.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,17 +1,31 @@
|
|||
#include <vector>
|
||||
|
||||
#include<vcg/simplex/vertex/base.h>
|
||||
#include<vcg/simplex/face/base.h>
|
||||
#include<vcg/simplex/face/topology.h>
|
||||
|
||||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#include<vcg/complex/complex.h>
|
||||
#include<vcg/complex/allocate.h>
|
||||
#include<vcg/complex/append.h>
|
||||
#include<vcg/complex/algorithms/clean.h>
|
||||
#include<vcg/complex/algorithms/clip.h>
|
||||
#include<vcg/complex/algorithms/update/bounding.h>
|
||||
|
||||
|
||||
// input output
|
||||
#include <wrap/io_trimesh/import_ply.h>
|
||||
#include <wrap/io_trimesh/export_ply.h>
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_join
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
HEADERS += ../../../vcg/complex/trimesh/subset.h
|
||||
|
||||
SOURCES += trimesh_join.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
#ifndef _MESH_DEF_
|
||||
#define _MESH_DEF_
|
||||
|
||||
#include<vcg/complex/complex.h>
|
||||
#include<vcg/simplex/vertex/base.h>
|
||||
#include<vcg/simplex/face/base.h>
|
||||
#include<vcg/simplex/face/topology.h>
|
||||
|
||||
#include<vcg/simplex/vertex/component_ocf.h>
|
||||
#include<vcg/simplex/face/component_ocf.h>
|
||||
|
||||
|
||||
|
||||
class CFace;
|
||||
class CFaceOcf;
|
||||
|
||||
class CVertex;
|
||||
class CVertexOcf;
|
||||
|
||||
|
||||
struct MyUsedTypes: public vcg::UsedTypes<vcg::Use<CVertex>::AsVertexType,vcg::Use<CFace>::AsFaceType>{};
|
||||
struct MyUsedTypesOcf: public vcg::UsedTypes<vcg::Use<CVertexOcf>::AsVertexType,vcg::Use<CFaceOcf>::AsFaceType>{};
|
||||
|
||||
// Optional stuff has two suffixes:
|
||||
// OCF Optional Component Fast
|
||||
// OCC Optional Component Compact
|
||||
|
||||
class CVertex : public vcg::Vertex< MyUsedTypes, vcg::vertex::Coord3f, vcg::vertex::BitFlags,vcg::vertex::Normal3f >{};
|
||||
class CVertexOcf : public vcg::Vertex< MyUsedTypesOcf,vcg::vertex::InfoOcf,vcg::vertex::Coord3f,vcg::vertex::QualityfOcf, vcg::vertex::BitFlags,vcg::vertex::Normal3f,vcg::vertex::RadiusfOcf >{};
|
||||
class CFace : public vcg::Face< MyUsedTypes, vcg::face::FFAdj, vcg::face::VertexRef, vcg::face::BitFlags, vcg::face::Normal3f > {};
|
||||
class CFaceOcf : public vcg::Face< MyUsedTypesOcf, vcg::face::InfoOcf, vcg::face::FFAdjOcf, vcg::face::VertexRef, vcg::face::BitFlags, vcg::face::Normal3fOcf > {};
|
||||
|
||||
class CMesh : public vcg::tri::TriMesh< std::vector<CVertex >, std::vector<CFace > > {};
|
||||
class CMeshOcf : public vcg::tri::TriMesh< vcg::vertex::vector_ocf<CVertexOcf>, vcg::face::vector_ocf<CFaceOcf> > {};
|
||||
|
||||
#endif
|
|
@ -1,8 +1,30 @@
|
|||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
/****************************************************************************
|
||||
* VCGLib o o *
|
||||
* Visual and Computer Graphics Library o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2004-2012 \/)\/ *
|
||||
* Visual Computing Lab /\/| *
|
||||
* ISTI - Italian National Research Council | *
|
||||
* \ *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
#include<vcg/complex/complex.h>
|
||||
|
||||
#include<vcg/simplex/vertex/component_ocf.h>
|
||||
#include<vcg/simplex/face/component_ocf.h>
|
||||
|
||||
#include "mesh_definition.h"
|
||||
#include<vcg/complex/allocate.h>
|
||||
#include<vcg/complex/algorithms/create/platonic.h>
|
||||
#include<vcg/complex/algorithms/update/topology.h>
|
||||
#include<vcg/complex/algorithms/update/flag.h>
|
||||
|
@ -10,19 +32,36 @@
|
|||
#include<vcg/complex/algorithms/update/bounding.h>
|
||||
#include <vcg/complex/algorithms/refine.h>
|
||||
|
||||
class CFace;
|
||||
class CFaceOcf;
|
||||
|
||||
class CVertex;
|
||||
class CVertexOcf;
|
||||
|
||||
struct MyUsedTypes: public vcg::UsedTypes<vcg::Use<CVertex>::AsVertexType,vcg::Use<CFace>::AsFaceType>{};
|
||||
struct MyUsedTypesOcf: public vcg::UsedTypes<vcg::Use<CVertexOcf>::AsVertexType,vcg::Use<CFaceOcf>::AsFaceType>{};
|
||||
|
||||
// Optional stuff has two suffixes:
|
||||
// OCF Optional Component Fast
|
||||
// OCC Optional Component Compact
|
||||
|
||||
class CVertex : public vcg::Vertex< MyUsedTypes, vcg::vertex::Coord3f, vcg::vertex::BitFlags,vcg::vertex::Normal3f >{};
|
||||
class CVertexOcf : public vcg::Vertex< MyUsedTypesOcf,vcg::vertex::InfoOcf,vcg::vertex::Coord3f,vcg::vertex::QualityfOcf, vcg::vertex::BitFlags,vcg::vertex::Normal3f,vcg::vertex::RadiusfOcf >{};
|
||||
class CFace : public vcg::Face< MyUsedTypes, vcg::face::FFAdj, vcg::face::VertexRef, vcg::face::BitFlags, vcg::face::Normal3f > {};
|
||||
class CFaceOcf : public vcg::Face< MyUsedTypesOcf, vcg::face::InfoOcf, vcg::face::FFAdjOcf, vcg::face::VertexRef, vcg::face::BitFlags, vcg::face::Normal3fOcf > {};
|
||||
|
||||
class CMesh : public vcg::tri::TriMesh< std::vector<CVertex >, std::vector<CFace > > {};
|
||||
class CMeshOcf : public vcg::tri::TriMesh< vcg::vertex::vector_ocf<CVertexOcf>, vcg::face::vector_ocf<CFaceOcf> > {};
|
||||
|
||||
|
||||
using namespace vcg;
|
||||
using namespace std;
|
||||
|
||||
int main(int , char **)
|
||||
{
|
||||
|
||||
|
||||
|
||||
CMesh cm;
|
||||
CMeshOcf cmof;
|
||||
|
||||
|
||||
|
||||
tri::Tetrahedron(cm);
|
||||
tri::Tetrahedron(cmof);
|
||||
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
# To solve issue related to slash vs. backslash under cygwin try:
|
||||
# env MINGW_IN_SHELL=1 qmake -spec win32-g++
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_optional
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_optional.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
# To solve issue related to slash vs. backslash under cygwin try:
|
||||
# env MINGW_IN_SHELL=1 qmake -spec win32-g++
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_refine
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_refine.cpp ../../../wrap/ply/plylib.cpp
|
||||
# Mac specific Config required to avoid to make application bundles
|
||||
CONFIG -= app_bundle
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_smooth
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_smooth.cpp ../../../wrap/ply/plylib.cpp
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
######################################################################
|
||||
# Automatically generated by qmake (2.00a) ven 24. giu 14:14:20 2005
|
||||
######################################################################
|
||||
|
||||
include(../common.pri)
|
||||
TARGET = trimesh_topology
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . ../../..
|
||||
CONFIG += console stl
|
||||
TEMPLATE = app
|
||||
SOURCES += trimesh_topology.cpp
|
||||
# Mac specific Config required to avoid to make application bundles
|
||||
CONFIG -= app_bundle
|
||||
|
|
Loading…
Reference in New Issue