![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Just FYI, I never recommended scrapping the SDL or orphaning non-windows
users. All I really wanted was to divorce the editor/parser from the
renderer (not execute the parser/editor).
If that happened the first thing I would do is to make a mesh object
that accepts quads as well as triangles, and has .loadfrom3DS and
.loadfromOBJ methods.
POVMesh myMesh = new POVMESH.loadfrom3DS("Somefile.3DS");
myScene.addObject(myMesh);
--
Bryan Valencia
"I'd rather live with false hope than with false despair."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bryan Valencia <209### [at] gmail calm> 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
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
how about
public static mesh loadfrom3DS(string filename)
{
//write the code to import 3DS files here.
}
then we can do this:
POVmesh myMesh = loadfrom3DS("somefile.3ds");
//sorry the object keyword is already taken.
---
*runs for cover*
Warp wrote:
> Bryan Valencia <209### [at] gmail calm> 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'.
>
--
Bryan Valencia
"I'd rather live with false hope than with false despair."
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bryan Valencia wrote:
> how about
>
> public static mesh loadfrom3DS(string filename)
> {
> //write the code to import 3DS files here.
> }
>
> then we can do this:
>
> POVmesh myMesh = loadfrom3DS("somefile.3ds");
>
> //sorry the object keyword is already taken.
>
And why would this not be one?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Bryan Valencia nous apporta ses lumieres en ce 2007/10/16 17:39:
> how about
>
> public static mesh loadfrom3DS(string filename)
> {
> //write the code to import 3DS files here.
> }
>
> then we can do this:
>
> POVmesh myMesh = loadfrom3DS("somefile.3ds");
>
> //sorry the object keyword is already taken.
>
>
>
As a mesh IS an object, you can use: object MyMesh = import3DS("MyObject.3ds")
without any problem nor any conflict.
Here, import3DS(...) is a new function that return a mesh object from a .3DS
file. It can have a different name if the developing team prefer, such as:
load3DS, loadfrom3DS, ... or load_object(<object_type>, "Object_Name")
--
Alain
-------------------------------------------------
Where the press is free and every man able to read, all is safe.
Thomas Jefferson
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> Bryan Valencia <209### [at] gmail calm> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Alain <ele### [at] netscape net> wrote:
> As a mesh IS an object, you can use: object MyMesh = import3DS("MyObject.3ds")
> without any problem nor any conflict.
> Here, import3DS(...) is a new function that return a mesh object from a .3DS
> file. It can have a different name if the developing team prefer, such as:
> load3DS, loadfrom3DS, ... or load_object(<object_type>, "Object_Name")
The important thing, IMO, is that it doesn't hard-code that what is
returned by the function is precisely a mesh. It should be more abstract
than that.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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?)
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> 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?)
>
> --
> - Warp
Well, ok, right, I agree 100% ... But that's not really the problem of the
principle that POV4 syntax should resemble current one. I don't know about
obj format, but the 'load_file' method of meshes can do such an assumption,
and focus on meshes in the file. However, the 'obj specific options' are
here to tell the import method what to do, like access the target object
through its name or whatever obj format is like.
Then, if 'name' is an attribute of obj format:
my_mesh = mesh
{
load_file {obj "victoria.obj" name "victoria_body" [other obj-specific
options]}
...
}
I do not address specific details, but the overall principles of the syntax.
Bruno.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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?)
>
.obj files can't, but other formats can. So how about:
victoria = object {
load_file {obj "victoria.obj" [obj-specific options]}
//load_file {3ds "zorg.3ds" [3ds-specific options]}
...
}
object { victoria }
This would apply to formats that contain other object types, while
keeping a syntax that's closer to the current one.
Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
| mailto:jeb### [at] free fr | ICQ: 238062172 |
| http://jeberger.free.fr/ | Jabber: jeb### [at] jabber fr |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFHFkmxd0kWM4JG3k8RAqF5AKCLBvv5YMinWIdxiPGsJcuIZ7f++wCfTEy/
pkalLzOY4QKdfsLgvKJFOzU=
=6+RN
-----END PGP SIGNATURE-----
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |