MeshLib C# Docs
Loading...
Searching...
No Matches
MR.Box2f Struct Reference

Box given by its min- and max- corners Generated from class MR.Box2f. This is the by-value version of the struct. More...

+ Inheritance diagram for MR.Box2f:

Public Member Functions

 Box2f (Box2f _other)
 Generated copy constructor.
 
unsafe Box2f ()
 Constructs an empty (default-constructed) instance.
 
unsafe Box2f (in MR.Vector2f min, in MR.Vector2f max)
 Generated from constructor MR.Box2f.Box2f.
 
unsafe Box2f (MR.Const_NoInit _1)
 Generated from constructor MR.Box2f.Box2f.
 
unsafe ref MR.Vector2f index (int e)
 Generated from method MR.Box2f.operator[].
 
readonly unsafe bool valid ()
 true if the box contains at least one point Generated from method MR.Box2f.valid.
 
readonly unsafe MR.Vector2f center ()
 computes center of the box Generated from method MR.Box2f.center.
 
readonly unsafe MR.Vector2f corner (in MR.Vector2b c)
 returns the corner of this box as specified by given bool-vector: 0 element in (c) means take min's coordinate, 1 element in (c) means take max's coordinate Generated from method MR.Box2f.corner.
 
readonly unsafe MR.Vector2f size ()
 computes size of the box in all dimensions Generated from method MR.Box2f.size.
 
readonly unsafe float diagonal ()
 computes length from min to max Generated from method MR.Box2f.diagonal.
 
readonly unsafe float volume ()
 computes the volume of this box Generated from method MR.Box2f.volume.
 
unsafe void include (in MR.Vector2f pt)
 minimally increases the box to include given point Generated from method MR.Box2f.include.
 
unsafe void include (in MR.Box2f b)
 minimally increases the box to include another box Generated from method MR.Box2f.include.
 
readonly unsafe bool contains (in MR.Vector2f pt)
 checks whether given point is inside (including the surface) of this box Generated from method MR.Box2f.contains.
 
readonly unsafe bool contains (in MR.Box2f otherbox)
 checks whether given box is fully inside (the surfaces may touch) of this box Generated from method MR.Box2f.contains.
 
readonly unsafe MR.Vector2f getBoxClosestPointTo (in MR.Vector2f pt)
 returns closest point in the box to given point Generated from method MR.Box2f.getBoxClosestPointTo.
 
readonly unsafe bool intersects (in MR.Box2f b)
 checks whether this box intersects or touches given box Generated from method MR.Box2f.intersects.
 
readonly unsafe MR.Box2f intersection (in MR.Box2f b)
 computes intersection between this and other box Generated from method MR.Box2f.intersection.
 
unsafe ref MR.Box2f intersect (in MR.Box2f b)
 Generated from method MR.Box2f.intersect.
 
readonly unsafe float getDistanceSq (in MR.Box2f b)
 returns squared distance between this box and given one; returns zero if the boxes touch or intersect Generated from method MR.Box2f.getDistanceSq.
 
readonly unsafe float getDistanceSq (in MR.Vector2f pt)
 returns squared distance between this box and given point; returns zero if the point is inside or on the boundary of the box Generated from method MR.Box2f.getDistanceSq.
 
readonly unsafe MR.Vector2f getProjection (in MR.Vector2f pt)
 returns the closest point on the box to the given point for points outside the box this is equivalent to getBoxClosestPointTo Generated from method MR.Box2f.getProjection.
 
readonly unsafe MR.Box2f expanded (in MR.Vector2f expansion)
 decreases min and increased max on given value Generated from method MR.Box2f.expanded.
 
readonly unsafe MR.Box2f insignificantlyExpanded ()
 decreases min and increases max to their closest representable value Generated from method MR.Box2f.insignificantlyExpanded.
 
bool Equals (MR.Box2f a)
 
override bool Equals (object? other)
 

Static Public Member Functions

static implicit operator Box2f (ConstBox_Box2f other)
 Copy contents from a wrapper class to this struct.
 
static unsafe MR.Box2f fromMinAndSize (in MR.Vector2f min, in MR.Vector2f size)
 Generated from method MR.Box2f.fromMinAndSize.
 
static unsafe MR.Vector2b getMinBoxCorner (in MR.Vector2f n)
 considering all planes with given normal and arbitrary shift: dot(n,x) = d finds the box's corner for which d is minimal Generated from method MR.Box2f.getMinBoxCorner.
 
static unsafe MR.Vector2b getMaxBoxCorner (in MR.Vector2f n)
 considering all planes with given normal and arbitrary shift: dot(n,x) = d finds the box's corner for which d is maximal Generated from method MR.Box2f.getMaxBoxCorner.
 
static unsafe bool operator== (MR.Box2f _this, MR.Box2f a)
 Generated from method MR.Box2f.operator==.
 
static unsafe bool operator!= (MR.Box2f _this, MR.Box2f a)
 

Public Attributes

MR.Vector2f min
 
MR.Vector2f max
 

Properties

readonly unsafe ref readonly MR.Vector2f this[int e] [get]
 min/max access by 0/1 index Generated from method MR.Box2f.operator[].
 

Detailed Description

Box given by its min- and max- corners Generated from class MR.Box2f. This is the by-value version of the struct.

Constructor & Destructor Documentation

◆ Box2f() [1/4]

MR.Box2f.Box2f ( Box2f _other)
inline

Generated copy constructor.

◆ Box2f() [2/4]

unsafe MR.Box2f.Box2f ( )
inline

Constructs an empty (default-constructed) instance.

◆ Box2f() [3/4]

unsafe MR.Box2f.Box2f ( in MR.Vector2f min,
in MR.Vector2f max )
inline

Generated from constructor MR.Box2f.Box2f.

◆ Box2f() [4/4]

unsafe MR.Box2f.Box2f ( MR.Const_NoInit _1)
inline

Generated from constructor MR.Box2f.Box2f.

Member Function Documentation

◆ center()

readonly unsafe MR.Vector2f MR.Box2f.center ( )
inline

computes center of the box Generated from method MR.Box2f.center.

◆ contains() [1/2]

readonly unsafe bool MR.Box2f.contains ( in MR.Box2f otherbox)
inline

checks whether given box is fully inside (the surfaces may touch) of this box Generated from method MR.Box2f.contains.

◆ contains() [2/2]

readonly unsafe bool MR.Box2f.contains ( in MR.Vector2f pt)
inline

checks whether given point is inside (including the surface) of this box Generated from method MR.Box2f.contains.

◆ corner()

readonly unsafe MR.Vector2f MR.Box2f.corner ( in MR.Vector2b c)
inline

returns the corner of this box as specified by given bool-vector: 0 element in (c) means take min's coordinate, 1 element in (c) means take max's coordinate Generated from method MR.Box2f.corner.

◆ diagonal()

readonly unsafe float MR.Box2f.diagonal ( )
inline

computes length from min to max Generated from method MR.Box2f.diagonal.

◆ Equals() [1/2]

bool MR.Box2f.Equals ( MR.Box2f a)
inline

◆ Equals() [2/2]

override bool MR.Box2f.Equals ( object? other)
inline

◆ expanded()

readonly unsafe MR.Box2f MR.Box2f.expanded ( in MR.Vector2f expansion)
inline

decreases min and increased max on given value Generated from method MR.Box2f.expanded.

◆ fromMinAndSize()

static unsafe MR.Box2f MR.Box2f.fromMinAndSize ( in MR.Vector2f min,
in MR.Vector2f size )
inlinestatic

Generated from method MR.Box2f.fromMinAndSize.

◆ getBoxClosestPointTo()

readonly unsafe MR.Vector2f MR.Box2f.getBoxClosestPointTo ( in MR.Vector2f pt)
inline

returns closest point in the box to given point Generated from method MR.Box2f.getBoxClosestPointTo.

◆ getDistanceSq() [1/2]

readonly unsafe float MR.Box2f.getDistanceSq ( in MR.Box2f b)
inline

returns squared distance between this box and given one; returns zero if the boxes touch or intersect Generated from method MR.Box2f.getDistanceSq.

◆ getDistanceSq() [2/2]

readonly unsafe float MR.Box2f.getDistanceSq ( in MR.Vector2f pt)
inline

returns squared distance between this box and given point; returns zero if the point is inside or on the boundary of the box Generated from method MR.Box2f.getDistanceSq.

◆ getMaxBoxCorner()

static unsafe MR.Vector2b MR.Box2f.getMaxBoxCorner ( in MR.Vector2f n)
inlinestatic

considering all planes with given normal and arbitrary shift: dot(n,x) = d finds the box's corner for which d is maximal Generated from method MR.Box2f.getMaxBoxCorner.

◆ getMinBoxCorner()

static unsafe MR.Vector2b MR.Box2f.getMinBoxCorner ( in MR.Vector2f n)
inlinestatic

considering all planes with given normal and arbitrary shift: dot(n,x) = d finds the box's corner for which d is minimal Generated from method MR.Box2f.getMinBoxCorner.

◆ getProjection()

readonly unsafe MR.Vector2f MR.Box2f.getProjection ( in MR.Vector2f pt)
inline

returns the closest point on the box to the given point for points outside the box this is equivalent to getBoxClosestPointTo Generated from method MR.Box2f.getProjection.

◆ include() [1/2]

unsafe void MR.Box2f.include ( in MR.Box2f b)
inline

minimally increases the box to include another box Generated from method MR.Box2f.include.

◆ include() [2/2]

unsafe void MR.Box2f.include ( in MR.Vector2f pt)
inline

minimally increases the box to include given point Generated from method MR.Box2f.include.

◆ index()

unsafe ref MR.Vector2f MR.Box2f.index ( int e)
inline

Generated from method MR.Box2f.operator[].

◆ insignificantlyExpanded()

readonly unsafe MR.Box2f MR.Box2f.insignificantlyExpanded ( )
inline

decreases min and increases max to their closest representable value Generated from method MR.Box2f.insignificantlyExpanded.

◆ intersect()

unsafe ref MR.Box2f MR.Box2f.intersect ( in MR.Box2f b)
inline

Generated from method MR.Box2f.intersect.

◆ intersection()

readonly unsafe MR.Box2f MR.Box2f.intersection ( in MR.Box2f b)
inline

computes intersection between this and other box Generated from method MR.Box2f.intersection.

◆ intersects()

readonly unsafe bool MR.Box2f.intersects ( in MR.Box2f b)
inline

checks whether this box intersects or touches given box Generated from method MR.Box2f.intersects.

◆ operator Box2f()

static implicit MR.Box2f.operator Box2f ( ConstBox_Box2f other)
static

Copy contents from a wrapper class to this struct.

◆ operator!=()

static unsafe bool MR.Box2f.operator!= ( MR.Box2f _this,
MR.Box2f a )
inlinestatic

◆ operator==()

static unsafe bool MR.Box2f.operator== ( MR.Box2f _this,
MR.Box2f a )
inlinestatic

Generated from method MR.Box2f.operator==.

◆ size()

readonly unsafe MR.Vector2f MR.Box2f.size ( )
inline

computes size of the box in all dimensions Generated from method MR.Box2f.size.

◆ valid()

readonly unsafe bool MR.Box2f.valid ( )
inline

true if the box contains at least one point Generated from method MR.Box2f.valid.

◆ volume()

readonly unsafe float MR.Box2f.volume ( )
inline

computes the volume of this box Generated from method MR.Box2f.volume.

Member Data Documentation

◆ max

MR.Vector2f MR.Box2f.max

◆ min

MR.Vector2f MR.Box2f.min

Property Documentation

◆ this[int e]

readonly unsafe ref readonly MR.Vector2f MR.Box2f.this[int e]
get

min/max access by 0/1 index Generated from method MR.Box2f.operator[].


The documentation for this struct was generated from the following file: