POV-Ray : Newsgroups : povray.general : A new SDL Idea : Re: A new SDL Idea Server Time
31 Jul 2024 12:17:16 EDT (-0400)
  Re: A new SDL Idea  
From: andrel
Date: 17 Oct 2007 15:08:11
Message: <47165E9D.2030007@hotmail.com>
Bryan Valencia wrote:
> Warp wrote:
>> Bruno Cabasson <bru### [at] alcatelaleniaspacefr> wrote:
>>> In order to keep current syntax spirit, I would rather propose something
>>> like:
>>
>>   The problem is that it hard-codes that the imported object is a mesh.
>> (Can .obj files contain other things too, such as NURBS or whatever?)
>>
> 
> No it's not associating ".obj" with meshes.  if you want to import a 
> NURB, then you would use the POVNurb.loadfromobj("nurbfile.obj");
> 
> Maybe better for the mesh would be 
> POVMesh.LoadFromWavefrontObj("somefile.obj");
> 
> 
I think the main problem with this approach is that you assume you 
always know what is in the file. That is a dangerous assumption if you 
write a library. It is also not important from a POV point of view, 
whatever it is that you load, you can translate, scale and texture it, 
so it is an object.
Warp's question was if .obj files can be anything apart from meshes i.e. 
if it can harm if you put the result in a mesh. Technically for an .obj 
file there may not be a danger, but conceptually it is wrong because 
other files can contain other objects and you don't want .obj loading 
routines to behave different from, say, .off files.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.