start to cleaning up the sample folder
This commit is contained in:
parent
421ae17fb4
commit
ee675f4f01
|
@ -1,71 +0,0 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include <vcg/space/color4.h>
|
|
||||||
#include <vcg/space/index/grid_static_ptr.h>
|
|
||||||
#include <vcg/simplex/vertex/base.h>
|
|
||||||
#include <vcg/simplex/vertex/component.h>
|
|
||||||
#include <vcg/simplex/edge/base.h>
|
|
||||||
#include <vcg/simplex/edge/component.h>
|
|
||||||
#include <vcg/complex/edgemesh/base.h>
|
|
||||||
#include <vcg/complex/edgemesh/allocate.h>
|
|
||||||
#include <vcg/complex/edgemesh/update/bounding.h>
|
|
||||||
#include <vcg/complex/edgemesh/closest.h>
|
|
||||||
#include <vcg/complex/trimesh/closest.h>
|
|
||||||
#include <vcg/complex/used_types.h>
|
|
||||||
|
|
||||||
//
|
|
||||||
//using namespace std;
|
|
||||||
//
|
|
||||||
class MyFace;
|
|
||||||
class MyEdge;
|
|
||||||
class MyVertex;
|
|
||||||
struct MyUsedTypes : public vcg::UsedTypes< vcg::Use<MyVertex> ::AsVertexType,
|
|
||||||
vcg::Use<MyEdge> ::AsEdgeType,
|
|
||||||
vcg::Use<MyFace> ::AsFaceType>{};
|
|
||||||
|
|
||||||
class MyVertex : public vcg::Vertex<MyUsedTypes,vcg::vertex::BitFlags,vcg::vertex::Coord3f> {};
|
|
||||||
class MyEdge : public vcg::Edge<MyUsedTypes,vcg::edge::Mark,vcg::edge::VertexRef,vcg::edge::BitFlags> {};
|
|
||||||
class MyEdgeMesh: public vcg::edg::EdgeMesh< std::vector<MyVertex>, std::vector<MyEdge> > {};
|
|
||||||
|
|
||||||
typedef vcg::GridStaticPtr<MyEdge, MyEdge::ScalarType> EdgeMeshGrid;
|
|
||||||
|
|
||||||
#define VERT_NUMB 100
|
|
||||||
|
|
||||||
int main(int , char **)
|
|
||||||
{
|
|
||||||
//create a random mesh of edge
|
|
||||||
MyEdgeMesh em;
|
|
||||||
srand(1000);
|
|
||||||
em.vert.reserve(VERT_NUMB);
|
|
||||||
for (int i=0;i<VERT_NUMB;i=i+2)
|
|
||||||
{
|
|
||||||
float x0=((float)rand()/(float)RAND_MAX)*1000.f;
|
|
||||||
float y0=((float)rand()/(float)RAND_MAX)*1000.f;
|
|
||||||
float z0=((float)rand()/(float)RAND_MAX)*1000.f;
|
|
||||||
float x1=((float)rand()/(float)RAND_MAX)*1000.f;
|
|
||||||
float y1=((float)rand()/(float)RAND_MAX)*1000.f;
|
|
||||||
float z1=((float)rand()/(float)RAND_MAX)*1000.f;
|
|
||||||
em.vert.push_back(MyVertex());
|
|
||||||
MyVertex *v0=&em.vert.back();
|
|
||||||
em.vert.push_back(MyVertex());
|
|
||||||
MyVertex *v1=&em.vert.back();
|
|
||||||
v0->P().X()=x0;
|
|
||||||
v0->P().Y()=y0;
|
|
||||||
v0->P().Z()=z0;
|
|
||||||
v1->P().X()=x1;
|
|
||||||
v1->P().Y()=y1;
|
|
||||||
v1->P().Z()=z1;
|
|
||||||
em.edges.push_back(MyEdge());
|
|
||||||
MyEdge *e=&em.edges.back();
|
|
||||||
e->V(0)=v0;
|
|
||||||
e->V(1)=v1;
|
|
||||||
}
|
|
||||||
vcg::edg::UpdateBounding<MyEdgeMesh>::Box(em);
|
|
||||||
EdgeMeshGrid static_grid;
|
|
||||||
static_grid.Set(em.edges.begin(), em.edges.end());
|
|
||||||
float dist;
|
|
||||||
vcg::Point3f p;
|
|
||||||
MyEdge *e=vcg::edgemesh::GetClosestEdge<MyEdgeMesh,EdgeMeshGrid>(em,static_grid,vcg::Point3f(500,500,500),1000,dist,p);
|
|
||||||
std::vector<MyEdge*> ret;
|
|
||||||
int num=vcg::edgemesh::GetInBoxEdge<MyEdgeMesh,EdgeMeshGrid,std::vector<MyEdge*> >(em,static_grid,em.bbox,ret);
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_base", "trimesh_base\trimesh_base.vcproj", "{0B7F680B-ED20-3001-B9BE-1EDAFE545C64}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_topology", "trimesh_topology\trimesh_topology.vcproj", "{627E5101-FB98-3026-850E-BAF0DD88A5CE}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_smooth", "trimesh_smooth\trimesh_smooth.vcproj", "{1F2E5C6D-8394-3AC5-83F4-C2947B31B607}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_refine", "trimesh_refine\trimesh_refine.vcproj", "{831831A5-C915-3439-8BD1-CA15B529BDB3}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_isosurface", "trimesh_isosurface\trimesh_isosurface.vcproj", "{A52CB564-AC7F-34E5-90E5-07F879D5DD3D}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_join", "trimesh_join\trimesh_join.vcproj", "{EFE483ED-FBB7-34A3-B4D6-C229F5595B0D}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trimesh_optional", "trimesh_optional\trimesh_optional.vcproj", "{193DB083-9ACA-3E9B-A911-762040E04820}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aabb_binary_tree", "aabb_binary_tree\aabb_binary_tree.vcproj", "{22BA9CD4-30BB-30C5-A6FB-B7A015B32721}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfiguration) = preSolution
|
|
||||||
ConfigName.0 = Debug
|
|
||||||
ConfigName.1 = Release
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectDependencies) = postSolution
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfiguration) = postSolution
|
|
||||||
{0B7F680B-ED20-3001-B9BE-1EDAFE545C64}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{0B7F680B-ED20-3001-B9BE-1EDAFE545C64}.Debug.Build.0 = Debug|Win32
|
|
||||||
{0B7F680B-ED20-3001-B9BE-1EDAFE545C64}.Release.ActiveCfg = Release|Win32
|
|
||||||
{0B7F680B-ED20-3001-B9BE-1EDAFE545C64}.Release.Build.0 = Release|Win32
|
|
||||||
{627E5101-FB98-3026-850E-BAF0DD88A5CE}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{627E5101-FB98-3026-850E-BAF0DD88A5CE}.Debug.Build.0 = Debug|Win32
|
|
||||||
{627E5101-FB98-3026-850E-BAF0DD88A5CE}.Release.ActiveCfg = Release|Win32
|
|
||||||
{627E5101-FB98-3026-850E-BAF0DD88A5CE}.Release.Build.0 = Release|Win32
|
|
||||||
{1F2E5C6D-8394-3AC5-83F4-C2947B31B607}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{1F2E5C6D-8394-3AC5-83F4-C2947B31B607}.Debug.Build.0 = Debug|Win32
|
|
||||||
{1F2E5C6D-8394-3AC5-83F4-C2947B31B607}.Release.ActiveCfg = Release|Win32
|
|
||||||
{1F2E5C6D-8394-3AC5-83F4-C2947B31B607}.Release.Build.0 = Release|Win32
|
|
||||||
{831831A5-C915-3439-8BD1-CA15B529BDB3}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{831831A5-C915-3439-8BD1-CA15B529BDB3}.Debug.Build.0 = Debug|Win32
|
|
||||||
{831831A5-C915-3439-8BD1-CA15B529BDB3}.Release.ActiveCfg = Release|Win32
|
|
||||||
{831831A5-C915-3439-8BD1-CA15B529BDB3}.Release.Build.0 = Release|Win32
|
|
||||||
{A52CB564-AC7F-34E5-90E5-07F879D5DD3D}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{A52CB564-AC7F-34E5-90E5-07F879D5DD3D}.Debug.Build.0 = Debug|Win32
|
|
||||||
{A52CB564-AC7F-34E5-90E5-07F879D5DD3D}.Release.ActiveCfg = Release|Win32
|
|
||||||
{A52CB564-AC7F-34E5-90E5-07F879D5DD3D}.Release.Build.0 = Release|Win32
|
|
||||||
{EFE483ED-FBB7-34A3-B4D6-C229F5595B0D}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{EFE483ED-FBB7-34A3-B4D6-C229F5595B0D}.Debug.Build.0 = Debug|Win32
|
|
||||||
{EFE483ED-FBB7-34A3-B4D6-C229F5595B0D}.Release.ActiveCfg = Release|Win32
|
|
||||||
{EFE483ED-FBB7-34A3-B4D6-C229F5595B0D}.Release.Build.0 = Release|Win32
|
|
||||||
{193DB083-9ACA-3E9B-A911-762040E04820}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{193DB083-9ACA-3E9B-A911-762040E04820}.Debug.Build.0 = Debug|Win32
|
|
||||||
{193DB083-9ACA-3E9B-A911-762040E04820}.Release.ActiveCfg = Release|Win32
|
|
||||||
{193DB083-9ACA-3E9B-A911-762040E04820}.Release.Build.0 = Release|Win32
|
|
||||||
{22BA9CD4-30BB-30C5-A6FB-B7A015B32721}.Debug.ActiveCfg = Debug|Win32
|
|
||||||
{22BA9CD4-30BB-30C5-A6FB-B7A015B32721}.Debug.Build.0 = Debug|Win32
|
|
||||||
{22BA9CD4-30BB-30C5-A6FB-B7A015B32721}.Release.ActiveCfg = Release|Win32
|
|
||||||
{22BA9CD4-30BB-30C5-A6FB-B7A015B32721}.Release.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
Loading…
Reference in New Issue