POV-Ray : Newsgroups : povray.general : Generating SDL : Re: Generating SDL Server Time
6 Aug 2024 00:11:50 EDT (-0400)
  Re: Generating SDL  
From: Christopher James Huff
Date: 16 Aug 2002 09:10:08
Message: <chrishuff-2F1119.07565716082002@netplex.aussie.org>
In article <3d5cd5be@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> Christopher James Huff <chr### [at] maccom> wrote:
> > Aside from slightly different names, your code would work fine with my 
> > framework. What "looks ugly" in my example that doesn't in yours?
> 
>   For example:
> 
> scene.GetCamera().SetLookAt(vec(2, 3, 2));
> 
> vs:
> 
> cam.look_at(Vec(2, 3, 2));

This would work just as well:

PerspectiveCamera cam;
cam.SetLookAt(vec(2, 3, 2));
scene.SetCamera(cam);

Or this:
#define look_at SetLookAt
typedef vec Vec;
...
cam.look_at(vec(2, 3, 2));

A #define and a typedef and the exact same code will work.
The only difference is the name of the method for setting the look-at 
point, and the fact that I used a scene object in my example. I don't 
see how "SetLookAt" is so much uglier than "look_at", it is just a 
different naming convention: method names starting with capitals with 
each internal "word" of the name starting with a capital, instead of all 
lower case with words separated by underscores.

I broke my naming convention of capitalizing class names for "vec" to 
make it easier to type, my own vector class is "Vect3D", but I don't 
think you're complaining about 'V' vs. 'v'. Just assume a typedef in the 
header file.

Are you complaining about the scene object? It isn't necessary, but can 
make things much more convenient and less complicated. It would set up a 
default scene, show an OpenGL preview, automatically generate a file and 
run POV or some other renderer on it...

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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