Performs the scaling transformation of all the points of the box in the form: More...
Inherits global.SystemIDisposable.
Public Member Functions | |
| Box (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| void | Dispose () |
| Box () | |
| Creates a box with infinite boundaries. | |
| Box (cadex.Geom.Point theCorner1, cadex.Geom.Point theCorner2) | |
| Creates a box from 2 points. | |
| cadex.Geom.Point | MinCorner () |
| cadex.Geom.Point | MaxCorner () |
| cadex.Geom.Point | Corner (uint theIdx) |
| Returns one of the bounding box corners. | |
| cadex.Geom.Point | Center () |
| Returns a middle of the diagonal between MinCorner() and MaxCorner(). | |
| void | Add (cadex.Geom.Point thePoint) |
| Takes into account only finite coordinates of thePoint (those whose absolute value is less than \(10^{100}\)). | |
| void | Add (cadex.ModelData.Box theBox) |
| Adjusts the box corners so that it contains theBox. | |
| void | Clear () |
| Assigns infinite values to the coordinates, so that IsInfinite() returns true. | |
| void | SetXRange (double theMin, double theMax) |
| Sets the range of box along X axis to the specified values. | |
| void | SetYRange (double theMin, double theMax) |
| Sets the range of box along Y axis to the specified values. | |
| void | SetZRange (double theMin, double theMax) |
| Sets the range of box along Z axis to the specified values. | |
| void | SetRange (uint theIdx, double theMin, double theMax) |
| Sets one range of the box to the specified values. | |
| double | XRange () |
| Returns the length of range along X axis. | |
| double | YRange () |
| Returns the length of range along Y axis. | |
| double | ZRange () |
| Returns the length of range along Z axis. | |
| double | Range (uint theIndex) |
| void | Enlarge (double theX, double theY, double theZ) |
| Each box extent is shifted by \(\frac{1}{2}\) of the specified shift value to the negative and positive side along respective axis. | |
| void | Enlarge (double theSize) |
| Each box extent is shifted by \(\frac{1}{2}\cdot\mathrm{theSize}\) to the negative and positive side along respective axis. | |
| cadex.ModelData.Box | Enlarged (double theX, double theY, double theZ) |
| Each box extent of the result is shifted by \(\frac{1}{2}\) of the specified shift value to the negative and positive side along respective axis compared to the original. | |
| cadex.ModelData.Box | Enlarged (double theSize) |
| Each box extent of the result is shifted by \(\frac{1}{2}\cdot\mathrm{theSize}\) to the negative and positive side along respective axis compared to the original. | |
| bool | IsIn (cadex.Geom.Point thePoint) |
| Returns true if the point lies inside the box. | |
| bool | Intersects (cadex.ModelData.Box theOther) |
| Returns whether the other box has at least one common point with this box. | |
| bool | IsInfinite () |
| Returns true if at least one coordinate is infinite. | |
| void | Multiply (double theValue) |
| Performs the scaling transformation of all the points of the box in the form: | |
| cadex.ModelData.Box | Multiplied (double theValue) |
| Returns the box scaled by scalar value. | |
| void | Transform (cadex.Geom.Transformation theTransformation) |
| If the transformation does not contain anything besides perhaps a translation, the box dimensions are kept as is and its position is recalculated accordingly. | |
| cadex.ModelData.Box | Transformed (cadex.Geom.Transformation theTransformation) |
| Returns the transformed box. | |
Protected Member Functions | |
| virtual void | Dispose (bool disposing) |
Performs the scaling transformation of all the points of the box in the form:
\[ P'=\mathrm{theVal}^{-1}\; P \]
where \(P\) and \(P'\) are the box points before and after transformation respectively and \(\mathrm{theVal}^{-1}\) is the scale factor.
Performs the scaling transformation of all the points of the box in the form:
\[ P'=\mathrm{theVal}\; P \]
where \(P\) and \(P'\) are the box points before and after transformation respectively and \(\mathrm{theVal}\) is the scale factor.
Returns the result of th scaling transformation of all the points of the box in the form:
\[ P'=\mathrm{theVal}^{-1}\; P \]
where \(P\) and \(P'\) are the box points before and after transformation respectively and \(\mathrm{theVal}^{-1}\) is the scale factor.
Returns the result of the scaling transformation of all the points of the box in the form:
\[ P'=\mathrm{theVal}\; P \]
where \(P\) and \(P'\) are the box points before and after transformation respectively and \(\mathrm{theVal}\) is the scale factor.
Defines a 3D axis-aligned bounding box.
The box is defined via two corners - MinCorner() and MaxCorner() - containing minimum and maximum coordinates respectively.
|
inline |
Creates a box with infinite boundaries.
Constructor.
|
inline |
Creates a box from 2 points.
Minimum corner is determined from the minimum values for each coordinate in the given points. Maximum corner is determined from the maximum values. Constructor.
|
inline |
Takes into account only finite coordinates of thePoint (those whose absolute value is less than \(10^{100}\)).
Adjusts the box corners so that it contains thePoint.
|
inline |
Adjusts the box corners so that it contains theBox.
|
inline |
Returns a middle of the diagonal between MinCorner() and MaxCorner().
Returns a center point.
|
inline |
Assigns infinite values to the coordinates, so that IsInfinite() returns true.
Resets the box.
|
inline |
Returns one of the bounding box corners.
| Corner | Index |
|---|---|
| Minimum corner | 0 |
| Maximum corner | 1 |
|
inline |
Each box extent is shifted by \(\frac{1}{2}\cdot\mathrm{theSize}\) to the negative and positive side along respective axis.
Enlarge the box dimensions by specified value.
|
inline |
Each box extent is shifted by \(\frac{1}{2}\) of the specified shift value to the negative and positive side along respective axis.
Enlarge the box dimensions by specified values.
|
inline |
Each box extent of the result is shifted by \(\frac{1}{2}\cdot\mathrm{theSize}\) to the negative and positive side along respective axis compared to the original.
Return the box with dimensions enlarged by specified value.
|
inline |
Each box extent of the result is shifted by \(\frac{1}{2}\) of the specified shift value to the negative and positive side along respective axis compared to the original.
Return the box with dimensions enlarged by specified values.
|
inline |
Returns whether the other box has at least one common point with this box.
|
inline |
Returns true if the point lies inside the box.
|
inline |
Returns true if at least one coordinate is infinite.
"Infinite" means that coordinate's absolute value is greater than \(10^{100}\).
|
inline |
Returns the box scaled by scalar value.
|
inline |
Performs the scaling transformation of all the points of the box in the form:
\[ P'=\mathrm{theValue}\; P \]
where \(P\) and \(P'\) are the box points before and after transformation respectively and \(\mathrm{theValue}\) is the scale factor. Scales box by scalar value.
|
inline |
Sets one range of the box to the specified values.
| Range axis | Index |
|---|---|
| X | 0 |
| Y | 1 |
| Z | 2 |
|
inline |
Sets the range of box along X axis to the specified values.
|
inline |
Sets the range of box along Y axis to the specified values.
|
inline |
Sets the range of box along Z axis to the specified values.
|
inline |
If the transformation does not contain anything besides perhaps a translation, the box dimensions are kept as is and its position is recalculated accordingly.
If rotation or scale are present, all box corners are transformed and a new axis-aligned box containing them is built. If the box was infinite in one of the directions, the new box will also be infinite in the directions that are results of applying the transformation to the original directions. The new box most likely has larger dimensions than the original.
For more accurate results, it's recommended instead to transform the arguments the box was built from and only then calculate the box. Transforms the box.
|
inline |
Returns the transformed box.
|
inline |
Returns the length of range along X axis.
|
inline |
Returns the length of range along Y axis.
|
inline |
Returns the length of range along Z axis.