Unity3D圣典3.3版本-中文版
文集大纲加载中……
本文档使用 MrDoc 发布
-
+
首页
Bounds 包围盒
# Bounds 包围盒 Struct 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](Bounds.center.html) and [extents](Bounds.extents.html), or alternatively by [min](Bounds.min.html) and [max](Bounds.max.html) points. 一个轴对齐包围盒,或 AABB 的简称,是一个坐标轴对齐的盒子并完全包围某些物体。由于这个盒子不会相对于轴旋转,它只可以通过 [center](Bounds.center.html) 和 [extents](Bounds.extents.html) 定义,或者由 [min](Bounds.min.html) 和 [max](Bounds.max.html) 点定义。 包围盒用于 [Collider.bounds](../Collider/Collider.bounds.html), [Mesh.bounds](../Mesh/Mesh.bounds.html), [Renderer.bounds](../Renderer/Renderer.bounds.html). ### Variables**变量** * [center](Bounds.center.html) The center of the bounding box. 包围盒的中心。 * [size](Bounds.size.html) The total size of the box. This is always twice as large as the extents. 包围和的总大小。这个总是 [extents](Bounds.extents.html) 的两倍大。 * [extents](Bounds.extents.html) The extents of the box. This is always half of the size. 包围盒的广度。这个总是 [size](Bounds.size.html)[](Bounds.extents.html)的一半。 * [min](Bounds.min.html) The minimal point of the box. This is always equal to center-extents. 包围盒的最小点,这个总是等于 center-extents。 * [max](Bounds.max.html) The maximal point of the box. This is always equal to center+extents. 包围盒的最大点,这个总是等于 center + extents。 ### Constructors**构造器** * [Bounds](Bounds.Bounds.html) Creates new Bounds with a given center and total size. Bound extents will be half the given size. 用给定的中心和总大小,创建一个新的包围盒。包围盒 [extents](Bounds.extents.html) 将是给定 size 的一半。 ### Functions**函数** * [SetMinMax](Bounds.SetMinMax.html) Sets the bounds to the min and max value of the box. 设置包围盒的最小和最大值。 * [Encapsulate](Bounds.Encapsulate.html) Grows the Bounds to include the point. 增大包围盒以包含这个点。 * [Expand](Bounds.Expand.html) Expand the bounds by increasing its size by amount along each side. 通过增加 amount 的大小沿着每条边扩大包围盒。 * [Intersects](Bounds.Intersects.html) Does another bounding box intersect with this bounding box? 这个包围盒是否和另一个包围盒相交? * [Contains](Bounds.Contains.html) Is point contained in the bounding box? 这个点包含在包含盒中么? * [SqrDistance](Bounds.SqrDistance.html) The smallest squared distance between the point and this bounding box. 点和这个包围盒之间的最小平方距离。 * [IntersectRay](Bounds.IntersectRay.html) Does ray intersect this bounding box? 射线与这个包围盒相交么? * [ToString](Bounds.ToString.html) Returns a nicely formatted string for the bounds. 返回包围盒格式化好的字符串。
da
2022年5月17日 13:00
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码