Switched to Half-Edge based data structure for meshes.

This commit is contained in:
David Williams
2007-09-05 21:40:32 +00:00
parent 9bf977b704
commit 2c69a373a1
11 changed files with 329 additions and 89 deletions

32
source/SurfaceEdge.cpp Normal file
View File

@ -0,0 +1,32 @@
#include "SurfaceEdge.h"
#include "SurfaceTriangle.h"
#include "SurfaceVertex.h"
namespace Ogre
{
SurfaceEdge::SurfaceEdge()
{
}
bool operator == (const SurfaceEdge& lhs, const SurfaceEdge& rhs)
{
return
(
(lhs.target == rhs.target) &&
(lhs.triangle == rhs.triangle)
);
}
bool operator < (const SurfaceEdge& lhs, const SurfaceEdge& rhs)
{
if(lhs.target == rhs.target)
{
if(lhs.triangle == rhs.triangle)
{
return false;
}
return (*(lhs.triangle) < *(rhs.triangle));
}
return (*(lhs.target) < *(rhs.target));
}
}