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

Class: Bbox

Source Location: /common/BasicTypes.php

Class Overview

Serializable
   |
   --Shape
      |
      --Bbox

A bounding box (bbox)


Author(s):

Variables

Methods


Child classes:

Rectangle
A rectangle

Inherited Variables

Inherited Methods

Class: Shape

Shape::getArea()
Computes the shape's area
Shape::getCenter()
Computes the shape's center
Shape::unserialize()

Class: Serializable

Serializable::__construct()
Constructor
Serializable::copyAllVars()
Copy all properties from one object to another (overwriting previous ones)
Serializable::getValue()
Returns structure's property value if property exists
Serializable::guessClassName()
Tries to guess the class to use from the property being unserialised.
Serializable::unserialize()
Unserializes from a stdClass structure
Serializable::unserializeArray()
Returns an array of typed values
Serializable::unserializeObject()
Returns an unserialized object from a stdClass structure
Serializable::unserializeObjectMap()
Returns an array of unserialized objects from a stdClass structure
Serializable::unserializeStringArray()
Returns an array of typed values from a string
Serializable::unserializeValue()
Returns a typed value from a structure property

Class Details

[line 275]
A bounding box (bbox)



Tags:

author:  Sylvain Pasche <sylvain.pasche@camptocamp.com>


[ Top ]


Class Variables

$maxx =

[line 290]



Tags:

access:  public

Type:   double


[ Top ]

$maxy =

[line 295]



Tags:

access:  public

Type:   double


[ Top ]

$minx =

[line 280]



Tags:

access:  public

Type:   double


[ Top ]

$miny =

[line 285]



Tags:

access:  public

Type:   double


[ Top ]



Class Methods


constructor __construct [line 304]

Bbox __construct( [double $minx = 0], [double $miny = 0], [double $maxx = 0], [double $maxy = 0])

Constructor



Tags:

access:  public


Overrides Serializable::__construct() (Constructor)

Parameters:

double   $minx  
double   $miny  
double   $maxx  
double   $maxy  

[ Top ]

method getArea [line 407]

void getArea( )



Tags:

access:  public
see:  Shape::getArea()


Overrides Shape::getArea() (Computes the shape's area)

[ Top ]

method getCenter [line 395]

void getCenter( )



Tags:

access:  public
see:  Shape::getCenter()


Overrides Shape::getCenter() (Computes the shape's center)

[ Top ]

method getHeight [line 388]

double getHeight( )

Computes Bbox height



Tags:

return:  height
access:  public


[ Top ]

method getWidth [line 380]

double getWidth( )

Computes Bbox width



Tags:

return:  width
access:  public


[ Top ]

method setFrom2Points [line 369]

void setFrom2Points( Point $point0, Point $point1)

Sets Bbox from two points



Tags:

access:  public


Parameters:

Point   $point0   first point
Point   $point1   second point

[ Top ]

method setFromBbox [line 348]

void setFromBbox( double $minx, double $miny, double $maxx, double $maxy)

Sets Bbox from min/max



Tags:

access:  public


Parameters:

double   $minx   minimum X
double   $miny   minimum Y
double   $maxx   maximum X
double   $maxy   maximum Y

[ Top ]

method setFromMsExtent [line 359]

void setFromMsExtent( msExtent $ms_extent)

Sets Bbox from a Mapserver extent



Tags:

access:  public


Parameters:

msExtent   $ms_extent   a Mapserver extent

[ Top ]

method setFromString [line 334]

void setFromString( string $value)

Converts a string to the Bbox (format "11, 22, 33, 44")



Tags:

access:  public


Parameters:

string   $value   a string

[ Top ]

method unserialize [line 320]

void unserialize( mixed $struct)

Unserializes a Bbox

Value passed can be either a string (format "11, 22, 33, 44") or a structure.




Tags:

access:  public
see:  Serializable::unserialize()


Overridden in child classes as:

Rectangle::unserialize()

Overrides Shape::unserialize() (parent method not documented)

Parameters:

mixed   $struct   a string or stdclass

[ Top ]

method __toString [line 415]

string __toString( )

Converts Bbox to string for display



Tags:

return:  Bbox as a string
access:  public


[ Top ]


Documentation generated on Wed, 6 Apr 2005 12:06:25 +0200 by phpDocumentor 1.3.0RC3