Encapsulation of a worlds' scene that can be rendered. More...
#include <world.h>
The class also provides a set of functions for building the scene similarly to the OpenGL state machine. It should be noted that the view-volume is identical so a world-space modelview matrix from opengl will produce a rendering with the same view as the equivelent opengl image. See the matrix function for this.
Construct a new world. The world is given the field of view and the length of distance that infinity is. Infinity is required sometimes for bounds.
[virtual]Render the scene. This version produces an image with heavy aliasing artifacts. The pixelmap passed will determine the resolution to sample the image at.
[virtual]Render the scene. This version reduces the aliasing by introducing noise from jittered sampling. The pixelmap passed will determine the resolution to sample the image at.
Returns the x-ccordinate of the pixel being rendered, garbage if the scene is not being rendered.
Returns the y-ccordinate of the pixel being rendered, garbage if the scene is not being rendered.
Specification of viewing matrix. This allows the user to setup the camera position exactly. It is analogous to the gluLookat function. The three parameters are camera position, camera focal point and the world up vector. This matrix only affects the viewing and not the object transformation matrices.
Camera position. Returns where the camera is relative to the current viewing matrix, (see lookat).
Make current transformation matrix the identity matrix.
Rotate the current modelview. The scene is rotated about the given axis (x,y,z is 0,1,2) and the given angle in degrees.
Transform the current modelview by the given matrix.
Save the current state. The state encompasses the current modelview transformation and the current material, texture, and object construction tree.
Restore the current state. The state encompasses the current modelview transformation and the current material, texture, and object construction tree.
Specify the current material. The current material is what is assigned to an object passed to add, or created by end.
Returns the current material. The current material is what is assigned to an object passed to add, or created by end.
Specify the current texture. The current texture is assigned to materials on their addition into the scene.
Returns the current texture. The current texture is assigned to materials on their addition into the scene.
Returns the current modelview transformation matrix. See identity, translate, rotate, scale and matrix.
Start the construction of a CSG object. The parameter specifies the boolean operation to use to combine the children. Begin and end should bracket the addition of two children (either through add, or another begin/end pair).
Complete the construction of a CSG object. (See, begin.) The parameter is a bitmap to pass as the flag value for the object. End causes a new object to be created (see Union / Intersection / Difference) and added to the scene.
Add an object to the scene. The parameter is a bitmap to pass as the flag value for the object.
Set the illumination to compute ray intensities. This allows one to specify the illumination model used to compute light transfer through the scene.
Set the illumination to compute ray intensities. This allows one to specify the illumination model used to compute light transfer through the scene.
Gets the illumination model. This function will return the current illumination model that will be used to compute light transfer and thus pixel intensities for the render.
Returns the ambient light in the scene. Ambient light is used to approximate diffuse inter-reflection. This colour should be close to black.
Sets the ambient light in the scene. Ambient light is used to approximate diffuse inter-reflection. This colour should be close to black.
Returns the value for infinity. Infinity is used for computing bounding boxes in some case.
Returns the field of view. The field of view is the angle between the vertical walls of the view frustrum, it is the angle over which the camera can see horizontal.
Sets the field of view. The field of view is the angle between the vertical walls of the view frustrum, it is the angle over which the camera can see horizontal.
Returns the scene bounding box (excluding infinite objects).
Returns the space subdivision of the scene, this is the data structure that contains the collection of rtl_(sub)objects.
Sets a callback for reporting progress. The function passed will be called after every rendered line. The second parameter is some data to pass to the function. The function is passed the current line, how many lines will be rendered and the data given during call to this function.
Returns the flags for this object.
Returns the flags for this object.
Initialize a view for shooting individual rays. Allocates and initializes the values in the viewinfo structure. Supply the resolution at which to sample the view plane.
Shoot a single ray. Shoots a ray through the viewplane previously setup up with initView. Pass the screen space coordinate of the pixel to trace, The colour and world space location of the intersection are set if there was one. The function returns true if there was an intersection o/w it returns false.
Destroys an allocated viewinfo structure.
[static]Causes progress output on cerr. On by default.
[static]Causes the images to be rendered in colour. On by default.
[static]The rtl_world that is currently being rendered. This value gets set when any rendering function is called.