Work on mesh decimation.
This commit is contained in:
@ -90,56 +90,11 @@ namespace Ogre
|
||||
return (lhsOffset == rhsOffset) /*&& (abs(lhs.alpha - rhs.alpha) <= 0.01)*/;
|
||||
}
|
||||
|
||||
bool operator < (const SurfaceVertex& lhs, const SurfaceVertex& rhs)
|
||||
/*bool operator < (const SurfaceVertex& lhs, const SurfaceVertex& rhs)
|
||||
{
|
||||
/*if((*this) == rhs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(alpha < rhs.alpha)
|
||||
{
|
||||
return true;
|
||||
}*/
|
||||
/*if(position.z < rhs.position.z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(position.y < rhs.position.y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(position.x < rhs.position.x)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;*/
|
||||
|
||||
/*ulong value = 0;
|
||||
value |= position.x;
|
||||
value << 10;
|
||||
value |= position.y;
|
||||
value << 10;
|
||||
value |= position.z;
|
||||
|
||||
ulong rhsValue = 0;
|
||||
rhsValue |= rhs.position.x;
|
||||
rhsValue << 10;
|
||||
rhsValue |= rhs.position.y;
|
||||
rhsValue << 10;
|
||||
rhsValue |= rhs.position.z;
|
||||
|
||||
return value < rhsValue;*/
|
||||
|
||||
unsigned long lhsOffset = (lhs.position.x*(OGRE_REGION_SIDE_LENGTH*2+1)*(OGRE_REGION_SIDE_LENGTH*2+1)) + (lhs.position.y*(OGRE_REGION_SIDE_LENGTH*2+1)) + (lhs.position.z);
|
||||
unsigned long rhsOffset = (rhs.position.x*(OGRE_REGION_SIDE_LENGTH*2+1)*(OGRE_REGION_SIDE_LENGTH*2+1)) + (rhs.position.y*(OGRE_REGION_SIDE_LENGTH*2+1)) + (rhs.position.z);
|
||||
|
||||
return lhsOffset < rhsOffset;
|
||||
|
||||
/*if(lhsOffset == rhsOffset)
|
||||
{
|
||||
return (lhs.alpha < rhs.alpha);
|
||||
}
|
||||
return (lhsOffset < rhsOffset)*/;
|
||||
}
|
||||
return lhsOffset < rhsOffset;
|
||||
}*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user