Refactoring work...

This commit is contained in:
David Williams
2007-08-19 17:09:20 +00:00
parent 7bd433cbf3
commit 47bb4b016d
4 changed files with 108 additions and 13 deletions

View File

@ -0,0 +1,36 @@
#include "SurfacePatch.h"
namespace Ogre
{
SurfacePatch::SurfacePatch()
{
}
SurfacePatch::~SurfacePatch()
{
}
void SurfacePatch::addTriangle(const SurfaceVertex& v0,const SurfaceVertex& v1,const SurfaceVertex& v2)
{
SurfaceTriangle triangle;
m_vecVertices.push_back(v0);
triangle.v0 = m_vecVertices.size()-1;
m_vecVertices.push_back(v1);
triangle.v1 = m_vecVertices.size()-1;
m_vecVertices.push_back(v2);
triangle.v2 = m_vecVertices.size()-1;
m_vecTriangles.push_back(triangle);
}
const std::vector<SurfaceVertex>& SurfacePatch::getVertexArray()
{
return m_vecVertices;
}
const std::vector<SurfaceTriangle>& SurfacePatch::getTriangleArray()
{
return m_vecTriangles;
}
}