// // Copyright (C) : Please refer to the COPYRIGHT file distributed // with this source distribution. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // /////////////////////////////////////////////////////////////////////////////// #include #include "../scene_graph/VertexRep.h" #include "../scene_graph/NodeShape.h" #include "../scene_graph/IndexedFaceSet.h" #include "../scene_graph/LineRep.h" #include "../geometry/Grid.h" #include "GLDebugRenderer.h" #ifdef __MACH__ #include #else #include #endif void GLDebugRenderer::visitIndexedFaceSet(IndexedFaceSet& iFaceSet) { unsigned int fIndex = 0; const real * vertices = iFaceSet.vertices(); const real * normals = iFaceSet.normals(); const Material *const* materials = (const Material**)iFaceSet.materials(); const unsigned *vindices = iFaceSet.vindices(); const unsigned *nindices = iFaceSet.nindices(); const unsigned *mindices = iFaceSet.mindices(); const unsigned numfaces = iFaceSet.numFaces(); const unsigned *numVertexPerFace = iFaceSet.numVertexPerFaces(); const IndexedFaceSet::TRIANGLES_STYLE * faceStyle = iFaceSet.trianglesStyle(); const unsigned *pvi = vindices; const unsigned *pni = nindices; const unsigned* pmi = mindices; for(fIndex=0; fIndex1000) textSize *= 10.0; glScalef(size, size, size); glScalef(textSize/200.0, textSize/200.0, textSize/200.0); for (c=string; *c != '\0'; c++) { //soc glutStrokeCharacter(font, *c); } glPopMatrix(); } void GLDebugRenderer::RenderTriangleStrip(const real *iVertices, const real *iNormals, const Material *const* iMaterials, const unsigned* iVIndices, const unsigned* iNIndices, const unsigned* iMIndices, const unsigned iNVertices) { // glBegin(GL_TRIANGLE_STRIP); // for(unsigned int i=0; i