Image_3D
[ class tree: Image_3D ] [ index: Image_3D ] [ all elements ]

Class: Image_3D_Renderer

Source Location: /Image_3D-0.4.2/Image/3D/Renderer.php

Class Overview


Image_3D_Renderer


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 Kore Nordmann

Variables

Methods


Child classes:

Image_3D_Renderer_Isometric
Image_3D_Renderer_Isometric
Image_3D_Renderer_Raytrace
Image_3D_Renderer_Raytrace
Image_3D_Renderer_Perspectively
Image_3D_Renderer_Perspectively

Inherited Variables

Inherited Methods


Class Details

[line 49]
Image_3D_Renderer


[ Top ]


Class Variables

$_background =

[line 94]

Backgroundcolol
  • Access: protected

Type:   Image_3D_Color


[ Top ]

$_driver =

[line 80]

Driver we use
  • Access: protected

Type:   array


[ Top ]

$_lights =

[line 73]

Worlds lights
  • Access: protected

Type:   array


[ Top ]

$_points =

[line 66]

Worlds points
  • Access: protected

Type:   array


[ Top ]

$_polygones =

[line 59]

Worlds polygones
  • Access: protected

Type:   array


[ Top ]

$_shading =

[line 101]

Type of Shading used
  • Access: protected

Type:   integer


[ Top ]

$_size =

[line 87]

Size of the Image
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 134]

Image_3D_Renderer __construct( )

Constructor for Image_3D_Renderer

Initialises the environment

  • Return: Instance of Renderer
  • Access: public

Overridden in child classes as:

Image_3D_Renderer_Raytrace::__construct()

[ Top ]

addLights   [line 262]

void addLights( array $lights)

Add objects to renderer

Add objects to renderer. Only objects which are added will be displayed

  • Access: public

Parameters:

array   $lights     Array of objects

[ Top ]

addObjects   [line 236]

void addObjects( array $objects)

Add objects to renderer

Add objects to renderer. Only objects which are added will be displayed

  • Access: public

Parameters:

array   $objects     Array of objects

[ Top ]

getLightCount   [line 379]

integer getLightCount( )

Return light count

Return the number of used lights in this image

  • Return: Number of Lights
  • Access: public

[ Top ]

getPointCount   [line 364]

integer getPointCount( )

Return point count

Return the number of used points in this image

  • Return: Number of Points
  • Access: public

[ Top ]

getPolygonCount   [line 349]

integer getPolygonCount( )

Return polygon count

Return the number of used polygones in this image

  • Return: Number of Polygones
  • Access: public

[ Top ]

render   [line 483]

void render( string $file)

Render the image

Render the image into the metioned file

  • Access: public

Overridden in child classes as:

Image_3D_Renderer_Raytrace::render()
Render the image

Parameters:

string   $file     Filename

[ Top ]

reset   [line 149]

void reset( )

Reset all changeable variables

Initialises the environment

  • Access: public

[ Top ]

setBackgroundColor   [line 297]

void setBackgroundColor( Image_3D_Color $color)

Set the Backgroundcolor

Set the backgroundcolor of the destination image.

  • Access: public

Parameters:

Image_3D_Color   $color     Backgroundcolor

[ Top ]

setDriver   [line 332]

void setDriver( Image_3D_Driver $driver)

Set the driver

Set the driver the image should be rendered with

  • Access: public

Overridden in child classes as:

Image_3D_Renderer_Raytrace::setDriver()
Set the driver

Parameters:

Image_3D_Driver   $driver     Driver to use

[ Top ]

setShading   [line 315]

void setShading( integer $shading)

Set the quality of the shading

Set the quality of the shading. Standard value is the maximum shading quality the driver is able to render.

  • Access: public

Overridden in child classes as:

Image_3D_Renderer_Raytrace::setShading()
Set the quality of the shading

Parameters:

integer   $shading     Shading quality

[ Top ]

setSize   [line 280]

void setSize( integer $x, integer $y)

Set image size

Set the size of the destination image.

  • Access: public

Parameters:

integer   $x     Width
integer   $y     Height

[ Top ]

_calculatePointColors   [line 414]

void _calculatePointColors( )

Calculate the colors of all points

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

  • Access: protected

[ Top ]

_calculatePolygonColors   [line 395]

void _calculatePolygonColors( )

Calculate the color of all polygones

Let each polygon calculate his color based on the lights which are registered for this image

  • Access: protected

[ Top ]

_calculateScreenCoordiantes   [line 209]

void _calculateScreenCoordiantes( Image_3D_Point $point)

Caclulate Screen Coordinates

Calculate screen coordinates for a point according to the perspektive the renderer should display

  • Abstract:
  • Access: protected

Overridden in child classes as:

Image_3D_Renderer_Isometric::_calculateScreenCoordiantes()
Caclulate Screen Coordinates
Image_3D_Renderer_Raytrace::_calculateScreenCoordiantes()
Caclulate Screen Coordinates
Image_3D_Renderer_Perspectively::_calculateScreenCoordiantes()
Caclulate Screen Coordinates

Parameters:

Image_3D_Point   $point     Point to process

[ Top ]

_getPolygones   [line 178]

void _getPolygones( Image_3D_Object $object)

Get and merge polygones

Get polygones and points from an object and merge them unique to local polygon- and pointarrays.

  • Access: protected

Parameters:

Image_3D_Object   $object     Object to merge

[ Top ]

_shade   [line 442]

void _shade( )

Draw all polygones

Draw all polygones concerning the type of shading wich was set for the renderer

  • Access: protected

[ Top ]

_sortPolygones   [line 221]

void _sortPolygones( )

Sort polygones

Set the order the polygones will be displayed

  • Abstract:
  • Access: protected

Overridden in child classes as:

Image_3D_Renderer_Isometric::_sortPolygones()
Sort polygones
Image_3D_Renderer_Raytrace::_sortPolygones()
Sort polygones
Image_3D_Renderer_Perspectively::_sortPolygones()
Sort polygones

[ Top ]


Documentation generated on Sun, 08 Apr 2012 13:30:15 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.