BlueSpray - Help
© SchoonerTurtles, Inc. 2012-2015

Introduction
Contents
Getting Started
Download
Navigating
Tutorials
Scripting
Advanced
About

Class STBounds

Extends STBase

A rectangle using Doubles. This was created because the Rectangle.Double is
poorly supported and could cause performance problems. It
is used to maintain objects boundary rectangles and extents.
A Z-value and a depth were added to allow the representation of 3d objects.
Time will not be added here. Time is handled as an attribute of layers.


Copyright, SchoonerTurtles LLP, 2009
@author Jim Graham

Object Functions

Inherited From: STBase
ReturnsFunctionThrows
ClipTo(STBounds TheClip)  
boolean Contains(STBounds TheTarget)  
Expand(double DeltaX,double DeltaY,double DeltaZ)  
double GetXMax()  
double GetXMin()  
double GetYMax()  
double GetYMin()  
double GetZMax()  
double GetZMin()  
boolean In(double RefX,double RefY,double RefZ,double Tolerance)  
Include(STBounds TheBounds)  
Include(double NewX,double NewY)  
Move(double DeltaX,double DeltaY,double DeltaZ)  
boolean Overlaps(STBounds TheBounds)  
  STBounds()  
  STBounds(double NewX,double NewY,double NewWidth,double NewHeight)  
SetXMax(double New)  
SetXMin(double New)  
SetYMax(double New)  
SetYMin(double New)  
SetZMax(double New)  
SetZMin(double New)  

Object Functions


ClipTo(STBounds TheClip)  

Clips the existing rectangle to the space defined by the specified
rectangle. This also creates an intersection of the two rectangles.

Parameters:
    TheClip


boolean Contains(STBounds TheTarget)  

Returns true if the target rectangle is completely contained in this
bounds.

Parameters:
    TheTarget - The other boundary object
Returns: true if the target is inside this bounds, false otherwise


Expand(double DeltaX,double DeltaY,double DeltaZ)  

Expand the rectangle in all directions given the deltas. The deltas
may be negative to shrink the rectangle.

Parameters:
    DeltaX - amount to expand horizontally
    DeltaY - amount to expand vertically


double GetXMax()  

Returns the x-cooridinate on the right side of the bounds. This is typically
the eastern edge of the bounds.

Returns:


double GetXMin()  

Returns the x value of the upper-left corner of the bounds

Returns:


double GetYMax()  

Sets the x value of the upper-left corner of the bounds

Returns:


double GetYMin()  

Returns the y-coordinate at the bottom of the bounds. This is tyipcally the
southern most edge of the bounds.

Returns:


double GetZMax()  

Returns the maximum z-value

Returns:


double GetZMin()  

Sets the x value of the upper-left corner of the bounds

Returns:


boolean In(double RefX,double RefY,double RefZ,double Tolerance)  

Returns true if the specific point is inside this bounds within the
specified tolerance distance.

Parameters:
    X - x value of the point
    Y - y value of the point
    Z - z value of the point
    Tolerance - effectively makes the point larger to overlap with the bounds
Returns:


Include(STBounds TheBounds)  

Makes sure that the specified rectangle is within the bounds of this rectangle.
Will expand this rectangle in any direction required to include the speicified
rectangle.

Parameters:
    TheBounds


Include(double NewX,double NewY)  

Makes sure the specified point is within this rectangle. Will expand
this rectangle in any direction needed to include the point.

Parameters:
    NewX
    NewY


Move(double DeltaX,double DeltaY,double DeltaZ)  

Moves this rectangle by the distances specified.

Parameters:
    DeltaX
    DeltaY


boolean Overlaps(STBounds TheBounds)  

Returns true if this rectangle overlaps with the one specified.

Parameters:
    TheBounds
Returns:


  STBounds()  

Constructs a new STRectangle with all values set to 0.


  STBounds(double NewX,double NewY,double NewWidth,double NewHeight)  

Creates a new rectangle from individual values.

Parameters:
    NewX
    NewY
    NewWidth
    NewHeight


SetXMax(double New)  

Moves the maximum x side of the bounds (right)

Parameters:
    New


SetXMin(double New)  

Sets the x value of the upper-left corner of the bounds

Parameters:
    New


SetYMax(double New)  

Sets the y value of the upper-left corner of the bounds

Parameters:
    New


SetYMin(double New)  

Sets the y-coordinate at the bottom of the bounds. This is tyipcally the
southern most edge of the bounds.

Parameters:
    New


SetZMax(double New)  

Sets the maximum z-value

Parameters:
    New


SetZMin(double New)  

Sets the y value of the upper-left corner of the bounds

Parameters:
    New