Removed redundant classes SurfaceEdge, SurfaceTriange, and SurfaceTypes.

Also fixed a new bug in IndexedSurfacePatch
This commit is contained in:
David Williams
2008-04-16 20:46:24 +00:00
parent 2bc1fc2b88
commit 35f9996663
5 changed files with 10 additions and 47 deletions

View File

@ -2,8 +2,6 @@
#include "Constants.h"
#include "SurfaceVertex.h"
#include "SurfaceTriangle.h"
#include "SurfaceEdge.h"
namespace PolyVox
{
@ -15,7 +13,6 @@ namespace PolyVox
:material(materialToSet)
,alpha(alphaToSet)
,position(positionToSet)
,m_uHash((position.x()*(POLYVOX_REGION_SIDE_LENGTH*2+1)*(POLYVOX_REGION_SIDE_LENGTH*2+1)) + (position.y()*(POLYVOX_REGION_SIDE_LENGTH*2+1)) + (position.z()))
{
}
@ -24,7 +21,6 @@ namespace PolyVox
:position(positionToSet)
,normal(normalToSet)
{
m_uHash = (position.x()*(POLYVOX_REGION_SIDE_LENGTH*2+1)*(POLYVOX_REGION_SIDE_LENGTH*2+1)) + (position.y()*(POLYVOX_REGION_SIDE_LENGTH*2+1)) + (position.z());
}
float SurfaceVertex::getAlpha(void) const
@ -37,11 +33,6 @@ namespace PolyVox
return material;
}
const SurfaceEdgeIterator& SurfaceVertex::getEdge(void) const
{
return edge;
}
const Vector3DFloat& SurfaceVertex::getNormal(void) const
{
return normal;
@ -62,11 +53,6 @@ namespace PolyVox
material = materialToSet;
}
void SurfaceVertex::setEdge(const SurfaceEdgeIterator& edgeToSet)
{
edge = edgeToSet;
}
void SurfaceVertex::setNormal(const Vector3DFloat& normalToSet)
{
normal = normalToSet;
@ -78,15 +64,5 @@ namespace PolyVox
std::stringstream ss;
ss << "SurfaceVertex: Position = (" << position.x() << "," << position.y() << "," << position.z() << "), Normal = " << normal;
return ss.str();
}
bool operator==(const SurfaceVertex& lhs, const SurfaceVertex& rhs)
{
return (lhs.m_uHash == rhs.m_uHash);
}
bool operator < (const SurfaceVertex& lhs, const SurfaceVertex& rhs)
{
return (lhs.m_uHash < rhs.m_uHash);
}
}