|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
> typedef struct Frame_Struct FRAME;
>
> struct Frame_Struct
> {
> CAMERA *Camera;
> int Screen_Height, Screen_Width; /* OPTIONS */
> int Number_Of_Light_Sources;
> LIGHT_SOURCE *Light_Sources;
> OBJECT *Objects;
> DBL Atmosphere_IOR, Atmosphere_Dispersion, Antialias_Threshold;
> COLOUR Background_Colour;
> COLOUR Ambient_Light;
> COLOUR Irid_Wavelengths;
> IMEDIA *Atmosphere;
> FOG *Fog;
> RAINBOW *Rainbow;
> SKYSPHERE *Skysphere;
> };
>
Hmm....this looks like a good foundation for the basic "scene" object that I
think should be the proxy class (object) for the whole scene in an
OO-version...
(think java)
public class scene{
povCamera camera;
povObject objects[];
// everything is an object - light sources too, for example
povIniOption ini_options;
double initial_clock, final_clock, clock;
povAtmosphere atmosphere;
povFog fog;
povSkysphere sky_sphere;
public class image{
int width, height;
outputType output_type;
// etc.
}
// etc.
}
This way, the scene object encapsulates everything regarding the scene to be
rendered, and it feels logical to write lines as these:
scene.image.width
scene.camera.look_at
scene.atmosphere
scene.sky_sphere
..
#if (scene.current_frame=scene.ini_options.initial_frame) ... #end // new one,
that...
#declare scene.objects[0].scale = foo;
#if(scene.camera.look_at=myFoo.location) ... #end
Well, hope I'm not the only one who sees the possibilities here...sorry for
being OT.
----------------------------------------------------
Mikael Carneholm, B.Sc.
Dep. of Computer Science and Business Administration
Personal homepage:
http://www.studenter.hb.se/~arch
E-mail:
sa9### [at] ida utb hb se
Post a reply to this message
|
![](/i/fill.gif) |