Box2i
Constructors
Constructor | Description |
new(min, max)
Signature: (min:V2i * max:V2i) -> unit
|
Creates a box from minimum and maximum limits. |
new(minX, minY, maxX, maxY)
Signature: (minX:int * minY:int * maxX:int * maxY:int) -> unit
|
Creates a box from minimum and maximum limits. |
new(pnt)
Signature: pnt:V2i -> unit
|
Creates infinitesimal box from single point. |
new(p0, p1, p2)
Signature: (p0:V2i * p1:V2i * p2:V2i) -> unit
|
Creates a box from 3 points. |
new(p0, p1, p2, p3)
Signature: (p0:V2i * p1:V2i * p2:V2i * p3:V2i) -> unit
|
Creates a box from 4 points. |
new(range)
Signature: range:Box2i -> unit
|
Creates copy of existing range. |
new(b0, b1)
Signature: (b0:Box2i * b1:Box2i) -> unit
|
Create a box containing all supplied boxs. |
new(b0, b1, b2)
Signature: (b0:Box2i * b1:Box2i * b2:Box2i) -> unit
|
Create a box containing all supplied boxs. |
new(b0, b1, b2, b3)
Signature: (b0:Box2i * b1:Box2i * b2:Box2i * b3:Box2i) -> unit
|
Create a box containing all supplied boxs. |
new(points)
Signature: (points:V2i []) -> unit
|
Creates box as the bounding box of given points. |
new(points, start, count)
Signature: (points:V2i [] * start:int64 * count:int64) -> unit
|
Creates box as the bounding box of count of the given points starting at start. |
new(points)
Signature: points:IEnumerable<V2i> -> unit
|
Creates box as the bounding box of given points. |
new(boxes)
Signature: boxes:IEnumerable<Box2i> -> unit
|
Creates box as the bounding box of given boxes. |
new(rangeX, rangeY)
Signature: (rangeX:Range1i * rangeY:Range1i) -> unit
|
Creates box from a Range1 in each direction. |
Instance members
Instance member | Description |
Area
Signature: int
|
|
BoundingBox2d
Signature: Box2d
Modifiers: abstract |
|
Center
Signature: V2i
Modifiers: abstract |
|
Clamped(p)
Signature: p:V2i -> V2i
|
Return the point in the Box that is closest to the supplied point. |
ComputeCorners()
Signature: unit -> V2i []
|
Computes the corners of the box and returns them in an array. The order of the corners is determined by their index which is constructed as in the method . |
Contains(p)
Signature: p:V2i -> bool
Modifiers: abstract |
Returns true if the box contains the given point. |
Contains(b)
Signature: b:Box2i -> bool
Modifiers: abstract |
Returns true if the box completely contains the given box. |
Corner(index)
Signature: index:int -> V2i
|
Return the corner of the box with the given index. The corner index is constructed in such a way, that bit 0 enumerates the x coordinate (0 ... min, 1 ... max), bit 1 enumerates the y coordinate, and bit 2 enumerates the z coordinate. |
EnlargeBy(delta)
Signature: delta:V2i -> unit
Modifiers: abstract |
Enlarges box by the supplied value in all directions. |
EnlargeBy(deltaMin, deltaMax)
Signature: (deltaMin:V2i * deltaMax:V2i) -> unit
Modifiers: abstract |
Enlarges box by the supplied values. |
EnlargeBy(delta)
Signature: delta:int -> unit
|
Enlarges box by specified value in all directions. |
EnlargeBy(...)
Signature: (deltaMinX:int * deltaMaxX:int * deltaMinY:int * deltaMaxY:int) -> unit
|
Enlarges the box by the specified values (paddings). |
EnlargedBy(increment)
Signature: increment:V2i -> Box2i
Modifiers: abstract |
Return box enlarged by the supplied value in all directions. |
EnlargedBy(deltaMin, deltaMax)
Signature: (deltaMin:V2i * deltaMax:V2i) -> Box2i
Modifiers: abstract |
Return box enlarged by the supplied values. |
EnlargedBy(delta)
Signature: delta:int -> Box2i
|
Returns a box enlarged by the specified value in all directions. |
EnlargedBy(...)
Signature: (deltaMinX:int * deltaMaxX:int * deltaMinY:int * deltaMaxY:int) -> Box2i
|
Returns the box enlarged by the specified values (paddings). |
EnumerateInsidePoints()
Signature: unit -> IEnumerable<V2i>
|
Returns all points from [Min,Max[ with X-Variable in the outer loop. |
Equals(obj)
Signature: obj:obj -> bool
Modifiers: abstract |
|
ExtendBy(box)
Signature: box:Box2i -> unit
Modifiers: abstract |
Extends the box to contain the supplied box. |
ExtendBy(point)
Signature: point:V2i -> unit
Modifiers: abstract |
Extends the box to contain the supplied value. |
ExtendDimBy(dim, x)
Signature: (dim:int * x:int) -> Box2i
|
|
ExtendedBy(b)
Signature: b:Box2i -> Box2i
Modifiers: abstract |
Returns the box extended to contain the supplied box. |
ExtendedBy(v)
Signature: v:V2i -> Box2i
Modifiers: abstract |
Returns the box extended to contain the supplied value. |
ExtendXBy(x)
Signature: x:int -> Box2i
|
|
ExtendYBy(y)
Signature: y:int -> Box2i
|
|
GetHashCode()
Signature: unit -> int
Modifiers: abstract |
|
GetMinMaxInDirection(v, vMin, vMax)
Signature: (v:V2i * vMin:byref<V2i> * vMax:byref<V2i>) -> unit
|
Gets the minimal and maximal points of the box when seen from the supplied direction vector v. |
II
Signature: V2i
|
|
Intersection(b)
Signature: b:Box2i -> Box2i
|
|
Intersects(box)
Signature: box:Box2i -> bool
Modifiers: abstract |
Returns true if 2 boxes intersect each other. |
Intersects(box, eps)
Signature: (box:Box2i * eps:V2i) -> bool
Modifiers: abstract |
Returns true if 2 boxes intersect each other with tolerance parameter. |
Intersects(box, eps)
Signature: (box:Box2i * eps:int) -> bool
|
Returns true if 2 boxes intersect each other with tolerance parameter. |
Invalidate()
Signature: unit -> Box2i
|
|
IO
Signature: V2i
|
|
IsEmpty
Signature: bool
Modifiers: abstract |
True if the box is invalid or has a zero volume. |
IsInfinite
Signature: bool
|
True if the box is infinite. |
IsInvalid
Signature: bool
Modifiers: abstract |
True if the box is invalid. |
IsNonEmpty
Signature: bool
Modifiers: abstract |
True if the box has a non-zero volume. |
IsValid
Signature: bool
Modifiers: abstract |
True if the box is valid. |
MajorDim
Signature: int
|
Index of the longest dimension of the box. |
MinorDim
Signature: int
|
Index of the shortest dimension of the box. |
OI
Signature: V2i
|
|
OO
Signature: V2i
|
|
OutsideFlags(p0)
Signature: p0:V2i -> Flags
|
Returns where a points coordinates are outside a given box |
OutsideFlags(b)
Signature: b:Box2i -> Flags
|
Returns where the planes of the supplied box b are outside of the box. |
RangeX
Signature: Range1i
|
|
RangeY
Signature: Range1i
|
|
Repair()
Signature: unit -> Box2i
Modifiers: abstract |
Checks if the box is still valid and repairs if not. |
Scaled(factor)
Signature: factor:V2i -> Box2i
|
Returns a scaled box. WARNING: scaling is performed around the origin! A negative scale factor will resut in an invalid box! |
ShrinkBy(delta)
Signature: delta:V2i -> unit
Modifiers: abstract |
Shrinks box by the supplied value in all directions. |
ShrinkBy(deltaMin, deltaMax)
Signature: (deltaMin:V2i * deltaMax:V2i) -> unit
Modifiers: abstract |
Shrinks box by the supplied values. |
ShrinkBy(delta)
Signature: delta:int -> unit
|
Shrinks box by specified value in all directions. |
ShrinkBy(...)
Signature: (deltaMinX:int * deltaMaxX:int * deltaMinY:int * deltaMaxY:int) -> unit
|
Shrinks the box by the specified values (paddings). |
ShrunkBy(delta)
Signature: delta:V2i -> Box2i
Modifiers: abstract |
Return box shrunk by the supplied value in all directions. |
ShrunkBy(deltaMin, deltaMax)
Signature: (deltaMin:V2i * deltaMax:V2i) -> Box2i
Modifiers: abstract |
Return box shrunk by the supplied values. |
ShrunkBy(delta)
Signature: delta:int -> Box2i
|
Returns a box shrunk by the specified value in all directions. |
ShrunkBy(...)
Signature: (deltaMinX:int * deltaMaxX:int * deltaMinY:int * deltaMaxY:int) -> Box2i
|
Returns the box shrunk by the specified values (paddings). |
Size()
Signature: unit -> unit
Modifiers: abstract |
Calculates size of the box. |
Size2d
Signature: V2d
Modifiers: abstract |
|
SizeX()
Signature: unit -> unit
|
|
SizeY()
Signature: unit -> unit
|
|
SplitBottom(splitAtY)
Signature: splitAtY:int -> Box2i
|
|
SplitLeft(splitValue)
Signature: splitValue:V2i -> Box2i
Modifiers: abstract |
|
SplitLeft(splitAtX)
Signature: splitAtX:int -> Box2i
|
|
SplitLeftBottom(splitAt)
Signature: splitAt:V2i -> Box2i
|
|
SplitLeftTop(splitAt)
Signature: splitAt:V2i -> Box2i
|
|
SplitRight(splitValue)
Signature: splitValue:V2i -> Box2i
Modifiers: abstract |
|
SplitRight(splitAtX)
Signature: splitAtX:int -> Box2i
|
|
SplitRightBottom(splitAt)
Signature: splitAt:V2i -> Box2i
|
|
SplitRightTop(splitAt)
Signature: splitAt:V2i -> Box2i
|
|
SplitTop(splitAtY)
Signature: splitAtY:int -> Box2i
|
|
ToString()
Signature: unit -> string
Modifiers: abstract |
|
ToString(format)
Signature: format:string -> string
|
|
ToString(format, fp)
Signature: (format:string * fp:IFormatProvider) -> string
Modifiers: abstract |
|
ToString(...)
Signature: (format:string * fp:IFormatProvider * beginB:string * betweenB:string * endB:string * beginV:string * betweenV:string * endV:string) -> string
|
Outputs e.g. a Box2 in the form "(beginB)(beginV)min.x(betweenV)min.y(endV)(betweenB)(beginV)max.x(betweenV)max.y(endV)(endB)". |
Transformed(trafo)
Signature: trafo:M33d -> Box2d
|
|
Transformed(trafo)
Signature: trafo:Trafo2d -> Box2d
|
|
Translated(shift)
Signature: shift:V2i -> Box2i
|
|
Union(b)
Signature: b:Box2i -> Box2i
|
Static members
Static member | Description |
FromCenterAndSize(center, size)
Signature: (center:V2i * size:V2i) -> Box2i
|
Returns new box [center - size / 2, center + size / 2]. |
FromCenterAndSize(center, iSize)
Signature: (center:V2i * iSize:ISize2d) -> Box2i
|
Returns new box [center - iSize / 2, center + iSize / 2]. |
FromCenterAndSize(center, width, height)
Signature: (center:V2i * width:int * height:int) -> Box2i
|
|
FromCenterAndSize(...)
Signature: (centerX:int * centerY:int * width:int * height:int) -> Box2i
|
|
FromMinAndSize(min, size)
Signature: (min:V2i * size:V2i) -> Box2i
|
Returns new box [min, min + size]. |
FromMinAndSize(min, iSize)
Signature: (min:V2i * iSize:ISize2d) -> Box2i
|
Returns new box [min, min + iSize]. |
FromMinAndSize(min, width, height)
Signature: (min:V2i * width:int * height:int) -> Box2i
|
|
FromMinAndSize(...)
Signature: (minX:int * minY:int * width:int * height:int) -> Box2i
|
|
FromPoints(p0, p1)
Signature: (p0:V2i * p1:V2i) -> Box2i
|
Creates box from 2 points which need not be Min and Max. |
FromSize(size)
Signature: size:V2i -> Box2i
|
Returns new box [0, size]. |
FromSize(iSize)
Signature: iSize:ISize2d -> Box2i
|
Returns new box [0, iSize]. |
FromSize(width, height)
Signature: (width:int * height:int) -> Box2i
|
|
Intersection(a, b)
Signature: (a:Box2i * b:Box2i) -> Box2i
|
|
op_Addition(box, v)
Signature: (box:Box2i * v:V2i) -> Box2i
|
Returns a box shifted by the supplied value. |
op_Equality(a, b)
Signature: (a:Box2i * b:Box2i) -> bool
|
Checks if 2 boxes are equal. |
op_Inequality(a, b)
Signature: (a:Box2i * b:Box2i) -> bool
|
Checks if 2 boxes are not equal. |
op_Subtraction(box, v)
Signature: (box:Box2i * v:V2i) -> Box2i
|
Returns a box shifted by the negative supplied value. |
Parse(s)
Signature: s:string -> Box2i
|
|
Parse(t)
Signature: t:Text -> Box2i
|
|
Union(a, b)
Signature: (a:Box2i * b:Box2i) -> Box2i
|