X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdocs.cpp;h=88ad50fa14cccdde293a007812b7c1273c6df246;hb=806a6ed49930ae2bd8028eb7e3ffb79f017ef7f1;hp=f82fc6061da92d1f9df042bf48169841ae992236;hpb=56a484768937a8cb38203516f85106c778aaa97b;p=ctsim.git diff --git a/src/docs.cpp b/src/docs.cpp index f82fc60..88ad50f 100644 --- a/src/docs.cpp +++ b/src/docs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: docs.cpp,v 1.21 2001/01/31 01:01:22 kevin Exp $ +** $Id: docs.cpp,v 1.23 2001/02/03 18:42:21 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -376,14 +376,14 @@ TextFileDocument::getTextCtrl() IMPLEMENT_DYNAMIC_CLASS(Graph3dFileDocument, wxDocument) Graph3dFileDocument::Graph3dFileDocument(void) -: m_bBadFileOpen(false), m_nVertices(0), m_pVertices(0), m_pNormals(0) +: m_bBadFileOpen(false), m_nVertices(0), m_pVertices(0), m_pNormals(0),m_nx(0),m_ny(0),m_array(0) { } Graph3dFileDocument::~Graph3dFileDocument() { - delete [] m_pVertices; - delete [] m_pNormals; +// delete [] m_pVertices; +// delete [] m_pNormals; } bool @@ -419,31 +419,15 @@ Graph3dFileDocument::getView() const bool Graph3dFileDocument::createFromImageFile (const ImageFile& rImageFile) { - delete [] m_pVertices; - delete [] m_pNormals; +// delete [] m_pVertices; +// delete [] m_pNormals; + m_nx = rImageFile.nx(); m_ny = rImageFile.ny(); m_array = rImageFile.getArray(); -#if 0 - const int nTriangles = nx * ny; - m_nVertices = nTriangles; - m_pVertices = new glTripleFloat [nTriangles]; - m_pNormals = new glTripleFloat [nTriangles]; - - for (unsigned int ix = 0; ix < nx; ix++) { - for (unsigned int iy = 0; iy < ny; iy++) { - const int iTriangle = ix * iy; - m_pVertices[iTriangle][0] = ix; - m_pVertices[iTriangle][1] = iy; - m_pVertices[iTriangle][2] = v[ix][iy]; - m_pNormals[iTriangle][0] = 0; - m_pNormals[iTriangle][1] = 0; - m_pNormals[iTriangle][2] = 0; - } - } -#endif + return true; } -#endif // wxUSE_GLCANVAS \ No newline at end of file +#endif // wxUSE_GLCANVAS