diff --git a/examples/mayaViewer/hbrUtil.cpp b/examples/mayaViewer/hbrUtil.cpp index 16e1c299..918646ac 100644 --- a/examples/mayaViewer/hbrUtil.cpp +++ b/examples/mayaViewer/hbrUtil.cpp @@ -74,9 +74,9 @@ OpenSubdiv::OsdHbrMesh * ConvertToHBR(int nVertices, std::vector const & edgeCreases2, int interpBoundary, bool loop) { - static HbrBilinearSubdivision _bilinear; - static HbrLoopSubdivision _loop; - static HbrCatmarkSubdivision _catmark; + static OpenSubdiv::HbrBilinearSubdivision _bilinear; + static OpenSubdiv::HbrLoopSubdivision _loop; + static OpenSubdiv::HbrCatmarkSubdivision _catmark; OpenSubdiv::OsdHbrMesh *hbrMesh; if (loop) diff --git a/opensubdiv/hbr/allocator.h b/opensubdiv/hbr/allocator.h index 5d13f8db..1e35f6d1 100644 --- a/opensubdiv/hbr/allocator.h +++ b/opensubdiv/hbr/allocator.h @@ -57,6 +57,11 @@ #ifndef HBRALLOCATOR_H #define HBRALLOCATOR_H +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + typedef void (*HbrMemStatFunction)(unsigned long bytes); /** @@ -191,4 +196,9 @@ HbrAllocator::Deallocate(T * obj) { m_freecount++; } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRALLOCATOR_H */ diff --git a/opensubdiv/hbr/bilinear.h b/opensubdiv/hbr/bilinear.h index b04554d4..03f24933 100644 --- a/opensubdiv/hbr/bilinear.h +++ b/opensubdiv/hbr/bilinear.h @@ -60,6 +60,11 @@ /*#define HBR_DEBUG */ #include "../hbr/subdivision.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrBilinearSubdivision : public HbrSubdivision { public: @@ -917,4 +922,9 @@ HbrBilinearSubdivision::Subdivide(HbrMesh* mesh, HbrVertex* vertex) { return v; } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRBILINEAR_H */ diff --git a/opensubdiv/hbr/catmark.h b/opensubdiv/hbr/catmark.h index 4e94a0ee..9644309a 100644 --- a/opensubdiv/hbr/catmark.h +++ b/opensubdiv/hbr/catmark.h @@ -60,6 +60,11 @@ /*#define HBR_DEBUG */ #include "../hbr/subdivision.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrCatmarkSubdivision : public HbrSubdivision { public: @@ -1138,4 +1143,9 @@ HbrCatmarkSubdivision::Subdivide(HbrMesh* mesh, HbrVertex* vertex) { return v; } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRCATMARK_H */ diff --git a/opensubdiv/hbr/cornerEdit.h b/opensubdiv/hbr/cornerEdit.h index 867c7e89..840afde6 100644 --- a/opensubdiv/hbr/cornerEdit.h +++ b/opensubdiv/hbr/cornerEdit.h @@ -57,6 +57,11 @@ #ifndef HBRCORNEREDIT_H #define HBRCORNEREDIT_H +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrCornerEdit; template @@ -117,4 +122,9 @@ private: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRCORNEREDIT_H */ diff --git a/opensubdiv/hbr/creaseEdit.h b/opensubdiv/hbr/creaseEdit.h index 26407030..a15722cd 100644 --- a/opensubdiv/hbr/creaseEdit.h +++ b/opensubdiv/hbr/creaseEdit.h @@ -57,6 +57,11 @@ #ifndef HBRCREASEEDIT_H #define HBRCREASEEDIT_H +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrCreaseEdit; template @@ -119,4 +124,9 @@ private: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRCREASEEDIT_H */ diff --git a/opensubdiv/hbr/face.h b/opensubdiv/hbr/face.h index 9abbd139..4eabc8d8 100644 --- a/opensubdiv/hbr/face.h +++ b/opensubdiv/hbr/face.h @@ -71,6 +71,11 @@ #include "libgprims/stitchInternal.h" #endif +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrVertex; template class HbrHalfedge; template class HbrFace; @@ -349,8 +354,16 @@ private: unsigned short destroyed:1; }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #include "../hbr/mesh.h" +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template HbrFace::HbrFace() : mesh(0), id(-1), uindex(-1), ptexindex(-1), nvertices(0), extraedges(0), parent(0), children(0), vchild(0), fvarbits(0), @@ -771,4 +784,9 @@ public: virtual ~HbrFaceOperator() {} }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRFACE_H */ diff --git a/opensubdiv/hbr/faceEdit.h b/opensubdiv/hbr/faceEdit.h index 12c04e0c..d44cfd6f 100644 --- a/opensubdiv/hbr/faceEdit.h +++ b/opensubdiv/hbr/faceEdit.h @@ -59,6 +59,11 @@ #include "../hbr/hierarchicalEdit.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrFaceEdit; template @@ -141,4 +146,9 @@ private: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRFACEEDIT_H */ diff --git a/opensubdiv/hbr/fvarData.h b/opensubdiv/hbr/fvarData.h index 80a34a0c..93cd794c 100644 --- a/opensubdiv/hbr/fvarData.h +++ b/opensubdiv/hbr/fvarData.h @@ -60,6 +60,11 @@ #include #include +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrFVarEdit; template class HbrFace; @@ -179,8 +184,16 @@ private: float* const data; }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #include "../hbr/fvarEdit.h" +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template void HbrFVarData::ApplyFVarEdit(const HbrFVarEdit& edit) { @@ -202,4 +215,9 @@ HbrFVarData::ApplyFVarEdit(const HbrFVarEdit& edit) { } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRFVARDATA_H */ diff --git a/opensubdiv/hbr/fvarEdit.h b/opensubdiv/hbr/fvarEdit.h index f681f2fa..c119d441 100644 --- a/opensubdiv/hbr/fvarEdit.h +++ b/opensubdiv/hbr/fvarEdit.h @@ -60,6 +60,11 @@ #include "../hbr/hierarchicalEdit.h" #include "../hbr/vertexEdit.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrFVarEdit; template @@ -140,4 +145,9 @@ private: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRFVAREDIT_H */ diff --git a/opensubdiv/hbr/halfedge.h b/opensubdiv/hbr/halfedge.h index 63f6d7d7..1ee4470e 100644 --- a/opensubdiv/hbr/halfedge.h +++ b/opensubdiv/hbr/halfedge.h @@ -67,6 +67,11 @@ #include "libgprims/stitchInternal.h" #endif +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrFace; template class HbrHalfedge; template class HbrVertex; @@ -642,4 +647,9 @@ public: virtual ~HbrHalfedgeOperator() {} }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRHALFEDGE_H */ diff --git a/opensubdiv/hbr/hierarchicalEdit.h b/opensubdiv/hbr/hierarchicalEdit.h index 4ab3eb68..2c6709fa 100644 --- a/opensubdiv/hbr/hierarchicalEdit.h +++ b/opensubdiv/hbr/hierarchicalEdit.h @@ -57,6 +57,11 @@ #ifndef HBRHIERARCHICALEDIT_H #define HBRHIERARCHICALEDIT_H +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrHierarchicalEdit; template class HbrFace; template class HbrVertex; @@ -150,9 +155,17 @@ public: } }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #include "../hbr/face.h" #include +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template bool HbrHierarchicalEdit::IsRelevantToFace(HbrFace* face) const { @@ -182,4 +195,9 @@ HbrHierarchicalEdit::IsRelevantToFace(HbrFace* face) const { return true; } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRHIERARCHICALEDIT_H */ diff --git a/opensubdiv/hbr/holeEdit.h b/opensubdiv/hbr/holeEdit.h index 0bdfd377..9712c9f6 100644 --- a/opensubdiv/hbr/holeEdit.h +++ b/opensubdiv/hbr/holeEdit.h @@ -57,6 +57,11 @@ #ifndef HBRHOLEEDIT_H #define HBRHOLEEDIT_H +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrHoleEdit; template @@ -93,4 +98,9 @@ public: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRHOLEEDIT_H */ diff --git a/opensubdiv/hbr/loop.h b/opensubdiv/hbr/loop.h index 849ef504..10588a56 100644 --- a/opensubdiv/hbr/loop.h +++ b/opensubdiv/hbr/loop.h @@ -63,6 +63,11 @@ #include "../hbr/subdivision.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + /* #define HBR_DEBUG */ template @@ -994,4 +999,9 @@ HbrLoopSubdivision::refineFaceAtMiddle(HbrMesh* mesh, HbrFace* face) { } } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRLOOP_H */ diff --git a/opensubdiv/hbr/mesh.h b/opensubdiv/hbr/mesh.h index 11302b2f..8a2db9fe 100644 --- a/opensubdiv/hbr/mesh.h +++ b/opensubdiv/hbr/mesh.h @@ -79,6 +79,11 @@ #include "../hbr/creaseEdit.h" #include "../hbr/allocator.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrSubdivision; template class HbrMesh { @@ -394,10 +399,18 @@ private: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #include #include "../hbr/mesh.h" #include "../hbr/halfedge.h" +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template HbrMesh::HbrMesh(HbrSubdivision* s, int _fvarcount, const int *_fvarindices, const int *_fvarwidths, int _totalfvarwidth #ifdef HBRSTITCH @@ -1077,4 +1090,9 @@ HbrMesh::FreeTransientData() { } } +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRMESH_H */ diff --git a/opensubdiv/hbr/subdivision.h b/opensubdiv/hbr/subdivision.h index 723162d6..eaddec17 100644 --- a/opensubdiv/hbr/subdivision.h +++ b/opensubdiv/hbr/subdivision.h @@ -57,6 +57,11 @@ #ifndef HBRSUBDIVISION_H #define HBRSUBDIVISION_H +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrFace; template class HbrVertex; template class HbrHalfedge; @@ -291,4 +296,10 @@ HbrSubdivision::AddCreaseEdgesWithWeight(HbrMesh* mesh, HbrVertex* vert CreaseSubdivisionHalfedgeOperator op(vertex, data, mesh->HasVertexEdits(), next, weight); vertex->ApplyOperatorSurroundingEdges(op); } + +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRSUBDIVISION_H */ diff --git a/opensubdiv/hbr/vertex.h b/opensubdiv/hbr/vertex.h index 01b7e024..7949248c 100644 --- a/opensubdiv/hbr/vertex.h +++ b/opensubdiv/hbr/vertex.h @@ -64,6 +64,10 @@ #include "../hbr/fvarData.h" #include "../hbr/face.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { template class HbrHalfedge; template class HbrHalfedgeCompare; @@ -1496,5 +1500,10 @@ public: virtual ~HbrVertexOperator() {} }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRVERTEX_H */ diff --git a/opensubdiv/hbr/vertexEdit.h b/opensubdiv/hbr/vertexEdit.h index 9cff6394..b7d15a72 100644 --- a/opensubdiv/hbr/vertexEdit.h +++ b/opensubdiv/hbr/vertexEdit.h @@ -60,6 +60,11 @@ #include #include "../hbr/hierarchicalEdit.h" +#include "../version.h" + +namespace OpenSubdiv { +namespace OPENSUBDIV_VERSION { + template class HbrVertexEdit; template @@ -260,4 +265,9 @@ private: }; +} // end namespace OPENSUBDIV_VERSION +using namespace OPENSUBDIV_VERSION; + +} // end namespace OpenSubdiv + #endif /* HBRVERTEXEDIT_H */ diff --git a/regression/common/shape_utils.h b/regression/common/shape_utils.h index bee925ee..3d1d792c 100644 --- a/regression/common/shape_utils.h +++ b/regression/common/shape_utils.h @@ -108,7 +108,7 @@ struct shape { std::vector verts; std::vector uvs; std::vector nvertsPerFace; - std::vector faceverts; + std::vector faceverts; std::vector faceuvs; std::vector tags; }; @@ -137,28 +137,28 @@ shape::tag * shape::tag::parseTag(char const * line) { std::vector intargs; for (int i=0; i floatargs; for (int i=0; i stringargs; for (int i=0; itags.push_back(t); - } break; + s->tags.push_back(t); + } break; } } return s; @@ -228,16 +228,16 @@ shape * shape::parseShape(char const * shapestr, int axis ) { //------------------------------------------------------------------------------ template -void applyTags( HbrMesh * mesh, shape const * sh ) { +void applyTags( OpenSubdiv::HbrMesh * mesh, shape const * sh ) { for (int i=0; i<(int)sh->tags.size(); ++i) { shape::tag * t = sh->tags[i]; if (t->name=="crease") { for (int j=0; j<(int)t->intargs.size()-1; ++j) { - HbrVertex * v = mesh->GetVertex( t->intargs[j] ), - * w = mesh->GetVertex( t->intargs[j+1] ); - HbrHalfedge * e = 0; + OpenSubdiv::HbrVertex * v = mesh->GetVertex( t->intargs[j] ), + * w = mesh->GetVertex( t->intargs[j+1] ); + OpenSubdiv::HbrHalfedge * e = 0; if( v && w ) { if( !(e = v->GetEdge(w) ) ) e = w->GetEdge(v); @@ -250,7 +250,7 @@ void applyTags( HbrMesh * mesh, shape const * sh ) { } } else if (t->name=="corner") { for (int j=0; j<(int)t->intargs.size(); ++j) { - HbrVertex * v = mesh->GetVertex( t->intargs[j] ); + OpenSubdiv::HbrVertex * v = mesh->GetVertex( t->intargs[j] ); if(v) { int nfloat = (int) t->floatargs.size(); v->SetSharpness( std::max(0.0f, ((nfloat > 1) ? t->floatargs[j] : t->floatargs[0])) ); @@ -259,50 +259,52 @@ void applyTags( HbrMesh * mesh, shape const * sh ) { } } else if (t->name=="hole") { for (int j=0; j<(int)t->intargs.size(); ++j) { - HbrFace * f = mesh->GetFace( t->intargs[j] ); + OpenSubdiv::HbrFace * f = mesh->GetFace( t->intargs[j] ); if(f) { f->SetHole(); } else printf("cannot find face for hole tag (%d)\n", t->intargs[j] ); } } else if (t->name=="interpolateboundary") { - if ((int)t->intargs.size()!=1) { + if ((int)t->intargs.size()!=1) { printf("expecting 1 integer for \"interpolateboundary\" tag n. %d\n", i); continue; } - switch( t->intargs[0] ) - { case 0 : mesh->SetInterpolateBoundaryMethod(HbrMesh::k_InterpolateBoundaryNone); break; - case 1 : mesh->SetInterpolateBoundaryMethod(HbrMesh::k_InterpolateBoundaryEdgeAndCorner); break; - case 2 : mesh->SetInterpolateBoundaryMethod(HbrMesh::k_InterpolateBoundaryEdgeOnly); break; - default: printf("unknown interpolation boundary : %d\n", t->intargs[0] ); break; - } + switch( t->intargs[0] ) { + case 0 : mesh->SetInterpolateBoundaryMethod(OpenSubdiv::HbrMesh::k_InterpolateBoundaryNone); break; + case 1 : mesh->SetInterpolateBoundaryMethod(OpenSubdiv::HbrMesh::k_InterpolateBoundaryEdgeAndCorner); break; + case 2 : mesh->SetInterpolateBoundaryMethod(OpenSubdiv::HbrMesh::k_InterpolateBoundaryEdgeOnly); break; + default: printf("unknown interpolation boundary : %d\n", t->intargs[0] ); break; + } } else if (t->name=="facevaryingpropagatecorners") { - if ((int)t->intargs.size()==1) - mesh->SetFVarPropagateCorners( t->intargs[0] != 0 ); - else - printf( "expecting single int argument for \"facevaryingpropagatecorners\"\n" ); + if ((int)t->intargs.size()==1) + mesh->SetFVarPropagateCorners( t->intargs[0] != 0 ); + else + printf( "expecting single int argument for \"facevaryingpropagatecorners\"\n" ); } else if (t->name=="creasemethod") { - HbrCatmarkSubdivision * scheme = - dynamic_cast *>( mesh->GetSubdivision() ); - - if (not scheme) { - printf("the \"creasemethod\" tag can only be applied to Catmark meshes\n"); - continue; - } - - if ((int)t->stringargs.size()==0) { - printf("the \"creasemethod\" tag expects a string argument\n"); - continue; - } - + OpenSubdiv::HbrCatmarkSubdivision * scheme = + dynamic_cast *>( mesh->GetSubdivision() ); + + if (not scheme) { + printf("the \"creasemethod\" tag can only be applied to Catmark meshes\n"); + continue; + } + + if ((int)t->stringargs.size()==0) { + printf("the \"creasemethod\" tag expects a string argument\n"); + continue; + } + if( t->stringargs[0]=="normal" ) - scheme->SetTriangleSubdivisionMethod(HbrCatmarkSubdivision::k_Old); + scheme->SetTriangleSubdivisionMethod( + OpenSubdiv::HbrCatmarkSubdivision::k_Old); else if( t->stringargs[0]=="chaikin" ) - scheme->SetTriangleSubdivisionMethod(HbrCatmarkSubdivision::k_New); - else - printf("the \"creasemethod\" tag only accepts \"normal\" or \"chaikin\" as value (%s)\n", t->stringargs[0].c_str()); - + scheme->SetTriangleSubdivisionMethod( + OpenSubdiv::HbrCatmarkSubdivision::k_New); + else + printf("the \"creasemethod\" tag only accepts \"normal\" or \"chaikin\" as value (%s)\n", t->stringargs[0].c_str()); + } else if (t->name=="vertexedit" or t->name=="edgeedit") { printf("hierarchical edits not supported (yet)\n"); } else { @@ -319,19 +321,19 @@ enum Scheme { }; //------------------------------------------------------------------------------ -template HbrMesh * +template OpenSubdiv::HbrMesh * createMesh( Scheme scheme=kCatmark) { - HbrMesh * mesh = 0; + OpenSubdiv::HbrMesh * mesh = 0; - static HbrBilinearSubdivision _bilinear; - static HbrLoopSubdivision _loop; - static HbrCatmarkSubdivision _catmark; + static OpenSubdiv::HbrBilinearSubdivision _bilinear; + static OpenSubdiv::HbrLoopSubdivision _loop; + static OpenSubdiv::HbrCatmarkSubdivision _catmark; switch (scheme) { - case kBilinear : mesh = new HbrMesh( &_bilinear ); break; - case kLoop : mesh = new HbrMesh( &_loop ); break; - case kCatmark : mesh = new HbrMesh( &_catmark ); break; + case kBilinear : mesh = new OpenSubdiv::HbrMesh( &_bilinear ); break; + case kLoop : mesh = new OpenSubdiv::HbrMesh( &_loop ); break; + case kCatmark : mesh = new OpenSubdiv::HbrMesh( &_catmark ); break; } return mesh; @@ -339,7 +341,7 @@ createMesh( Scheme scheme=kCatmark) { //------------------------------------------------------------------------------ template void -createVertices( shape const * sh, HbrMesh * mesh ) { +createVertices( shape const * sh, OpenSubdiv::HbrMesh * mesh ) { T v; for(int i=0;igetNverts(); i++ ) { @@ -350,7 +352,7 @@ createVertices( shape const * sh, HbrMesh * mesh ) { //------------------------------------------------------------------------------ template void -createVertices( shape const * sh, HbrMesh * mesh, std::vector & verts ) { +createVertices( shape const * sh, OpenSubdiv::HbrMesh * mesh, std::vector & verts ) { int nverts = sh->getNverts(); verts.resize(nverts*3); @@ -367,7 +369,7 @@ createVertices( shape const * sh, HbrMesh * mesh, std::vector & verts //------------------------------------------------------------------------------ template void -createTopology( shape const * sh, HbrMesh * mesh, Scheme scheme) { +createTopology( shape const * sh, OpenSubdiv::HbrMesh * mesh, Scheme scheme) { const int * fv=&(sh->faceverts[0]); for(int f=0, ptxidx=0;fgetNfaces(); f++ ) { @@ -380,9 +382,9 @@ createTopology( shape const * sh, HbrMesh * mesh, Scheme scheme) { } for(int j=0;j * origin = mesh->GetVertex( fv[j] ); - HbrVertex * destination = mesh->GetVertex( fv[ (j+1)%nv] ); - HbrHalfedge * opposite = destination->GetEdge(origin); + OpenSubdiv::HbrVertex * origin = mesh->GetVertex( fv[j] ); + OpenSubdiv::HbrVertex * destination = mesh->GetVertex( fv[ (j+1)%nv] ); + OpenSubdiv::HbrHalfedge * opposite = destination->GetEdge(origin); if(origin==NULL || destination==NULL) { printf(" An edge was specified that connected a nonexistent vertex\n"); @@ -406,7 +408,7 @@ createTopology( shape const * sh, HbrMesh * mesh, Scheme scheme) { } } - HbrFace * face = mesh->NewFace(nv, (int *)fv, 0); + OpenSubdiv::HbrFace * face = mesh->NewFace(nv, (int *)fv, 0); face->SetPtexIndex(ptxidx); @@ -424,12 +426,12 @@ createTopology( shape const * sh, HbrMesh * mesh, Scheme scheme) { } //------------------------------------------------------------------------------ -template HbrMesh * +template OpenSubdiv::HbrMesh * simpleHbr( char const * shapestr, Scheme scheme=kCatmark) { shape * sh = shape::parseShape( shapestr ); - HbrMesh * mesh = createMesh(scheme); + OpenSubdiv::HbrMesh * mesh = createMesh(scheme); createVertices(sh, mesh); @@ -441,12 +443,12 @@ simpleHbr( char const * shapestr, Scheme scheme=kCatmark) { } //------------------------------------------------------------------------------ -template HbrMesh * +template OpenSubdiv::HbrMesh * simpleHbr( char const * shapestr, std::vector & verts, Scheme scheme=kCatmark) { shape * sh = shape::parseShape( shapestr ); - HbrMesh * mesh = createMesh(scheme); + OpenSubdiv::HbrMesh * mesh = createMesh(scheme); createVertices(sh, mesh, verts); diff --git a/regression/far_regression/main.cpp b/regression/far_regression/main.cpp index 26027f06..01cf06c8 100644 --- a/regression/far_regression/main.cpp +++ b/regression/far_regression/main.cpp @@ -104,12 +104,12 @@ private: //------------------------------------------------------------------------------ class xyzFV; -typedef HbrMesh xyzmesh; -typedef HbrFace xyzface; -typedef HbrVertex xyzvertex; -typedef HbrHalfedge xyzhalfedge; -typedef HbrFaceOperator xyzFaceOperator; -typedef HbrVertexOperator xyzVertexOperator; +typedef OpenSubdiv::HbrMesh xyzmesh; +typedef OpenSubdiv::HbrFace xyzface; +typedef OpenSubdiv::HbrVertex xyzvertex; +typedef OpenSubdiv::HbrHalfedge xyzhalfedge; +typedef OpenSubdiv::HbrFaceOperator xyzFaceOperator; +typedef OpenSubdiv::HbrVertexOperator xyzVertexOperator; typedef OpenSubdiv::FarMesh fMesh; typedef OpenSubdiv::FarMeshFactory fMeshFactory;