|
![](/i/fill.gif) |
Bryan Valencia <209### [at] gmail calm> 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");
>
>
> --
> Bryan Valencia
>
I agree that the 'load' method is specific to the type of object involved.
However, your notation does not appear to me as POV-like. For me, it would
rather be:
nurbs
{
load_file {obj "my_2cv.obj" [nurbs-specific modifiers]}
...
}
and
mesh
{
load_file {obj "victoria.obj" [mesh-specific modifiers]}
...
}
Bruno
PS: These lines would invoke internally (once compiled or while interpreted)
some methods like you say:
POVNurb.loadfromobj("my_2cv.obj"); // Or through an instance of POVNurb
class
POVMesh.loadfromobj("victoria.obj"); // Or through an instance of POVMesh
class
but internally only.
Post a reply to this message
|
![](/i/fill.gif) |