POV-Ray : Newsgroups : povray.general : A new SDL Idea : Re: A new SDL Idea Server Time
31 Jul 2024 14:22:55 EDT (-0400)
  Re: A new SDL Idea  
From: Bruno Cabasson
Date: 17 Oct 2007 05:05:00
Message: <web.4715cf18bcc3cc02e8ba46670@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Bryan Valencia <209### [at] gmailcalm> wrote:
> > POVMesh myMesh = new POVMESH.loadfrom3DS("Somefile.3DS");
>
>   Why the obsession with 'new'?
>
>   How about:
>
> Object o = import3DS("Somefile.3ds");
>
>   More abstract, less confusing syntax. No need for useless 'news'.
>
> --
>                                                           - Warp


In order to keep current syntax spirit, I would rather propose something
like:

    my_mesh = mesh
    {
        load_file {obj "victoria.obj" [obj-specific options]}
        //load_file {3ds "zorg.3ds" [3ds-specific options]}

        ...

        [OBJECT MODIFIER (= methods calls? like translate, subdivide ...)]
    }

    object {my_mesh texture {...}}


Bruno


PS:
The creation block could stand for
    Mesh my_mesh = new Primitives.Mesh();
    my_mesh.load_obj_file_("victoria.obj", ...);

The object{...}  block could stand for
    Texture my_mesh_texture = new Texture(...);
    my_mesh.setTexture(my_mesh_texture);
    Scene.add(my_mesh);

This kind of notation is classical in OO, but not POV-like. I try to find a
notation that ressembles POV, but uses underlying OO features and general
notational principles. Until now, I had no feed back (I hope it does not
mean I am totally wrong ...)


Post a reply to this message

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