Skip to content

Bounds

The Bounds class represents a struct for a 3D bounding box, which is used to describe the minimum rectangular volume that contains an object.

构造方法

Bounds.new ( cnt : Vector3? , ext : Vector3? )
Create a new bounding box.

成员变量

Bounds.min : Vector3
The minimum value of the bounding box (equal to the center of the bounding box minus the extent of the bounding box).
Bounds.max : Vector3
The maximum value of the bounding box (always equal to the sum of the center and the extents of the bounding box).
Bounds.center : Vector3
The center of the bounding box.
Bounds.extents : Vector3
The size of the bounding box (always half the size of the bounding box).
Bounds.size : Vector3
The size of the bounding box.

静态变量

Bounds.zero : Bounds
(Read Only) Returns an empty Bounds object.
Bounds.infinity : Bounds
(Read-only) Returns infinity.

成员方法

Bounds.EncapsulateBounds ( bounds : Bounds ) : void
Expands the bounding box to include the specified bounding box.
Bounds.EqualsTo ( other : Bounds ) : boolean
Determines whether the current bounding box is equal to the target bounding box.
Bounds.SetMinMax ( min : Vector3 , max : Vector3 ) : void
Set the minimum and maximum values of the bounding box.
Bounds.toString ( ) : string
Returns a string that describes the properties of the Bounds object.
Bounds.Overlaps ( other : Bounds ) : boolean
Checks if the specified bounding box overlaps with this bounding box.
Bounds.EncapsulatePoint ( point : Vector3 ) : void
Expands the bounding box to include the specified coordinate point.
Bounds.CopyFrom ( from : Bounds ) : void
Assigns the values of the given object to the current object.

静态方法

Bounds.Clone ( val : Bounds ) : Bounds
Returns a copy of the given object.
Bounds.EqualsTo ( lhs : Bounds , rhs : Bounds ) : boolean
Determines whether two bounding boxes are equal.