Add correct OpenSubdiv namespace begin/end blocks.

This commit is contained in:
gelder 2014-04-21 10:25:38 -07:00
parent feb74f51f0
commit 2545306e21
10 changed files with 88 additions and 32 deletions

View File

@ -40,9 +40,10 @@
#include <fstream>
#include <iostream>
using namespace OpenSubdiv;
using namespace std;
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
OsdUtilAdaptiveEvaluator::OsdUtilAdaptiveEvaluator():
_refiner(NULL),
@ -384,8 +385,5 @@ OsdUtilAdaptiveEvaluator::GetRefinedTopology(
return out->IsValid(errorMessage);
}
} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv

View File

@ -22,8 +22,10 @@
// language governing permissions and limitations under the Apache License.
//
#ifndef PXOSDUTIL_ADAPTIVE_EVALUATOR_H
#define PXOSDUTIL_ADAPTIVE_EVALUATOR_H
#ifndef OSDUTIL_ADAPTIVE_EVALUATOR_H
#define OSDUTIL_ADAPTIVE_EVALUATOR_H
#include "../version.h"
#include "refiner.h"
@ -38,6 +40,9 @@
#include "../osd/cpuEvalLimitContext.h"
#include "../far/mesh.h"
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
// This class takes a mesh that has undergone adaptive refinement to
// create bspline and gregory patches to a fixed subdivision level,
// and creates required run time OpenSubdiv data structures used to
@ -138,6 +143,10 @@ class OsdUtilAdaptiveEvaluator {
};
} // end namespace OPENSUBDIV_VERSION
using namespace OPENSUBDIV_VERSION;
} // end namespace OpenSubdiv
#endif /* PXOSDUTIL_ADAPTIVE_EVALUATOR_H */
#endif /* OSDUTIL_ADAPTIVE_EVALUATOR_H */

View File

@ -33,8 +33,8 @@
#include <sstream>
using namespace std;
using namespace OpenSubdiv;
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
template <class T>
static bool _ProcessTagsAndFinishMesh(
@ -486,3 +486,5 @@ template class OsdUtilMesh<OsdVertex>;
//template class OsdUtilMesh<FarStencilFactoryVertex>;
template class OsdUtilMesh<FarStencilFactoryVertex>;
} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv

View File

@ -22,12 +22,12 @@
// language governing permissions and limitations under the Apache License.
//
#ifndef PX_OSD_UTIL_MESH_H
#define PX_OSD_UTIL_MESH_H
#include "topology.h"
#ifndef OSD_UTIL_MESH_H
#define OSD_UTIL_MESH_H
#include "../version.h"
#include "topology.h"
#include <string>
#include <map>
@ -49,7 +49,9 @@ namespace OPENSUBDIV_VERSION {
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
// This class is reponsible for taking a topological description of a mesh
// defined by OsdUtilSubdivTopology and turn that into a halfedge mesh
// with detailed connectivity information for mesh traversal. A OsdUtilMesh
@ -101,4 +103,10 @@ private:
};
#endif /* PX_OSD_UTIL_MESH_H */
} // end namespace OPENSUBDIV_VERSION
using namespace OPENSUBDIV_VERSION;
} // end namespace OpenSubdiv
#endif /* OSD_UTIL_MESH_H */

View File

@ -32,8 +32,10 @@
#include <iostream>
#include <sstream>
using namespace OpenSubdiv;
using namespace std;
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
//------------------------------------------------------------------------------
@ -297,5 +299,6 @@ OsdUtilRefiner::GetHbrMesh()
return NULL;
}
}
} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv

View File

@ -22,8 +22,10 @@
// language governing permissions and limitations under the Apache License.
//
#ifndef PXOSDUTIL_REFINER_H
#define PXOSDUTIL_REFINER_H
#ifndef OSDUTIL_REFINER_H
#define OSDUTIL_REFINER_H
#include "../version.h"
#include "mesh.h"
@ -38,6 +40,9 @@
#include "../osd/cpuComputeContext.h"
#include "../far/mesh.h"
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
//----------------------------------------------------------------------------
// A simple class that wraps several OpenSubdiv classes for tessellating
// a subdivision surface into quads and extracting position and topology
@ -148,5 +153,9 @@ class OsdUtilRefiner {
};
} // end namespace OPENSUBDIV_VERSION
using namespace OPENSUBDIV_VERSION;
#endif /* PXOSDUTIL_REFINER_H */
} // end namespace OpenSubdiv
#endif /* OSDUTIL_REFINER_H */

View File

@ -31,6 +31,8 @@
#include <string.h>
using namespace std;
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
OsdUtilSubdivTopology::OsdUtilSubdivTopology():
name("noname"),
@ -423,3 +425,7 @@ OsdUtilSubdivTopology::WriteObjFile(
return true;
}
} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv

View File

@ -21,13 +21,16 @@
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
#ifndef PX_OSD_UTIL_TOPOLOGY_H
#define PX_OSD_UTIL_TOPOLOGY_H
#ifndef OSDUTIL_TOPOLOGY_H
#define OSDUTIL_TOPOLOGY_H
#include "../version.h"
#include <vector>
#include <string>
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
// A value struct that holds annotations on a subdivision surface
// such as creases, boundaries, holes, corners, hierarchical edits, etc.
@ -160,6 +163,10 @@ class OsdUtilSubdivTopology {
};
} // end namespace OPENSUBDIV_VERSION
using namespace OPENSUBDIV_VERSION;
} // end namespace OpenSubdiv
#endif /* PX_OSD_UTIL_TOPOLOGY_H */
#endif /* OSDUTIL_TOPOLOGY_H */

View File

@ -40,10 +40,11 @@
#include <fstream>
#include <iostream>
using namespace OpenSubdiv;
using namespace std;
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
OsdUtilUniformEvaluator::OsdUtilUniformEvaluator():
_refiner(NULL),
_ownsRefiner(false),
@ -346,3 +347,8 @@ OsdUtilUniformEvaluator::GetRefinedTopology(
return t->IsValid(errorMessage);
}
} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv

View File

@ -22,8 +22,10 @@
// language governing permissions and limitations under the Apache License.
//
#ifndef PXOSDUTIL_UNIFORM_EVALUATOR_H
#define PXOSDUTIL_UNIFORM_EVALUATOR_H
#ifndef OSDUTIL_UNIFORM_EVALUATOR_H
#define OSDUTIL_UNIFORM_EVALUATOR_H
#include "../version.h"
#include "refiner.h"
@ -36,6 +38,9 @@
#include "../osd/cpuComputeContext.h"
#include "../far/mesh.h"
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {
// This class takes a mesh that has undergone uniform refinement to
// a fixed subdivision level, and creates required run time OpenSubdiv
// data structures used to sample values on subdivision surfaces.
@ -180,6 +185,9 @@ class OsdUtilUniformEvaluator {
OpenSubdiv::OsdCpuVertexBuffer *_vvBuffer;
};
} // end namespace OPENSUBDIV_VERSION
using namespace OPENSUBDIV_VERSION;
} // end namespace OpenSubdiv
#endif /* PXOSDUTIL_UNIFORM_EVALUATOR_H */
#endif /* OSDUTIL_UNIFORM_EVALUATOR_H */