Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

Bounds

struct in UnityEngine

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual

Descripción

Represents an axis aligned bounding box.

An axis-aligned bounding box, or AABB for short, is a box aligned with coordinate axes and fully enclosing some object. Because the box is never rotated with respect to the axes, it can be defined by just its center and extents, or alternatively by min and max points.

Bounds is used by Collider.bounds, Mesh.bounds and Renderer.bounds.

Variables

centerThe center of the bounding box.
extentsThe extents of the box. This is always half of the size.
maxThe maximal point of the box. This is always equal to center+extents.
minThe minimal point of the box. This is always equal to center-extents.
sizeThe total size of the box. This is always twice as large as the extents.

Constructores

BoundsCreates new Bounds with a given center and total size. Bound extents will be half the given size.

Funciones Públicas

ClosestPointThe closest point on the bounding box.
ContainsIs point contained in the bounding box?
EncapsulateGrows the Bounds to include the point.
ExpandExpand the bounds by increasing its size by amount along each side.
IntersectRayDoes ray intersect this bounding box?
IntersectsDoes another bounding box intersect with this bounding box?
SetMinMaxSets the bounds to the min and max value of the box.
SqrDistanceThe smallest squared distance between the point and this bounding box.
ToStringReturns a nicely formatted string for the bounds.