added plus types version (#ifdef _PLUS_TYPES_ to use it ).
This commit is contained in:
parent
c2e2b2cd0a
commit
62cde7724b
|
|
@ -24,6 +24,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.6 2005/01/26 22:45:34 cignoni
|
||||||
|
Release 4.04
|
||||||
|
final updates for gcc compiling issues
|
||||||
|
|
||||||
Revision 1.5 2004/05/14 00:32:36 ganovelli
|
Revision 1.5 2004/05/14 00:32:36 ganovelli
|
||||||
just color and quality on the vertex
|
just color and quality on the vertex
|
||||||
|
|
||||||
|
|
@ -36,16 +40,29 @@ just color and quality on the vertex
|
||||||
#pragma warning(disable:4786 4804 4666)
|
#pragma warning(disable:4786 4804 4666)
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <vcg/simplex/vertex/with/vcvq.h>
|
|
||||||
#include <vcg/simplex/face/with/rtfcfmfn.h>
|
|
||||||
#include <vcg/space/index/grid_static_ptr.h>
|
#include <vcg/space/index/grid_static_ptr.h>
|
||||||
#include <vcg/complex/trimesh/base.h>
|
#include <vcg/complex/trimesh/base.h>
|
||||||
|
|
||||||
// Vertex, Face, Mesh and Grid definitions.
|
// Vertex, Face, Mesh and Grid definitions.
|
||||||
|
#ifdef _PLUS_TYPES_
|
||||||
|
#include <vcg/simplex/vertexplus/base.h>
|
||||||
|
#include <vcg/simplex/vertexplus/component.h>
|
||||||
|
#include <vcg/simplex/faceplus/base.h>
|
||||||
|
#include <vcg/simplex/faceplus/component.h>
|
||||||
|
#include <vcg/simplex/faceplus/component_rt.h>
|
||||||
|
class MyEdge;
|
||||||
|
class CFace;
|
||||||
|
class CVertex : public vcg::VertexSimp2<CVertex,MyEdge,CFace,vcg::vert::Coord3d,vcg::vert::Qualityf,vcg::vert::Normal3d,vcg::vert::BitFlags> {};
|
||||||
|
class CFace : public vcg::FaceSimp2< CVertex,MyEdge,CFace,vcg::face::VertexRef, vcg::face::Normal3d, vcg::face::EdgePlane,vcg::face::Color4b,vcg::face::Mark,vcg::face::BitFlags> {};
|
||||||
|
class CMesh : public vcg::tri::TriMesh< std::vector<CVertex>, std::vector<CFace> > {};
|
||||||
|
#else
|
||||||
|
#include <vcg/simplex/vertex/with/vcvq.h>
|
||||||
|
#include <vcg/simplex/face/with/rtfcfmfn.h>
|
||||||
class MyEdge;
|
class MyEdge;
|
||||||
class CFace;
|
class CFace;
|
||||||
class CVertex : public vcg::VertexVCVQ< double,MyEdge,CFace > {};
|
class CVertex : public vcg::VertexVCVQ< double,MyEdge,CFace > {};
|
||||||
class CFace : public vcg::FaceRTFCFMFN< CVertex,MyEdge,CFace > {};
|
class CFace : public vcg::FaceRTFCFMFN< CVertex,MyEdge,CFace > {};
|
||||||
class CMesh : public vcg::tri::TriMesh< std::vector<CVertex>, std::vector<CFace> > {};
|
class CMesh : public vcg::tri::TriMesh< std::vector<CVertex>, std::vector<CFace> > {};
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.22 2006/10/25 12:40:19 fiorin
|
||||||
|
Added possibility to use Octree as search structure:
|
||||||
|
|
||||||
Revision 1.21 2006/05/03 21:22:39 cignoni
|
Revision 1.21 2006/05/03 21:22:39 cignoni
|
||||||
added missing Include
|
added missing Include
|
||||||
|
|
||||||
|
|
@ -259,7 +262,7 @@ int main(int argc, char**argv)
|
||||||
tri::UpdateBounding<CMesh>::Box(S2);
|
tri::UpdateBounding<CMesh>::Box(S2);
|
||||||
|
|
||||||
// set Bounding Box.
|
// set Bounding Box.
|
||||||
Box3d bbox, tmp_bbox_M1=S1.bbox, tmp_bbox_M2=S2.bbox;
|
Box3<CMesh::ScalarType> bbox, tmp_bbox_M1=S1.bbox, tmp_bbox_M2=S2.bbox;
|
||||||
bbox.Add(S1.bbox);
|
bbox.Add(S1.bbox);
|
||||||
bbox.Add(S2.bbox);
|
bbox.Add(S2.bbox);
|
||||||
bbox.Offset(bbox.Diag()*0.02);
|
bbox.Offset(bbox.Diag()*0.02);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.23 2006/10/25 12:40:19 fiorin
|
||||||
|
Added possibility to use Octree as search structure:
|
||||||
|
|
||||||
Revision 1.22 2006/04/20 08:30:24 cignoni
|
Revision 1.22 2006/04/20 08:30:24 cignoni
|
||||||
small GCC compiling issues
|
small GCC compiling issues
|
||||||
|
|
||||||
|
|
@ -286,7 +289,7 @@ inline double Sampling<MetroMesh>::ComputeMeshArea(MetroMesh & mesh)
|
||||||
|
|
||||||
for(face=mesh.face.begin(); face != mesh.face.end(); face++)
|
for(face=mesh.face.begin(); face != mesh.face.end(); face++)
|
||||||
if(!(*face).IsD())
|
if(!(*face).IsD())
|
||||||
area += face->DoubleArea();
|
area += DoubleArea(*face);
|
||||||
|
|
||||||
return area/2.0;
|
return area/2.0;
|
||||||
}
|
}
|
||||||
|
|
@ -469,7 +472,7 @@ void Sampling<MetroMesh>::MontecarloFaceSampling()
|
||||||
if(!(*fi).IsD())
|
if(!(*fi).IsD())
|
||||||
{
|
{
|
||||||
// compute # samples in the current face.
|
// compute # samples in the current face.
|
||||||
n_samples_decimal += 0.5*fi->DoubleArea() * n_samples_per_area_unit;
|
n_samples_decimal += 0.5*DoubleArea(*fi) * n_samples_per_area_unit;
|
||||||
n_samples = (int) n_samples_decimal;
|
n_samples = (int) n_samples_decimal;
|
||||||
|
|
||||||
// for every sample p_i in T...
|
// for every sample p_i in T...
|
||||||
|
|
@ -543,7 +546,7 @@ void Sampling<MetroMesh>::SubdivFaceSampling()
|
||||||
for(fi=S1.face.begin(); fi != S1.face.end(); fi++)
|
for(fi=S1.face.begin(); fi != S1.face.end(); fi++)
|
||||||
{
|
{
|
||||||
// compute # samples in the current face.
|
// compute # samples in the current face.
|
||||||
n_samples_decimal += 0.5*fi->DoubleArea() * n_samples_per_area_unit;
|
n_samples_decimal += 0.5*DoubleArea(*fi) * n_samples_per_area_unit;
|
||||||
n_samples = (int) n_samples_decimal;
|
n_samples = (int) n_samples_decimal;
|
||||||
if(n_samples)
|
if(n_samples)
|
||||||
{
|
{
|
||||||
|
|
@ -592,7 +595,7 @@ void Sampling<MetroMesh>::SimilarFaceSampling()
|
||||||
for(fi=S1.face.begin(); fi != S1.face.end(); fi++)
|
for(fi=S1.face.begin(); fi != S1.face.end(); fi++)
|
||||||
{
|
{
|
||||||
// compute # samples in the current face.
|
// compute # samples in the current face.
|
||||||
n_samples_decimal += 0.5*fi->DoubleArea() * n_samples_per_area_unit;
|
n_samples_decimal += 0.5*DoubleArea(*fi) * n_samples_per_area_unit;
|
||||||
n_samples = (int) n_samples_decimal;
|
n_samples = (int) n_samples_decimal;
|
||||||
if(n_samples)
|
if(n_samples)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue