|
![](/i/fill.gif) |
Bryan Valencia wrote:
> Warp wrote:
>> Bruno Cabasson <bru### [at] alcatelaleniaspace fr> 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
|
![](/i/fill.gif) |