Renamed IndexedSurfacePatch to SurfaceMesh.

This commit is contained in:
David Williams
2010-02-20 00:20:43 +00:00
parent 3ed74a982c
commit 2d78808000
20 changed files with 143 additions and 143 deletions

View File

@ -24,18 +24,18 @@ freely, subject to the following restrictions:
#include "OpenGLImmediateModeSupport.h"
#include "OpenGLSupport.h"
#include "IndexedSurfacePatch.h"
#include "SurfaceMesh.h"
using namespace PolyVox;
using namespace std;
void renderRegionImmediateMode(PolyVox::IndexedSurfacePatch& isp, unsigned int uLodLevel)
void renderRegionImmediateMode(PolyVox::SurfaceMesh& mesh, unsigned int uLodLevel)
{
const vector<SurfaceVertex>& vecVertices = isp.getVertices();
const vector<PolyVox::uint32_t>& vecIndices = isp.getIndices();
const vector<SurfaceVertex>& vecVertices = mesh.getVertices();
const vector<PolyVox::uint32_t>& vecIndices = mesh.getIndices();
int beginIndex = isp.m_vecLodRecords[uLodLevel].beginIndex;
int endIndex = isp.m_vecLodRecords[uLodLevel].endIndex;
int beginIndex = mesh.m_vecLodRecords[uLodLevel].beginIndex;
int endIndex = mesh.m_vecLodRecords[uLodLevel].endIndex;
glBegin(GL_TRIANGLES);
//for(vector<PolyVox::uint32_t>::const_iterator iterIndex = vecIndices.begin(); iterIndex != vecIndices.end(); ++iterIndex)
@ -44,7 +44,7 @@ void renderRegionImmediateMode(PolyVox::IndexedSurfacePatch& isp, unsigned int u
const SurfaceVertex& vertex = vecVertices[vecIndices[index]];
const Vector3DFloat& v3dVertexPos = vertex.getPosition();
//const Vector3DFloat v3dRegionOffset(uRegionX * g_uRegionSideLength, uRegionY * g_uRegionSideLength, uRegionZ * g_uRegionSideLength);
const Vector3DFloat v3dFinalVertexPos = v3dVertexPos + static_cast<Vector3DFloat>(isp.m_Region.getLowerCorner());
const Vector3DFloat v3dFinalVertexPos = v3dVertexPos + static_cast<Vector3DFloat>(mesh.m_Region.getLowerCorner());