use double as default RealType for subdividers
This commit is contained in:
@@ -88,7 +88,7 @@ namespace Uniform { // BEGIN_NS_UNIFORM
|
|||||||
|
|
||||||
\note Needs a PolyMesh to work on!
|
\note Needs a PolyMesh to work on!
|
||||||
*/
|
*/
|
||||||
template <typename MeshType, typename RealType = float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class CatmullClarkT : public SubdividerT< MeshType, RealType >
|
class CatmullClarkT : public SubdividerT< MeshType, RealType >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace Uniform { // BEGIN_NS_DECIMATER
|
|||||||
|
|
||||||
/** Uniform composite Loop subdivision algorithm
|
/** Uniform composite Loop subdivision algorithm
|
||||||
*/
|
*/
|
||||||
template <class MeshType, class RealType=float>
|
template <class MeshType, class RealType = double>
|
||||||
class CompositeLoopT : public CompositeT<MeshType, RealType>
|
class CompositeLoopT : public CompositeT<MeshType, RealType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace Uniform { // BEGIN_NS_UNIFORM
|
|||||||
|
|
||||||
/** Uniform composite sqrt(3) subdivision algorithm
|
/** Uniform composite sqrt(3) subdivision algorithm
|
||||||
*/
|
*/
|
||||||
template <typename MeshType, typename RealType=float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class CompositeSqrt3T : public CompositeT<MeshType, RealType>
|
class CompositeSqrt3T : public CompositeT<MeshType, RealType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace Uniform { // BEGIN_NS_UNIFORM
|
|||||||
|
|
||||||
//== CLASS DEFINITION =========================================================
|
//== CLASS DEFINITION =========================================================
|
||||||
|
|
||||||
template <typename MeshType, typename RealType = float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class CompareLengthFunction {
|
class CompareLengthFunction {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ namespace Uniform { // BEGIN_NS_DECIMATER
|
|||||||
* M.S. Thesis, Department of Mathematics, University of Utah, August 1987.
|
* M.S. Thesis, Department of Mathematics, University of Utah, August 1987.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <typename MeshType, typename RealType = float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class LoopT : public SubdividerT<MeshType, RealType>
|
class LoopT : public SubdividerT<MeshType, RealType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ namespace Uniform { // BEGIN_NS_UNIFORM
|
|||||||
*
|
*
|
||||||
* Clement Courbet - clement.courbet@ecp.fr
|
* Clement Courbet - clement.courbet@ecp.fr
|
||||||
*/
|
*/
|
||||||
template <typename MeshType, typename RealType = float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class ModifiedButterflyT : public SubdividerT<MeshType, RealType>
|
class ModifiedButterflyT : public SubdividerT<MeshType, RealType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ namespace Uniform { // BEGIN_NS_UNIFORM
|
|||||||
* Clement Courbet - clement.courbet@ecp.fr
|
* Clement Courbet - clement.courbet@ecp.fr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <typename MeshType, typename RealType = float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class InterpolatingSqrt3LGT : public SubdividerT< MeshType, RealType >
|
class InterpolatingSqrt3LGT : public SubdividerT< MeshType, RealType >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ namespace Uniform { // BEGIN_NS_DECIMATER
|
|||||||
*
|
*
|
||||||
* L. Kobbelt, <a href="http://www-i8.informatik.rwth-aachen.de/publications/downloads/sqrt3.pdf">"Sqrt(3) subdivision"</a>, Proceedings of SIGGRAPH 2000.
|
* L. Kobbelt, <a href="http://www-i8.informatik.rwth-aachen.de/publications/downloads/sqrt3.pdf">"Sqrt(3) subdivision"</a>, Proceedings of SIGGRAPH 2000.
|
||||||
*/
|
*/
|
||||||
template <typename MeshType, typename RealType = float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class Sqrt3T : public SubdividerT< MeshType, RealType >
|
class Sqrt3T : public SubdividerT< MeshType, RealType >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -79,18 +79,17 @@ namespace OpenMesh {
|
|||||||
namespace Subdivider {
|
namespace Subdivider {
|
||||||
namespace Uniform {
|
namespace Uniform {
|
||||||
|
|
||||||
|
|
||||||
//== CLASS DEFINITION =========================================================
|
//== CLASS DEFINITION =========================================================
|
||||||
|
|
||||||
/** Abstract base class for uniform subdivision algorithms.
|
/** Abstract base class for uniform subdivision algorithms.
|
||||||
*
|
*
|
||||||
* A derived class must overload the following functions:
|
* A derived class must overload the following functions:
|
||||||
* -# name()
|
* -# const char* name() const
|
||||||
* -# prepare()
|
* -# void prepare(MeshType&)
|
||||||
* -# subdivide()
|
* -# void subdivide(MeshType&, size_t, bool)
|
||||||
* -# cleanup()
|
* -# void cleanup(MeshType&)
|
||||||
*/
|
*/
|
||||||
template <typename MeshType, typename RealType=float>
|
template <typename MeshType, typename RealType = double>
|
||||||
class SubdividerT : private Utils::Noncopyable
|
class SubdividerT : private Utils::Noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -104,15 +103,15 @@ public:
|
|||||||
//@{
|
//@{
|
||||||
/// Constructor to be used with interface 2
|
/// Constructor to be used with interface 2
|
||||||
/// \see attach(), operator()(size_t), detach()
|
/// \see attach(), operator()(size_t), detach()
|
||||||
SubdividerT(void) : attached_(NULL) { }
|
SubdividerT(void) : attached_(nullptr) { }
|
||||||
|
|
||||||
/// Constructor to be used with interface 1 (calls attach())
|
/// Constructor to be used with interface 1 (calls attach())
|
||||||
/// \see operator()( MeshType&, size_t )
|
/// \see operator()( MeshType&, size_t )
|
||||||
SubdividerT( MeshType &_m ) : attached_(NULL) { attach(_m); }
|
SubdividerT( MeshType &_m ) : attached_(nullptr) { attach(_m); }
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/// Descructor (calls detach())
|
/// Destructor (calls detach())
|
||||||
virtual ~SubdividerT()
|
virtual ~SubdividerT()
|
||||||
{ detach(); }
|
{ detach(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user