resolved some compilation issues
This commit is contained in:
parent
8e321de2a8
commit
274a391b1a
|
@ -10,6 +10,24 @@
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
namespace tri {
|
namespace tri {
|
||||||
|
|
||||||
|
//class SphereEdge;
|
||||||
|
class SphereFace;
|
||||||
|
class SphereVertex;
|
||||||
|
|
||||||
|
struct SphereUsedTypes : public vcg::UsedTypes< vcg::Use<SphereVertex>::AsVertexType,
|
||||||
|
vcg::Use<SphereFace>::AsFaceType>{};
|
||||||
|
|
||||||
|
class SphereVertex : public vcg::Vertex< SphereUsedTypes,
|
||||||
|
vcg::vertex::Coord3f,
|
||||||
|
vcg::vertex::Normal3f,
|
||||||
|
vcg::vertex::BitFlags>{};
|
||||||
|
|
||||||
|
class SphereFace : public vcg::Face< SphereUsedTypes, vcg::face::VertexRef,
|
||||||
|
vcg::face::Normal3f,vcg::face::Mark,
|
||||||
|
vcg::face::BitFlags,vcg::face::FFAdj> {};
|
||||||
|
|
||||||
|
class SphereMesh : public vcg::tri::TriMesh< std::vector<SphereVertex>, std::vector<SphereFace> > {};
|
||||||
|
|
||||||
template <class TriMeshType>
|
template <class TriMeshType>
|
||||||
class ExtrinsicPlaneSymmetry
|
class ExtrinsicPlaneSymmetry
|
||||||
{
|
{
|
||||||
|
@ -28,8 +46,11 @@ class ExtrinsicPlaneSymmetry
|
||||||
|
|
||||||
std::vector<ScalarType> Votes;
|
std::vector<ScalarType> Votes;
|
||||||
|
|
||||||
TriMeshType *sphere;
|
|
||||||
typename vcg::GridStaticPtr<FaceType> GridSph;
|
|
||||||
|
SphereMesh *sphere;
|
||||||
|
|
||||||
|
typename vcg::GridStaticPtr<SphereFace> GridSph;
|
||||||
|
|
||||||
ScalarType RadiusInterval;
|
ScalarType RadiusInterval;
|
||||||
ScalarType MaxRadius;
|
ScalarType MaxRadius;
|
||||||
|
@ -50,7 +71,7 @@ class ExtrinsicPlaneSymmetry
|
||||||
ScalarType MaxD=sphere->bbox.Diag();
|
ScalarType MaxD=sphere->bbox.Diag();
|
||||||
ScalarType MinD;
|
ScalarType MinD;
|
||||||
CoordType ClosePt;
|
CoordType ClosePt;
|
||||||
FaceType *choosen=NULL;
|
SphereFace *choosen=NULL;
|
||||||
choosen=vcg::tri::GetClosestFaceBase(*sphere,GridSph,Direction,MaxD,MinD,ClosePt);
|
choosen=vcg::tri::GetClosestFaceBase(*sphere,GridSph,Direction,MaxD,MinD,ClosePt);
|
||||||
assert(choosen!=NULL);
|
assert(choosen!=NULL);
|
||||||
int IndexF=choosen-&(sphere->face[0]);
|
int IndexF=choosen-&(sphere->face[0]);
|
||||||
|
@ -175,11 +196,11 @@ public:
|
||||||
if (sphere!=NULL)
|
if (sphere!=NULL)
|
||||||
sphere->Clear();
|
sphere->Clear();
|
||||||
else
|
else
|
||||||
sphere=new TriMeshType();
|
sphere=new SphereMesh();
|
||||||
|
|
||||||
//create the sphere
|
//create the sphere
|
||||||
vcg::tri::Sphere<TriMeshType>(*sphere,SubDirections);
|
vcg::tri::Sphere<SphereMesh>(*sphere,SubDirections);
|
||||||
sphere->UpdateAttributes();
|
vcg::tri::UpdateBounding<SphereMesh>::Box(*sphere);
|
||||||
|
|
||||||
///initialize grid
|
///initialize grid
|
||||||
GridSph.Set(sphere->face.begin(),sphere->face.end());
|
GridSph.Set(sphere->face.begin(),sphere->face.end());
|
||||||
|
|
Loading…
Reference in New Issue