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

Class: Image_3D_Renderer

Source Location: /Image_3D-0.4.0/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_Perspectively
Image_3D_Renderer_Perspectively

Inherited Variables

Inherited Methods


Class Details

[line 51]
Image_3D_Renderer


[ Top ]


Class Variables

$_background =

[line 95]

Backgroundcolol
  • Access: protected

Type:   Image_3D_Color


[ Top ]

$_driver =

[line 81]

Driver we use
  • Access: protected

Type:   array


[ Top ]

$_lights =

[line 74]

Worlds lights
  • Access: protected

Type:   array


[ Top ]

$_points =

[line 67]

Worlds points
  • Access: protected

Type:   array


[ Top ]

$_polygones =

[line 60]

Worlds polygones
  • Access: protected

Type:   array


[ Top ]

$_shading =

[line 102]

Type of Shading used
  • Access: protected

Type:   integer


[ Top ]

$_size =

[line 88]

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

[ Top ]

addLights   [line 251]

void addLights( $lights, array $objetcs)

Add objects to renderer

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

  • Access: public

Parameters:

array   $objetcs   —  Array of objects
   $lights   — 

[ Top ]

addObjects   [line 227]

void addObjects( $objects, array $objetcs)

Add objects to renderer

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

  • Access: public

Parameters:

array   $objetcs   —  Array of objects
   $objects   — 

[ Top ]

getLightCount   [line 357]

integer getLightCount( )

Return light count

Return the number of used lights in this image

  • Return: Number of Lights
  • Access: public

[ Top ]

getPointCount   [line 343]

integer getPointCount( )

Return point count

Return the number of used points in this image

  • Return: Number of Points
  • Access: public

[ Top ]

getPolygonCount   [line 329]

integer getPolygonCount( )

Return polygon count

Return the number of used polygones in this image

  • Return: Number of Polygones
  • Access: public

[ Top ]

render   [line 448]

void render( string $file)

Render the image

Render the image into the metioned file

  • Access: public

Parameters:

string   $file   —  Filename

[ Top ]

reset   [line 148]

void reset( )

Reset all changeable variables

Initialises the environment

  • Access: public

[ Top ]

setBackgroundColor   [line 282]

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 313]

void setDriver( Image_3D_Driver $driver)

Set the driver

Set the driver the image should be rendered with

  • Access: public

Parameters:

Image_3D_Driver   $driver   —  Driver to use

[ Top ]

setShading   [line 298]

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

Parameters:

integer   $shading   —  Shading quality

[ Top ]

setSize   [line 267]

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 390]

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 372]

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 201]

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_Perspectively::_calculateScreenCoordiantes()
Caclulate Screen Coordinates

Parameters:

Image_3D_Point   $point   —  Point to process

[ Top ]

_getPolygones   [line 173]

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 415]

void _shade( )

Draw all polygones

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

  • Access: protected

[ Top ]

_sortPolygones   [line 213]

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_Perspectively::_sortPolygones()
Sort polygones

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:38:28 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.