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

Class: Image_3D

Source Location: /Image_3D-0.3.0/Image/3D.php

Class Overview


Image_3D


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 Kore Nordmann

Methods


Inherited Variables

Inherited Methods


Class Details

[line 65]
Image_3D

Class for creation of 3d images only with native PHP.



[ Top ]


Method Detail

createDriver   [line 296]

Image_3D_Driver createDriver( string $type)

Factory method for drivers

Creates and returns a new driver Standrad available drivers:

  • GD
  • SVG

  • Return: Object instance

Parameters:

string   $type     Driver type

[ Top ]

createLight   [line 201]

Image_3D_Light createLight( float $x, float $y, float $z)

Factory method for lights

Creates and returns a light. Needs only the position of the lights as a parameter.

  • Return: Object instance

Parameters:

float   $x     X-Position
float   $y     Y-Position
float   $z     Z-Position

[ Top ]

createMatrix   [line 221]

Image_3D_Matrix createMatrix( string $type, [array $parameter = array()])

Factory method for transformation matrixes

Creates a transformation matrix Known matrix types:

  • rotation array(float $x, float $y, float $z)
  • scale array(float $x, float $y, float $z)
  • move array(float $x, float $y, float $z)

  • Return: Object instance

Parameters:

string   $type     Matrix type
array   $parameter     Parameters

[ Top ]

createObject   [line 170]

Image_3D_Object createObject( string $type, [array $parameter = array()])

Factory method for Objects

Creates and returns a printable object. Standard objects with parameters:

  • cube array(float $x, float $y, float $z)
  • sphere array(float $r, int $detail)
  • 3ds string $filename
  • map [array(array(Image_3D_Point))]
  • text string $string

  • Return: Object instance

Parameters:

string   $type     Objectname
array   $parameter     Parameters

[ Top ]

createRenderer   [line 265]

Image_3D_Renderer createRenderer( string $type)

Factory method for renderer

Creates and returns a renderer. Avaible renderers

  • Isometric
  • Perspektively

  • Return: Object instance

Parameters:

string   $type     Renderer type

[ Top ]

render   [line 367]

boolean render( integer $x, integer $y, string $file)

Renders the image

Starts rendering an image with given size into the given file.

  • Return: Success

Parameters:

integer   $x     Width
integer   $y     Height
string   $file     Filename

[ Top ]

setColor   [line 247]

void setColor( mixed Image_3D_Color$color, Image_3D_Color $color)

Sets world backgroundcolor

Sets the backgroundcolor for final image. Transparancy is not supported by all drivers


Parameters:

Image_3D_Color   $color     Backgroundcolor

[ Top ]

setOption   [line 325]

void setOption( integer $option, mixed $value)

Sets an option for all known objects

Sets one of the Image_3D options for all known objects


Parameters:

integer   $option     Option
mixed   $value     Value

[ Top ]

stats   [line 395]

string stats( )

Statistics for Image_3D

Returns simple statisics for Image_3D as a string.

  • Return: Statistics

[ Top ]

transform   [line 348]

void transform( mixed Image_3D_Matrix$matrix, [mixed $id = null], Image_3D_Matrix $matrix)

Transform all known objects

Transform all known objects with the given transformation matrix. Can be interpreted as a transformation of the viewpoint.

The id is an optional value which shouldn't be set by the user to avoid double calculations, if a point is related to more than one object.


Parameters:

Image_3D_Matrix   $matrix     Transformation matrix
mixed   $id     Transformation ID

[ Top ]


Documentation generated on Mon, 07 Nov 2005 09:30:22 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.