Work on mesh decimation.
This commit is contained in:
@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#define __IntegralVector3_H__
|
||||
|
||||
#include <OgrePrerequisites.h>
|
||||
#include <OgreVector3.h>
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
@ -55,7 +56,12 @@ namespace Ogre
|
||||
return (z < rhs.z);
|
||||
else
|
||||
return false; //They are equal
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 toOgreVector3(void)
|
||||
{
|
||||
return Vector3(Real(x), Real(y), Real(z));
|
||||
}
|
||||
|
||||
Type x;
|
||||
Type y;
|
||||
|
@ -39,11 +39,18 @@ namespace Ogre
|
||||
|
||||
SurfaceTriangleIterator triangle;
|
||||
|
||||
SurfaceEdgeIterator previousHalfEdge;
|
||||
|
||||
SurfaceEdgeIterator nextHalfEdge;
|
||||
|
||||
SurfaceEdgeIterator otherHalfEdge;
|
||||
|
||||
//FIXME - could use boost::optional for this?
|
||||
bool hasOtherHalfEdge;
|
||||
|
||||
SurfaceEdge();
|
||||
|
||||
std::string toString(void);
|
||||
};
|
||||
|
||||
bool operator == (const SurfaceEdge& lhs, const SurfaceEdge& rhs);
|
||||
|
@ -40,7 +40,9 @@ namespace Ogre
|
||||
|
||||
void computeNormalsFromVolume(VolumeIterator volIter);
|
||||
|
||||
//void decimate(void);
|
||||
void computeOtherHalfEdges(void);
|
||||
|
||||
bool decimate(void);
|
||||
|
||||
//bool verticesArePlanar(SurfaceVertexIterator iterCurrentVertex);
|
||||
|
||||
|
@ -38,6 +38,8 @@ namespace Ogre
|
||||
SurfaceEdgeIterator edge;
|
||||
|
||||
SurfaceTriangle();
|
||||
|
||||
//std::string toString(void);
|
||||
};
|
||||
|
||||
bool operator == (const SurfaceTriangle& lhs, const SurfaceTriangle& rhs);
|
||||
|
@ -48,7 +48,9 @@ namespace Ogre
|
||||
|
||||
SurfaceVertex(UIntVector3 positionToSet);
|
||||
|
||||
SurfaceVertex(UIntVector3 positionToSet, Vector3 normalToSet);
|
||||
SurfaceVertex(UIntVector3 positionToSet, Vector3 normalToSet);
|
||||
|
||||
std::string toString(void);
|
||||
};
|
||||
|
||||
bool operator==(const SurfaceVertex& lhs, const SurfaceVertex& rhs);
|
||||
|
Reference in New Issue
Block a user