[line 94]
[line 80]
[line 73]
[line 66]
[line 59]
[line 101]
[line 87]
Image_3D_Renderer __construct( )
Initialises the environment
Overridden in child classes as:
void addLights( array $lights)
Add objects to renderer. Only objects which are added will be displayed
void addObjects( array $objects)
integer getLightCount( )
Return the number of used lights in this image
integer getPointCount( )
Return the number of used points in this image
integer getPolygonCount( )
Return the number of used polygones in this image
void render( string $file)
Render the image into the metioned file
void reset( )
void setBackgroundColor( Image_3D_Color $color)
Set the backgroundcolor of the destination image.
void setDriver( Image_3D_Driver $driver)
Set the driver the image should be rendered with
void setShading( integer $shading)
Set the quality of the shading. Standard value is the maximum shading quality the driver is able to render.
void setSize( integer $x, integer $y)
Set the size of the destination image.
void _calculatePointColors( )
Let each point calculate his color based on his normale which is calculated on his surrounding polygones and the lights which are registered for this image
void _calculatePolygonColors( )
Let each polygon calculate his color based on the lights which are registered for this image
void _calculateScreenCoordiantes( Image_3D_Point $point)
Calculate screen coordinates for a point according to the perspektive the renderer should display
void _getPolygones( Image_3D_Object $object)
Get polygones and points from an object and merge them unique to local polygon- and pointarrays.
void _shade( )
Draw all polygones concerning the type of shading wich was set for the renderer
void _sortPolygones( )
Set the order the polygones will be displayed