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

Class: Bbox

Source Location: /common/BasicTypes.php

Class Overview

CwSerializable
   |
   --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: CwSerializable

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

Class Details

[line 269]
A bounding box (bbox)



Tags:

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


[ Top ]


Class Variables

$maxx =

[line 284]



Tags:

access:  public

Type:   double


[ Top ]

$maxy =

[line 289]



Tags:

access:  public

Type:   double


[ Top ]

$minx =

[line 274]



Tags:

access:  public

Type:   double


[ Top ]

$miny =

[line 279]



Tags:

access:  public

Type:   double


[ Top ]



Class Methods


constructor __construct [line 298]

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

Constructor



Tags:

access:  public


Overrides CwSerializable::__construct() (Constructor)

Parameters:

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

[ Top ]

method getArea [line 402]

void getArea( )



Tags:

access:  public
see:  Shape::getArea()


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

[ Top ]

method getCenter [line 390]

Point getCenter( )



Tags:

access:  public
see:  Shape::getCenter()


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

[ Top ]

method getHeight [line 382]

double getHeight( )

Computes Bbox height



Tags:

return:  height
access:  public


[ Top ]

method getWidth [line 374]

double getWidth( )

Computes Bbox width



Tags:

return:  width
access:  public


[ Top ]

method roundParams [line 412]

array roundParams( array $args, [int $round = 2])

Returns the rounded values of an array of values to specified precision



Tags:

return:  of rounded values
access:  private


Parameters:

array   $args   array of values
int   $round   precision (number of digits after the decimal point)

[ Top ]

method setFrom2Points [line 363]

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

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

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

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 toRemoteString [line 422]

string toRemoteString( [string $divider = ' '])

Converts Bbox to a character-separated string to request remote layer



Tags:

return:  character-separated string
access:  public


Parameters:

string   $divider   separating character

[ Top ]

method unserialize [line 314]

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:  CwSerializable::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 431]

string __toString( )

Converts Bbox to string for display



Tags:

return:  Bbox as a string
access:  public


[ Top ]


Documentation generated on Mon, 13 Feb 2006 11:43:22 +0100 by phpDocumentor 1.3.0RC3