Aardvark.Base


Box2l

Constructors

ConstructorDescription
new(min, max)
Signature: (min:V2l * max:V2l) -> unit

Creates a box from minimum and maximum limits.

new(minX, minY, maxX, maxY)
Signature: (minX:int64 * minY:int64 * maxX:int64 * maxY:int64) -> unit

Creates a box from minimum and maximum limits.

new(pnt)
Signature: pnt:V2l -> unit

Creates infinitesimal box from single point.

new(p0, p1, p2)
Signature: (p0:V2l * p1:V2l * p2:V2l) -> unit

Creates a box from 3 points.

new(p0, p1, p2, p3)
Signature: (p0:V2l * p1:V2l * p2:V2l * p3:V2l) -> unit

Creates a box from 4 points.

new(range)
Signature: range:Box2l -> unit

Creates copy of existing range.

new(b0, b1)
Signature: (b0:Box2l * b1:Box2l) -> unit

Create a box containing all supplied boxs.

new(b0, b1, b2)
Signature: (b0:Box2l * b1:Box2l * b2:Box2l) -> unit

Create a box containing all supplied boxs.

new(b0, b1, b2, b3)
Signature: (b0:Box2l * b1:Box2l * b2:Box2l * b3:Box2l) -> unit

Create a box containing all supplied boxs.

new(points)
Signature: (points:V2l []) -> unit

Creates box as the bounding box of given points.

new(points, start, count)
Signature: (points:V2l [] * 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<V2l> -> unit

Creates box as the bounding box of given points.

new(boxes)
Signature: boxes:IEnumerable<Box2l> -> unit

Creates box as the bounding box of given boxes.

new(rangeX, rangeY)
Signature: (rangeX:Range1l * rangeY:Range1l) -> unit

Creates box from a Range1 in each direction.

Instance members

Instance memberDescription
Area
Signature: int64
BoundingBox2d
Signature: Box2d
Modifiers: abstract
Center
Signature: V2l
Modifiers: abstract
Clamped(p)
Signature: p:V2l -> V2l

Return the point in the Box that is closest to the supplied point.

ComputeCorners()
Signature: unit -> V2l []

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:V2l -> bool
Modifiers: abstract

Returns true if the box contains the given point.

Contains(b)
Signature: b:Box2l -> bool
Modifiers: abstract

Returns true if the box completely contains the given box.

Corner(index)
Signature: index:int -> V2l

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:V2l -> unit
Modifiers: abstract

Enlarges box by the supplied value in all directions.

EnlargeBy(deltaMin, deltaMax)
Signature: (deltaMin:V2l * deltaMax:V2l) -> unit
Modifiers: abstract

Enlarges box by the supplied values.

EnlargeBy(delta)
Signature: delta:int64 -> unit

Enlarges box by specified value in all directions.

EnlargeBy(...)
Signature: (deltaMinX:int64 * deltaMaxX:int64 * deltaMinY:int64 * deltaMaxY:int64) -> unit

Enlarges the box by the specified values (paddings).

EnlargedBy(increment)
Signature: increment:V2l -> Box2l
Modifiers: abstract

Return box enlarged by the supplied value in all directions.

EnlargedBy(deltaMin, deltaMax)
Signature: (deltaMin:V2l * deltaMax:V2l) -> Box2l
Modifiers: abstract

Return box enlarged by the supplied values.

EnlargedBy(delta)
Signature: delta:int64 -> Box2l

Returns a box enlarged by the specified value in all directions.

EnlargedBy(...)
Signature: (deltaMinX:int64 * deltaMaxX:int64 * deltaMinY:int64 * deltaMaxY:int64) -> Box2l

Returns the box enlarged by the specified values (paddings).

EnumerateInsidePoints()
Signature: unit -> IEnumerable<V2l>

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:Box2l -> unit
Modifiers: abstract

Extends the box to contain the supplied box.

ExtendBy(point)
Signature: point:V2l -> unit
Modifiers: abstract

Extends the box to contain the supplied value.

ExtendDimBy(dim, x)
Signature: (dim:int * x:int64) -> Box2l
ExtendedBy(b)
Signature: b:Box2l -> Box2l
Modifiers: abstract

Returns the box extended to contain the supplied box.

ExtendedBy(v)
Signature: v:V2l -> Box2l
Modifiers: abstract

Returns the box extended to contain the supplied value.

ExtendXBy(x)
Signature: x:int64 -> Box2l
ExtendYBy(y)
Signature: y:int64 -> Box2l
GetHashCode()
Signature: unit -> int
Modifiers: abstract
GetMinMaxInDirection(v, vMin, vMax)
Signature: (v:V2l * vMin:byref<V2l> * vMax:byref<V2l>) -> unit

Gets the minimal and maximal points of the box when seen from the supplied direction vector v.

II
Signature: V2l
Intersection(b)
Signature: b:Box2l -> Box2l
Intersects(box)
Signature: box:Box2l -> bool
Modifiers: abstract

Returns true if 2 boxes intersect each other.

Intersects(box, eps)
Signature: (box:Box2l * eps:V2l) -> bool
Modifiers: abstract

Returns true if 2 boxes intersect each other with tolerance parameter.

Intersects(box, eps)
Signature: (box:Box2l * eps:int64) -> bool

Returns true if 2 boxes intersect each other with tolerance parameter.

Invalidate()
Signature: unit -> Box2l
IO
Signature: V2l
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: V2l
OO
Signature: V2l
OutsideFlags(p0)
Signature: p0:V2l -> Flags

Returns where a points coordinates are outside a given box

OutsideFlags(b)
Signature: b:Box2l -> Flags

Returns where the planes of the supplied box b are outside of the box.

RangeX
Signature: Range1l
RangeY
Signature: Range1l
Repair()
Signature: unit -> Box2l
Modifiers: abstract

Checks if the box is still valid and repairs if not.

Scaled(factor)
Signature: factor:V2l -> Box2l

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:V2l -> unit
Modifiers: abstract

Shrinks box by the supplied value in all directions.

ShrinkBy(deltaMin, deltaMax)
Signature: (deltaMin:V2l * deltaMax:V2l) -> unit
Modifiers: abstract

Shrinks box by the supplied values.

ShrinkBy(delta)
Signature: delta:int64 -> unit

Shrinks box by specified value in all directions.

ShrinkBy(...)
Signature: (deltaMinX:int64 * deltaMaxX:int64 * deltaMinY:int64 * deltaMaxY:int64) -> unit

Shrinks the box by the specified values (paddings).

ShrunkBy(delta)
Signature: delta:V2l -> Box2l
Modifiers: abstract

Return box shrunk by the supplied value in all directions.

ShrunkBy(deltaMin, deltaMax)
Signature: (deltaMin:V2l * deltaMax:V2l) -> Box2l
Modifiers: abstract

Return box shrunk by the supplied values.

ShrunkBy(delta)
Signature: delta:int64 -> Box2l

Returns a box shrunk by the specified value in all directions.

ShrunkBy(...)
Signature: (deltaMinX:int64 * deltaMaxX:int64 * deltaMinY:int64 * deltaMaxY:int64) -> Box2l

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:int64 -> Box2l
SplitLeft(splitValue)
Signature: splitValue:V2l -> Box2l
Modifiers: abstract
SplitLeft(splitAtX)
Signature: splitAtX:int64 -> Box2l
SplitLeftBottom(splitAt)
Signature: splitAt:V2l -> Box2l
SplitLeftTop(splitAt)
Signature: splitAt:V2l -> Box2l
SplitRight(splitValue)
Signature: splitValue:V2l -> Box2l
Modifiers: abstract
SplitRight(splitAtX)
Signature: splitAtX:int64 -> Box2l
SplitRightBottom(splitAt)
Signature: splitAt:V2l -> Box2l
SplitRightTop(splitAt)
Signature: splitAt:V2l -> Box2l
SplitTop(splitAtY)
Signature: splitAtY:int64 -> Box2l
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:V2l -> Box2l
Union(b)
Signature: b:Box2l -> Box2l

Static members

Static memberDescription
FromCenterAndSize(center, size)
Signature: (center:V2l * size:V2l) -> Box2l

Returns new box [center - size / 2, center + size / 2].

FromCenterAndSize(center, iSize)
Signature: (center:V2l * iSize:ISize2d) -> Box2l

Returns new box [center - iSize / 2, center + iSize / 2].

FromCenterAndSize(center, width, height)
Signature: (center:V2l * width:int64 * height:int64) -> Box2l
FromCenterAndSize(...)
Signature: (centerX:int64 * centerY:int64 * width:int64 * height:int64) -> Box2l
FromMinAndSize(min, size)
Signature: (min:V2l * size:V2l) -> Box2l

Returns new box [min, min + size].

FromMinAndSize(min, iSize)
Signature: (min:V2l * iSize:ISize2d) -> Box2l

Returns new box [min, min + iSize].

FromMinAndSize(min, width, height)
Signature: (min:V2l * width:int64 * height:int64) -> Box2l
FromMinAndSize(...)
Signature: (minX:int64 * minY:int64 * width:int64 * height:int64) -> Box2l
FromPoints(p0, p1)
Signature: (p0:V2l * p1:V2l) -> Box2l

Creates box from 2 points which need not be Min and Max.

FromSize(size)
Signature: size:V2l -> Box2l

Returns new box [0, size].

FromSize(iSize)
Signature: iSize:ISize2d -> Box2l

Returns new box [0, iSize].

FromSize(width, height)
Signature: (width:int64 * height:int64) -> Box2l
Intersection(a, b)
Signature: (a:Box2l * b:Box2l) -> Box2l
op_Addition(box, v)
Signature: (box:Box2l * v:V2l) -> Box2l

Returns a box shifted by the supplied value.

op_Equality(a, b)
Signature: (a:Box2l * b:Box2l) -> bool

Checks if 2 boxes are equal.

op_Inequality(a, b)
Signature: (a:Box2l * b:Box2l) -> bool

Checks if 2 boxes are not equal.

op_Subtraction(box, v)
Signature: (box:Box2l * v:V2l) -> Box2l

Returns a box shifted by the negative supplied value.

Parse(s)
Signature: s:string -> Box2l
Parse(t)
Signature: t:Text -> Box2l
Union(a, b)
Signature: (a:Box2l * b:Box2l) -> Box2l
Fork me on GitHub