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

Class: Image_3D

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

Class Overview


Image_3D


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 Kore Nordmann

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 66]
Image_3D

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



[ Top ]


Class Variables

$_color =

[line 76]

Backgroundcolor
  • Access: protected

Type:   Image_3D_Color


[ Top ]

$_driver =

[line 104]

Active outputdriver
  • Access: protected

Type:   Image_3D_Driver


[ Top ]

$_lights =

[line 90]

List of lights
  • Access: protected

Type:   array


[ Top ]

$_objects =

[line 83]

List of known objects
  • Access: protected

Type:   array


[ Top ]

$_option =

[line 110]

Options for rendering
  • Access: protected

Type:   mixed


[ Top ]

$_optionSet =

[line 117]

Options set by the user
  • Access: protected

Type:   array


[ Top ]

$_renderer =

[line 97]

Active renderer
  • Access: protected

Type:   Image_3D_Renderer


[ Top ]

$_start =

[line 124]

Begin of world creation
  • Access: protected

Type:   float


[ Top ]



Method Detail

__construct (Constructor)   [line 149]

Image_3D __construct( )

Constructor for Image_3D

Initialises the environment

  • Return: World instance
  • Access: public

[ Top ]

createDriver   [line 340]

Image_3D_Driver createDriver( string $type)

Factory method for drivers

Creates and returns a new driver Standrad available drivers:

  • GD
  • SVG

  • Return: Object instance
  • Access: public

Parameters:

string   $type     Driver type

[ Top ]

createLight   [line 217]

Image_3D_Light createLight( string $type, [mixed $parameter = array()])

Factory method for lights

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

  • Return: Object instance
  • Access: public

Parameters:

string   $type     Class
mixed   $parameter     Parameters

[ Top ]

createMatrix   [line 257]

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
  • Access: public

Parameters:

string   $type     Matrix type
array   $parameter     Parameters

[ Top ]

createObject   [line 184]

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
  • Access: public

Parameters:

string   $type     Objectname
array   $parameter     Parameters

[ Top ]

createRenderer   [line 306]

Image_3D_Renderer createRenderer( string $type)

Factory method for renderer

Creates and returns a renderer. Avaible renderers

  • Isometric
  • Perspektively

  • Return: Object instance
  • Access: public

Parameters:

string   $type     Renderer type

[ Top ]

render   [line 426]

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

Renders the image

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

  • Return: Success
  • Access: public

Parameters:

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

[ Top ]

setColor   [line 286]

void setColor( Image_3D_Color $color)

Sets world backgroundcolor

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

  • Access: public

Parameters:

Image_3D_Color   $color     Backgroundcolor

[ Top ]

setOption   [line 372]

void setOption( integer $option, mixed $value)

Sets an option for all known objects

Sets one of the Image_3D options for all known objects

  • Access: public

Parameters:

integer   $option     Option
mixed   $value     Value

[ Top ]

stats   [line 457]

string stats( )

Statistics for Image_3D

Returns simple statisics for Image_3D as a string.

  • Return: Statistics
  • Access: public

[ Top ]

transform   [line 400]

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

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.

  • Access: public

Parameters:

Image_3D_Matrix   $matrix     Transformation matrix
mixed   $id     Transformation ID

[ Top ]


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