IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Base class for bounding boxes that define minimal and maximal co-ordinates of objects, groups of objects, and regions in space. More...
Public Member Functions | |
BoundingBoxBase (int dimension) | |
Creates a bounding box of the specified dimension and initializes it in such a way that minimal co-ordinate components equal to BoundingBoxBase.UndefinedMin and maximal co-ordinate components equal do BoundingBoxBase.UndefinedMax. More... | |
BoundingBoxBase (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. More... | |
BoundingBoxBase (IVector min, IVector max) | |
Constructs 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. More... | |
BoundingBoxBase (IBoundingBox bounds) | |
Constructs a bounding box of the specified dimension and initializes it in such a way that its bounds correspond to those of the specified bounding box. More... | |
BoundingBoxBase (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. More... | |
BoundingBoxBase (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. More... | |
void | SetDimensionAndReset (int newDimension) |
Changes dimension of the current bounding box to the specified dimension and resets the bounding box. Existent bounds information is lost. More... | |
void | Reset () |
Resets all components of vector of minimal coordinates to BoundingBoxBase.UndefinedMin, and all components of vector of maximal coordinates to BoundingBoxBase.UndefinedMax. More... | |
void | Reset (int componentIndex) |
Resets the specified component of vector of minimal coordinates to UndefinedMin, and the same component of vector of maximal coordinates to UndefinedMax. More... | |
void | ResetMin (int componentIndex) |
Resets the specified minimal coordinate value to UndefinedMin. More... | |
void | ResetMax (int componentIndex) |
Resets the specified maximal coordinate value to UndefinedMax. More... | |
bool | LiesOutside (IVector coordinates) |
Returns true if the speciifed co-ordinates lie outside of the bounding box, and false otherwise. More... | |
bool | LiesOutside (params double[] coordinates) |
Returns true if the speciifed co-ordinates lie outside of the bounding box, and false otherwise. If the specified coordinates are null then false is returned. More... | |
bool | LiesOutside (int componentIndex, double coordinate) |
Returns true of the specified co-ordinate lies outside of the bounding box, and false otherwise. More... | |
bool | LiesOutside (IBoundingBox bounds) |
Returns true if the specified bounding box lise outside of the current bounding box, and false otherwise. If the specified bounding box is null then false is returned. More... | |
void | Update (IVector coordinates) |
Updates the bounding box in such a way that the specified vector fits in it. If the specified vector is null then this method has no effect. More... | |
void | Update (params IVector[] points) |
Updates the bounding box in such a way that all specified vectors fit in it. More... | |
void | Update (params double[] coordinates) |
Updates the bounding box in such a way that a vector with the specified co-ordinates fits in it. More... | |
void | Update (int componentIndex, double coordinate) |
Updates the bounding box in such a way that the specified value of the specified co-ordinate component (defined by co-ordinate index) fits in it. More... | |
void | Update (int componentIndex, params double[] coordinates) |
Updates the bounding box in such a way that all specified values of the specified co-ordinate component fit in it. More... | |
void | Update (IBoundingBox bounds) |
Updates the bounding box in such a way that the specified other bounding box fits in it. If the specified bounding box is null then this method has no effect. More... | |
void | UpdateAll (params double[] coordinates) |
Updates the current bounding box in such a way that in all components, all specified coordinates fit in it. This is for example useful to define a hypercube (equal minimum and maximum in all components), in this case just minimal and maximal bounds are specified as arguments. More... | |
void | Shrink (IBoundingBox outerBounds) |
Reduces (if necessary) the current bounding box in such a way that the specified bounding box contains it. More... | |
void | Shrink (int which, double minBound, double maxBound) |
Reduces (if necessary) the current bounding box in such a way that the specified component falls within the interval specified by the lower and upper bound. More... | |
void | ExpandOrShrinkInterval (int componentIndex, double factor) |
Symmetrically expands or shrinks the interval between the bounds for the specified component for the specified factor. More... | |
void | ExpandOrShrinkInterval (double factor) |
Symmetrically expands or shrinks the intervals between the bounds for all components for the specified factor. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid. More... | |
void | ExpandOrShrinkInterval (double factor, double zeroIntervalLengthReplacemnt) |
Symmetrically expands or shrinks the intervals between the bounds for all components for the specified factor, and takes care that minimal interval lengths are not 0. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid. Remark: components where minimal bound is set above maximal are not treated specially. More... | |
void | SetMin (int componentIndex, double min) |
Sets minimal value for the specified coponent of the bounding box. More... | |
void | SetMax (int componentIndex, double max) |
Sets maximal value for the specified coponent of the bounding box. More... | |
void | SetBounds (int componentIndex, double min, double max) |
Sets minimal and maximal value for the specified coponent of the bounding box. More... | |
double | GetMin (int componentIndex) |
Returns the lower bound on the specified co-ordinate component of the bounding box. More... | |
double | GetMax (int componentIndex) |
Returns the upper bound on the specified co-ordinate component of the bounding box. More... | |
void | GetMin (ref IVector min) |
Gets the vector of lower bounds on co-ordinates of the current bounding box and stores it in the specified object. More... | |
void | GetMax (ref IVector max) |
Gets the vector of upper bounds on co-ordinates of the current bounding box and stores it in the specified object. More... | |
double | GetIntervalLength (int componentIndex) |
Returns interval length for the specified co-ordinate component (i.e. difference between the upper and lower bound), or 0 if either lower or upper bound is not defined for this component. More... | |
void | GetIntervalLengths (ref IVector intervals) |
Gets the interval lengths for co-ordinates of the current bounding box (i.e. differences) and stores them in the specified vector object. More... | |
void | GetRelativeCoordinates (IVector absoluteCoordinates, ref IVector relativeCoordinates) |
Calculates relative coordinates, with respect to the current bounding box, that correspond to the specified absolute (or physical or actual) coordinates. More... | |
void | GetAbsoluteCoordinates (IVector relativeCoordinates, ref IVector absoluteCoordinates) |
Calculates absolute (physical) coordinates, with respect to the current bounding box, that correspond to the specified relative coordinates. More... | |
bool | IsMinDefined (int componentIndex) |
Returns true if maximum value is defined for the specified component, false otherwise. More... | |
bool | IsMaxDefined (int componentIndex) |
Returns true if maximum value is defined for the specified component, false otherwise. More... | |
override string | ToString () |
void | GetRandomPoint (ref IVector point) |
Creates a random point contained in the current bounding box by using the global random number generator, and stores that point into the specified vector. The random point is generated according to a uniform distribution within the bounding box. More... | |
void | GetRandomPoint (ref IVector point, IRandomGenerator rand) |
Creates a random point contained in the current bounding box by using the specified random number generator, and stores that point into the specified vector. The random point is generated according to a uniform distribution within the bounding box. More... | |
void | Copy (IBoundingBox original, IBoundingBox copy) |
Copies state of the specified bounding box to anotherv(target) bounding box. More... | |
Static Public Member Functions | |
static BoundingBox | Create (int dimension, double min, double max) |
Creates and returns a bounding box with specified dimension and minimum and maximum bounds equal in all components. More... | |
static BoundingBox | Create (params IVector[] points) |
Creates and returns a minimal bounding box that contains all the specified points. More... | |
static double | Map (IBoundingBox original, IBoundingBox target, int whichComponent, double value) |
Mapping from one bounding box to another. Returns a single component mapped by a mapping that maps the original to the target bounding box. If one of the bounding boxes is not specified then the performed mapping is identity mapping and does not change the value. More... | |
static void | Map (IBoundingBox original, IBoundingBox target, IVector value, ref IVector result) |
Mapping from one bounding box to another. Maps a vector from the original to the target space. Mapped vector is stored to a specified vector. If one of the bounding boxes is not specified then the performed mapping is identity mapping and does not change the value. More... | |
Protected Member Functions | |
abstract IVector | CreateVector (int dim) |
Creates and returns a new vector that is consistent with the definition of bounding box. More... | |
void | ResetMin () |
Sets all components of vector of minimal coordinates to UndefinedMin. More... | |
void | ResetMax () |
Sets all components of vector of maximal coordinates to UndefinedMax. More... | |
Protected Attributes | |
const double | UndefinedMin = double.MinValue |
const double | UndefinedMax = double.MaxValue |
Properties | |
IVector | MinAuxiliary [get, set] |
Auxiliary property, gets or sets vector of minimal co-ordinates. More... | |
IVector | MaxAuxiliary [get, set] |
Auxiliary property, gets or sets vector of maximal co-ordinates. More... | |
int | Dimension [get, protected set] |
Gets dimension of the bounding box space. More... | |
virtual IVector | Min [get, set] |
Gets or sets the vector of minimal co-ordinates of the bounding box. More... | |
virtual IVector | Max [get, set] |
Gets or sets the vector of maximal co-ordinates of the bounding box. More... | |
Properties inherited from IG.Num.IBoundingBox | |
int | Dimension [get] |
Gets dimension of the bounding box space. More... | |
IVector | Min [get, set] |
Gets or sets the vector of minimal co-ordinates of the bounding box. More... | |
IVector | Max [get, set] |
Gets or sets the vector of maximal co-ordinates of the bounding box. More... | |
Private Attributes | |
IVector | _minAux |
IVector | _maxAux |
int | _dimension = 0 |
Base class for bounding boxes that define minimal and maximal co-ordinates of objects, groups of objects, and regions in space.
$A Igor Mar10 Nov10;
|
inline |
Creates a bounding box of the specified dimension and initializes it in such a way that minimal co-ordinate components equal to BoundingBoxBase.UndefinedMin and maximal co-ordinate components equal do BoundingBoxBase.UndefinedMax.
dimension | Dimension of the space in which bounding box is defined. |
|
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.
coordinates | Vector of coordinates to which minimal and maximal co-ordines of the bounding box are set. |
|
inline |
Constructs a 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.
bounds | Bounds with which the constructed bounding box is initialized. |
|
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.
coordinates | Array of coordinates to which minimal and maximal co-ordines of the bounding box are set. |
|
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.
min | Array of components to which minimal co-ordines of the bounding box are set. |
max | Array of components to which maximal co-ordines of the bounding box are set. |
|
protectedpure virtual |
Creates and returns a new vector that is consistent with the definition of bounding box.
dim | Dimension of vector space. |
Implemented in IG.Num.BoundingBox1d, IG.Num.BoundingBox2d, IG.Num.BoundingBox3d, and IG.Num.BoundingBox.
|
inline |
Changes dimension of the current bounding box to the specified dimension and resets the bounding box. Existent bounds information is lost.
newDimension | New dimenson of the bounding box. |
Implements IG.Num.IBoundingBox.
|
inlineprotected |
Sets all components of vector of minimal coordinates to UndefinedMin.
|
inlineprotected |
Sets all components of vector of maximal coordinates to UndefinedMax.
|
inline |
Resets all components of vector of minimal coordinates to BoundingBoxBase.UndefinedMin, and all components of vector of maximal coordinates to BoundingBoxBase.UndefinedMax.
After this method is called, Update() called on any co-ordinate of the bounding box will set both bounds of that coordinate exactly to the value of coordinate passed as argument.
After reset, bounds on the reset coordinates become undefined.
Implements IG.Num.IBoundingBox.
|
inline |
Resets the specified component of vector of minimal coordinates to UndefinedMin, and the same component of vector of maximal coordinates to UndefinedMax.
After this method is called, the first Update() called on this component will set the bounds exactly to value that is passed as argument.
After reset, bounds on the reset coordinates become undefined.
Implements IG.Num.IBoundingBox.
|
inline |
Resets the specified minimal coordinate value to UndefinedMin.
After this method is called, the first update called on this coordinate component will set its lower bound exactly to the value that is passed as argument.
After reset, specific bounds on the reset coordinates become undefined.
Implements IG.Num.IBoundingBox.
|
inline |
Resets the specified maximal coordinate value to UndefinedMax.
After this method is called, the first update called on this coordinate component will set its upper bound exactly to the value that is passed as argument.
After reset, specific bounds on the reset coordinates become undefined.
Implements IG.Num.IBoundingBox.
|
inline |
Returns true if the speciifed co-ordinates lie outside of the bounding box, and false otherwise.
If the specified coordinates are null then false is returned, if dimensions do not match then exception is thrown.
coordinates | Coordinates that are tested for falling outside the bounding box. |
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
|
inline |
Returns true if the speciifed co-ordinates lie outside of the bounding box, and false otherwise. If the specified coordinates are null then false is returned.
coordinates | Coordinates that are tested for falling outside the bounding box. |
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
|
inline |
Returns true of the specified co-ordinate lies outside of the bounding box, and false otherwise.
componentIndex | Index of co-ordinate component that is tested for lying out of the bounding box. |
coordinate | Co-ordinate component that is tested for lying outside of the bounding box. |
Implements IG.Num.IBoundingBox.
|
inline |
Returns true if the specified bounding box lise outside of the current bounding box, and false otherwise. If the specified bounding box is null then false is returned.
bounds | Bounding box that is tested for falling outside the current bounding box. |
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
References IG.Num.IBoundingBox.GetMax(), and IG.Num.IBoundingBox.GetMin().
|
inline |
Updates the bounding box in such a way that the specified vector fits in it. If the specified vector is null then this method has no effect.
coordinates | Vector that needs to fit into the bounding box after this call. |
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
Referenced by IG.Num.BoundingBoxBase.Create(), IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridContours(), IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridEfficient(), IG.Gr3d.TestVtkGraphicBase.ExampleStructuredGrid(), and IG.Num.NeuralApproximatorBase.TestMapping().
|
inline |
Updates the bounding box in such a way that all specified vectors fit in it.
If any of the specified vector is null then this entry has no effect, and if the array is null then the method call has no effect.
points | Vector of coordinates that need to fit into the bounding box after this call. |
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
|
inline |
Updates the bounding box in such a way that a vector with the specified co-ordinates fits in it.
If the specified array of co-ordinate values is null then this method has no effect.
Number of specified co-ordinates must match dimension of the bounding box.
coordinates | Array of co/ordinate components of the vector to which the bounding box is adapted in such a way that the vector fits in the bounding box after the call. |
Number of specified co-ordinates must match the dimension of the bounding box.
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
|
inline |
Updates the bounding box in such a way that the specified value of the specified co-ordinate component (defined by co-ordinate index) fits in it.
componentIndex | Index of the co-ordinate component that is updated. |
coordinate | Co-ordinate value to which the bounding box is adapted in such a way that this co-ordinate value fits inside it. |
Implements IG.Num.IBoundingBox.
|
inline |
Updates the bounding box in such a way that all specified values of the specified co-ordinate component fit in it.
If the specified array of the coordinate values is null then this method has no effect.
Update is performed for a particular coordinate of the bounding box, and all specified values are taken into account.
componentIndex | Index of co-ordinate component in which the bounding box is updated. |
coordinates | Values of co-ordinate component to which the bounding box is adapted in such a way that these values fit inside it (in the specified co-ordinate direction). |
Implements IG.Num.IBoundingBox.
|
inline |
Updates the bounding box in such a way that the specified other bounding box fits in it. If the specified bounding box is null then this method has no effect.
WARNING: Components of the bounding box that are not defined can not result in any changes in the current bounding box..
bounds | Bounding box that needs to fit into bounding box after this call. |
ArgumentException | Throws exception when dimensions don't match. |
Implements IG.Num.IBoundingBox.
References IG.Num.IBoundingBox.GetMax(), IG.Num.IBoundingBox.GetMin(), IG.Num.IBoundingBox.IsMaxDefined(), and IG.Num.IBoundingBox.IsMinDefined().
|
inline |
Updates the current bounding box in such a way that in all components, all specified coordinates fit in it. This is for example useful to define a hypercube (equal minimum and maximum in all components), in this case just minimal and maximal bounds are specified as arguments.
coordinates | Co-ordinates to which the bounding box is adapted in all axis directions in such a way that the specified co-ordinates fit inside it. |
Implements IG.Num.IBoundingBox.
|
inline |
Reduces (if necessary) the current bounding box in such a way that the specified bounding box contains it.
Minimal and maximal components of the current bounding box that don't fall in the specified bounding box are changed such that they lie just on the border of the bounding box, and others remain intact.
outerBounds | Bounding box that specify the area within which the current bounding box must fit. Components that fall out of this bounding box are moved to the border of this bounding box (and the current bounding box shrinks because of this). |
Implements IG.Num.IBoundingBox.
References IG.Num.IBoundingBox.Dimension, IG.Num.IBoundingBox.GetMax(), IG.Num.IBoundingBox.GetMin(), IG.Num.IBoundingBox.IsMaxDefined(), and IG.Num.IBoundingBox.IsMinDefined().
|
inline |
Reduces (if necessary) the current bounding box in such a way that the specified component falls within the interval specified by the lower and upper bound.
which | Index of the component along which the bounding box is reduced if nexessary. |
minBound | Lower bound on the interval that is admissible in the specified coordinate direction. |
maxBound | Upper bound on the interval that is admissible in the specified coordinate direction. |
Implements IG.Num.IBoundingBox.
|
inline |
Symmetrically expands or shrinks the interval between the bounds for the specified component for the specified factor.
Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid.
If lower or upper bound of the specified component is not defined then this method has no effect.
componentIndex | Component of the coordinate to be expanded or shrinked. |
factor | Factor by which the interval between bounds is expanded or shrinked. Factors greater than 1 mean expansion, factors less than 1 mean shrinkage, and factors less than 0 are invalid (ArgumentException thrown). |
Implements IG.Num.IBoundingBox.
|
inline |
Symmetrically expands or shrinks the intervals between the bounds for all components for the specified factor. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid.
factor | Factor by which the interval between bounds is expanded or shrinked. Factors greater than 1 mean expansion, factors less than 1 mean shrinkage, and factors less than 0 are invalid (ArgumentException thrown). |
Implements IG.Num.IBoundingBox.
|
inline |
Symmetrically expands or shrinks the intervals between the bounds for all components for the specified factor, and takes care that minimal interval lengths are not 0. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid. Remark: components where minimal bound is set above maximal are not treated specially.
factor | Factor by which the interval between bounds is expanded or shrinked. Factors greater than 1 mean expansion, factors less than 1 mean shrinkage, and factors less than 0 are invalid (ArgumentException thrown). |
zeroIntervalLengthReplacemnt | Interval length that is taken for those components for which the current interval length equals 0 (i.e. lower bound equals upper bound). |
Implements IG.Num.IBoundingBox.
|
inline |
Sets minimal value for the specified coponent of the bounding box.
componentIndex | Component index. |
min | Minimal value of the component. |
Implements IG.Num.IBoundingBox.
Referenced by IG.Script.ScriptGraphics3DBase.SetPlotBounds().
|
inline |
Sets maximal value for the specified coponent of the bounding box.
componentIndex | Component index. |
max | Maximal value of the component. |
Implements IG.Num.IBoundingBox.
Referenced by IG.Script.ScriptGraphics3DBase.SetPlotBounds().
|
inline |
Sets minimal and maximal value for the specified coponent of the bounding box.
componentIndex | Component index. |
min | Minimal value of the component. |
max | Maximal value of the component. |
Implements IG.Num.IBoundingBox.
|
inline |
Returns the lower bound on the specified co-ordinate component of the bounding box.
If lower bound is not defined for this component then double.MinValue is returned.
componentIndex | Component index. |
Implements IG.Num.IBoundingBox.
Referenced by IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridContours(), IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridEfficient(), and IG.Gr3d.TestVtkGraphicBase.ExampleStructuredGrid().
|
inline |
Returns the upper bound on the specified co-ordinate component of the bounding box.
If upper bound is not defined for this component then double.MaxValue is returned.
componentIndex | Component index. |
Implements IG.Num.IBoundingBox.
Referenced by IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridContours(), IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridEfficient(), and IG.Gr3d.TestVtkGraphicBase.ExampleStructuredGrid().
|
inline |
Gets the vector of lower bounds on co-ordinates of the current bounding box and stores it in the specified object.
Components for which lower bounds are not defined are set to double.MinValue.
min | Reference to a vector object where lower bounds (minimal co-ordinates) are stored. |
Implements IG.Num.IBoundingBox.
References IG.Num.VectorBase.Resize().
|
inline |
Gets the vector of upper bounds on co-ordinates of the current bounding box and stores it in the specified object.
Components for which upper bounds are not defined are set to double.MaxValue.
max | Reference to a vector object where upper bounds (maximal co-ordinates) are stored. |
Implements IG.Num.IBoundingBox.
References IG.Num.VectorBase.Resize().
|
inline |
Returns interval length for the specified co-ordinate component (i.e. difference between the upper and lower bound), or 0 if either lower or upper bound is not defined for this component.
componentIndex | Specifies the component for which interval length is returned. |
Implements IG.Num.IBoundingBox.
|
inline |
Gets the interval lengths for co-ordinates of the current bounding box (i.e. differences) and stores them in the specified vector object.
Elements for which either upper or lower bounds are not defined are set to 0.
intervals | Reference to a vector object where interval lengths are stored. |
Implements IG.Num.IBoundingBox.
References IG.Num.VectorBase.Resize().
|
inline |
Calculates relative coordinates, with respect to the current bounding box, that correspond to the specified absolute (or physical or actual) coordinates.
absoluteCoordinates | Vector of absolute coordinates. |
relativeCoordinates | Vector where corresponding relative coordinates are stored. |
Implements IG.Num.IBoundingBox.
References IG.Num.VectorBase.Resize().
|
inline |
Calculates absolute (physical) coordinates, with respect to the current bounding box, that correspond to the specified relative coordinates.
absoluteCoordinates | Vector of relative coordinates. |
relativeCoordinates | Vector where corresponding absolute coordinates are stored. |
Implements IG.Num.IBoundingBox.
References IG.Num.VectorBase.Resize().
|
inline |
Returns true if maximum value is defined for the specified component, false otherwise.
componentIndex | Index of component that is queried. |
Implements IG.Num.IBoundingBox.
|
inline |
Returns true if maximum value is defined for the specified component, false otherwise.
componentIndex | Index of component that is queried. |
Implements IG.Num.IBoundingBox.
|
inline |
|
inline |
Creates a random point contained in the current bounding box by using the global random number generator, and stores that point into the specified vector. The random point is generated according to a uniform distribution within the bounding box.
point | Vector where generated random point is stored. |
Implements IG.Num.IBoundingBox.
References IG.Num.RandomGenerator.Global.
|
inline |
Creates a random point contained in the current bounding box by using the specified random number generator, and stores that point into the specified vector. The random point is generated according to a uniform distribution within the bounding box.
point | Vector where generated random point is stored. |
rand | Random number generator used for generation of the random point. |
Implements IG.Num.IBoundingBox.
References IG.Num.IRandomGenerator.NextDoubleInclusive(), and IG.Num.VectorBase.Resize().
|
inline |
Copies state of the specified bounding box to anotherv(target) bounding box.
The target bounding box must be allocated and of the same dimension as the original bounding box.
original | Bounding box to be copied. |
copy | Bounding box where copy of the original is stored. |
ArgumentException | When dimensions don't match or one of the counding boxes is null. |
References IG.Num.IBoundingBox.Dimension, IG.Num.IBoundingBox.Reset(), and IG.Num.IBoundingBox.Update().
|
inlinestatic |
Creates and returns a bounding box with specified dimension and minimum and maximum bounds equal in all components.
dimension | Dimension of the bounding box. |
min | Minimal bound for all components. |
max | Maximal bound for all components. |
References IG.Num.BoundingBoxBase.Update().
Referenced by IG.Num.SampledDataSet.CreateExampleLinear(), and IG.Num.SampledDataSet.CreateExampleQuadratic().
|
inlinestatic |
Creates and returns a minimal bounding box that contains all the specified points.
points | Points (vectors) defining the created bounding box. Some vectors in this array can be null, but all non-null vector must have the same dimension. |
References IG.Num.BoundingBoxBase.Update().
|
inlinestatic |
Mapping from one bounding box to another. Returns a single component mapped by a mapping that maps the original to the target bounding box. If one of the bounding boxes is not specified then the performed mapping is identity mapping and does not change the value.
original | Original bounding box. |
target | Target bounding box, mapping maps the originl bounding box to this one. |
whichComponent | Index of component that is mapped. |
value | Value that is mapped (individual component of an element of the vector space). |
References IG.Num.IBoundingBox.Dimension, IG.Num.IBoundingBox.GetMax(), and IG.Num.IBoundingBox.GetMin().
Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData(), IG.Gr3d.VtkPlotBase.ExampleSurfacePlotManualScaled(), IG.Num.NeuralApproximatorBase.MapFromNeuralInput(), IG.Num.NeuralApproximatorBase.MapFromNeuralOutput(), IG.Num.NeuralApproximatorBase.MapInput(), IG.Num.NeuralApproximatorBase.MapOutput(), IG.Forms.VectorFunctionPlotter2d.PlotParametricTest(), and IG.Gr3d.VtkPlotter.ScaleCoordinatesPlain().
|
inlinestatic |
Mapping from one bounding box to another. Maps a vector from the original to the target space. Mapped vector is stored to a specified vector. If one of the bounding boxes is not specified then the performed mapping is identity mapping and does not change the value.
original | Original bounding box. |
target | Target bounding box, mapping maps the originl bounding box to this one. |
value | Vector that is mapped. |
result | Vecto where the mapped vectr is stored. |
References IG.Num.VectorBase.Copy(), IG.Num.IBoundingBox.Dimension, IG.Num.IBoundingBox.GetMax(), IG.Num.IBoundingBox.GetMin(), and IG.Num.VectorBase.Resize().
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
getsetprotected |
Auxiliary property, gets or sets vector of minimal co-ordinates.
Setter just sets reference to the vector passed and does not create a copy.
|
getsetprotected |
Auxiliary property, gets or sets vector of maximal co-ordinates.
Setter just sets reference to the vector passed and does not create a copy.
|
getprotected set |
Gets dimension of the bounding box space.
Setter is not public. In order to change dimension, use the ChangeDimensionAndReset() method! This method can not be overridden. Setter is protected. If dimension is set to a new value then internal vectors of minimal and maximal values are allocated anew and reset.
|
getset |
Gets or sets the vector of minimal co-ordinates of the bounding box.
Getter always creates and returns a new vector whose elements are minimal components of the bounding box.
Setter copies components rather than vector reference (if the vector assigned is null then exception is thrown). When setting the vector, its dimension must match current dimension of the bounding box, otherwise exception is thrown.
If dimension needs to be changed then one must set the Dimension property first. This will also reset the bounding box, and a more transparent approach is to create a new bounding box.
Referenced by IG.Gr3d.VtkPlotBase.ExampleSurfacePlotManualScaled(), IG.Gr3d.VtkPlotBase.ExampleSurfacePlotScaled(), and IG.Forms.VectorFunctionPlotter2d.PlotParametricTest().
|
getset |
Gets or sets the vector of maximal co-ordinates of the bounding box.
Getter always creates and returns a new vector whose elements are maximal components of the bounding box.
Setter copies components rather than vector reference (if the vector assigned is null then exception is thrown). When setting the vector, its dimension must match current dimension of the bounding box, otherwise exception is thrown.
If dimension needs to be changed then one must set the Dimension property first. This will also reset the bounding box, and a more transparent approach is to create a new bounding box.
Referenced by IG.Gr3d.VtkPlotBase.ExampleSurfacePlotManualScaled(), IG.Gr3d.VtkPlotBase.ExampleSurfacePlotScaled(), and IG.Forms.VectorFunctionPlotter2d.PlotParametricTest().