API Document Index



Class me.Rect


Extends Object.

Defined in: <build/melonJS-0.9.3.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
me.Rect(v, w, h)
a rectangle Object
Field Summary
Field Attributes Field Name and Description
 
bottom coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)
 
height of the Rectange
 
left coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)
 
pos
position of the Rectange
 
right coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)
 
top
top coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)
 
width of the Rectange
Method Summary
Method Attributes Method Name and Description
 
contains(rect)
check if this rectangle contains the specified one
 
check if this rectangle contains the specified point
 
return a new Rect with this rectangle coordinates
 
overlaps(rect)
check if this rectangle is intersecting with the specified one
 
set(v, w, h)
set new value to the rectangle
 
union(rect)
merge this rectangle with another one
 
within(rect)
check if this rectangle is within the specified one
Class Detail
me.Rect(v, w, h)
a rectangle Object
Parameters:
{me.Vector2d} v
x,y position of the rectange
{int} w
width of the rectangle
{int} h
height of the rectangle
Field Detail
{Int} bottom
bottom coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)

{Int} height
height of the Rectange

{Int} left
left coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)

{me.Vector2d} pos
position of the Rectange

{Int} right
right coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)

{Int} top
top coordinate of the Rectange
takes in account the adjusted size of the rectangle (if set)

{Int} width
width of the Rectange
Method Detail
{boolean} contains(rect)
check if this rectangle contains the specified one
Parameters:
{me.Rect} rect
Returns:
{boolean} true if contains

{boolean} containsPoint(point)
check if this rectangle contains the specified point
Parameters:
{me.Vector2d} point
Returns:
{boolean} true if contains

{me.Rect} getRect()
return a new Rect with this rectangle coordinates
Returns:
{me.Rect} new rectangle

{boolean} overlaps(rect)
check if this rectangle is intersecting with the specified one
Parameters:
{me.Rect} rect
Returns:
{boolean} true if overlaps

set(v, w, h)
set new value to the rectangle
Parameters:
{me.Vector2d} v
x,y position for the rectangle
{int} w
width of the rectangle
{int} h
height of the rectangle

{me.Rect} union(rect)
merge this rectangle with another one
Parameters:
{me.Rect} rect
other rectangle to union with
Returns:
{me.Rect} the union(ed) rectangle

{boolean} within(rect)
check if this rectangle is within the specified one
Parameters:
{me.Rect} rect
Returns:
{boolean} true if within

Documentation generated by JsDoc Toolkit 2.4.0 on Tue May 01 2012 12:00:50 GMT+0800 (CST)