Cleaning up decimation.

This commit is contained in:
David Williams
2007-09-27 23:17:27 +00:00
parent f82aaad082
commit 780f52dd9e
4 changed files with 29 additions and 14 deletions

View File

@ -19,10 +19,12 @@ namespace Ogre
bool operator == (const SurfaceEdge& lhs, const SurfaceEdge& rhs)
{
//Vertices are unique in the set, so if the two positions are the same the
//two iterators must also be the same. So we just check the iterators.
return
(
((*lhs.target) == (*rhs.target)) &&
((*lhs.source) == (*rhs.source))
(lhs.target == rhs.target) &&
(lhs.source == rhs.source)
);
}
@ -33,6 +35,8 @@ namespace Ogre
bool operator < (const SurfaceEdge& lhs, const SurfaceEdge& rhs)
{
//Unlike the equality operator, we can't compare iterators.
//So dereference and compare the results.
if ((*lhs.target) < (*rhs.target))
return true;
if ((*rhs.target) < (*lhs.target))
@ -78,6 +82,11 @@ namespace Ogre
return nextHalfEdge;
}
const SurfaceTriangleIterator& SurfaceEdge::getTriangle(void)
{
return triangle;
}
void SurfaceEdge::setPreviousHalfEdge(const SurfaceEdgeIterator& previousHalfEdgeToSet)
{
previousHalfEdge = previousHalfEdgeToSet;
@ -87,4 +96,9 @@ namespace Ogre
{
nextHalfEdge = nextHalfEdgeToSet;
}
void SurfaceEdge::setTriangle(const SurfaceTriangleIterator& triangleToSet)
{
triangle = triangleToSet;
}
}