Work on mesh decimation.

This commit is contained in:
David Williams
2007-09-18 15:41:59 +00:00
parent 377b7a5cdd
commit 336eba9680
6 changed files with 82 additions and 23 deletions

View File

@ -5,14 +5,14 @@
namespace Ogre
{
SurfaceEdge::SurfaceEdge()
:hasOtherHalfEdge(false)
:hasTriangle(false)
{
}
std::string SurfaceEdge::toString(void)
{
std::stringstream ss;
ss << "SurfaceEdge: Target Vertex = " << target->toString();
ss << "SurfaceEdge: Target Vertex = " << target->toString() << "Source Vertex = " << otherHalfEdge->target->toString();
return ss.str();
}
@ -21,7 +21,8 @@ namespace Ogre
return
(
(lhs.target == rhs.target) &&
(lhs.triangle == rhs.triangle)
//(lhs.triangle == rhs.triangle)
(lhs.otherHalfEdge->target == rhs.otherHalfEdge->target)
);
}
@ -29,11 +30,11 @@ namespace Ogre
{
if(lhs.target == rhs.target)
{
if(lhs.triangle == rhs.triangle)
if(lhs.otherHalfEdge->target == rhs.otherHalfEdge->target)
{
return false;
}
return (*(lhs.triangle) < *(rhs.triangle));
return (*(lhs.otherHalfEdge->target) < *(rhs.otherHalfEdge->target));
}
return (*(lhs.target) < *(rhs.target));
}