|
![](/i/fill.gif) |
In article <3d5cd5be@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> Christopher James Huff <chr### [at] mac com> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |