Manta Interactive Ray Tracer Development Mailing List

Text archives Help


Re: [Manta] Wavefront .obj reader?


Chronological Thread 
  • From: James Bigler <bigler@sci.utah.edu>
  • Cc: manta@sci.utah.edu
  • Subject: Re: [Manta] Wavefront .obj reader?
  • Date: Fri, 08 Feb 2008 12:09:45 -0700

Li-Ta Lo wrote:
Hi,

I am looking at OjbGroup.cc and glm.cc. I found that the version of glm.cc is pretty old and its interpretation ob ,mtl file may not be
correct (according to the "specification" available from www.fileformat.info). I found a supposed to be newer version of
the glm.cc on http://devernay.free.fr/hacks/glm/ . Are you going
to update it?

The version of glm.cc we started with is pretty old, but it has seen a lot of improvements over the years to make it more compliant. I don't envision the man power available to incorporate a new version that will require testing/bug fixing to make it compatible with the models we have.

If you have a model that doesn't load properly, send it our way (post it 
online for consumption if more than a few megabytes).

BTW, is there some kind of memory leak with this?

Flat::Flat(const Color& color)
{
  colortex = new Constant<Color>(color);
}

Flat::Flat(const Texture<Color>* colortex) : colortex(colortex)
{
}

Flat::~Flat()
{
}

why isn't colortex deleted in the destructor?

Flat() can take both a Texture* and a Color (which will allocate a new Texture). There's no way for the class to know in the destructor if the texture was provided or allocated. As a general rule any pointer passed in doesn't belong to the class. I guess we could add flags everywhere that say if it was allocated or not, but this hasn't been a priority. It could change in the future, though, as we start to pay more attention to this.

James





Archive powered by MHonArc 2.6.16.

Top of page