IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Num::BoundingBox2d Class Reference

A 2D bounding box. More...

Inheritance diagram for IG::Num::BoundingBox2d:
Collaboration diagram for IG::Num::BoundingBox2d:

List of all members.

Public Member Functions

 BoundingBox2d ()
 Creates a 2D bounding box with unspecified bounds; minimal co-ordinate components equal to UndefinedMin and maximal co-ordinate components equal do UndefinedMax.
 BoundingBox2d (double minX, double maxX, double minY, double maxY)
 Creates a 2D bounding box with the specified bounds.
 BoundingBox2d (IVector coordinates)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vector.
 BoundingBox2d (IVector min, IVector max)
 Creates a bounding box of the specified dimension and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vectors.
 BoundingBox2d (IBoundingBox bounds)
 Constructs a 2D bounding box of the specified dimension and initializes it in such a way that its bounds correspond to those of the specified bounding box. The specified bounding box must be different than null, otherwise exception is thrown.
 BoundingBox2d (double[] coordinates)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified array.
 BoundingBox2d (double[] min, double[] max)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified arrays.
void Update (vec2 coordinates)
 Updates the bounding box in such a way that the specified co-ordinates fit in it.
void Update (params vec2[] points)
 Updates the bounding box in such a way that all specified points fit in it. If the array of points is empty or null then this function has no effect.
void Update (Vector2d coordinates)
 Updates the bounding box in such a way that the specified co-ordinates fit in it. If the specified coordinates are null then this method has no effect.
void Update (params Vector2d[] points)
 Updates the bounding box in such a way that all specified points fit in it. If the specified array of points is empty or null then this function has no effect. Elements of the array that are null are ignored.

Protected Member Functions

override IVector CreateVector (int dim)
 Creates and returns a new vector that is consistent with the definition of bounding box.

Properties

double MinX [get]
 Gets the lower bound in the first coordinate.
double MaxX [get]
 Gets the upper bound in the first coordinate.
double MinY [get]
 Gets the lower bound in the second coordinate.
double MaxY [get]
 Gets the upper bound in the second coordinate.

Detailed Description

A 2D bounding box.


Constructor & Destructor Documentation

IG::Num::BoundingBox2d::BoundingBox2d ( ) [inline]

Creates a 2D bounding box with unspecified bounds; minimal co-ordinate components equal to UndefinedMin and maximal co-ordinate components equal do UndefinedMax.

IG::Num::BoundingBox2d::BoundingBox2d ( double  minX,
double  maxX,
double  minY,
double  maxY 
) [inline]

Creates a 2D bounding box with the specified bounds.

Parameters:
minXLower bound in the first coordinate.
maxXUpper bound in the first coordinate.
minYLower bound in the second coordinate.
maxYUpper bound in the second coordinate.
IG::Num::BoundingBox2d::BoundingBox2d ( IVector  coordinates) [inline]

Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vector.

Parameters:
coordinatesVector of coordinates to which minimal and maximal co-ordines of the bounding box are set.
IG::Num::BoundingBox2d::BoundingBox2d ( IVector  min,
IVector  max 
) [inline]

Creates a bounding box of the specified dimension and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vectors.

Parameters:
minVector of minimal coordinates.
maxVector of macimal coordinates.
IG::Num::BoundingBox2d::BoundingBox2d ( IBoundingBox  bounds) [inline]

Constructs a 2D bounding box of the specified dimension and initializes it in such a way that its bounds correspond to those of the specified bounding box. The specified bounding box must be different than null, otherwise exception is thrown.

Parameters:
boundsBounds with which the constructed bounding box is initialized.
IG::Num::BoundingBox2d::BoundingBox2d ( double[]  coordinates) [inline]

Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified array.

Parameters:
coordinatesArray of coordinates to which minimal and maximal co-ordines of the bounding box are set.
IG::Num::BoundingBox2d::BoundingBox2d ( double[]  min,
double[]  max 
) [inline]

Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified arrays.

Parameters:
minArray of components to which minimal co-ordines of the bounding box are set.
maxArray of components to which maximal co-ordines of the bounding box are set.

Member Function Documentation

void IG::Num::BoundingBox2d::Update ( vec2  coordinates) [inline]

Updates the bounding box in such a way that the specified co-ordinates fit in it.

Parameters:
coordinatesVector of oordinates for which the bounding box is updated in such a way that they fit in it.
void IG::Num::BoundingBox2d::Update ( params vec2[]  points) [inline]

Updates the bounding box in such a way that all specified points fit in it. If the array of points is empty or null then this function has no effect.

Parameters:
pointsCoordinate vectors of points for which the bounding box is updated in such a way that they fit in it.
void IG::Num::BoundingBox2d::Update ( Vector2d  coordinates) [inline]

Updates the bounding box in such a way that the specified co-ordinates fit in it. If the specified coordinates are null then this method has no effect.

Parameters:
coordinatesVector of oordinates for which the bounding box is updated in such a way that they fit in it.
void IG::Num::BoundingBox2d::Update ( params Vector2d[]  points) [inline]

Updates the bounding box in such a way that all specified points fit in it. If the specified array of points is empty or null then this function has no effect. Elements of the array that are null are ignored.

Parameters:
pointsCoordinate vectors of points for which the bounding box is updated in such a way that they fit in it.
override IVector IG::Num::BoundingBox2d::CreateVector ( int  dim) [inline, protected, virtual]

Creates and returns a new vector that is consistent with the definition of bounding box.

Parameters:
dimDimension of vector space.

Implements IG::Num::BoundingBoxBase.


Property Documentation

double IG::Num::BoundingBox2d::MinX [get]

Gets the lower bound in the first coordinate.

double IG::Num::BoundingBox2d::MaxX [get]

Gets the upper bound in the first coordinate.

double IG::Num::BoundingBox2d::MinY [get]

Gets the lower bound in the second coordinate.

double IG::Num::BoundingBox2d::MaxY [get]

Gets the upper bound in the second coordinate.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events