Options
All
  • Public
  • Public/Protected
  • All
Menu

表示一个二维平面中的 AABB 盒子

+---------+ | | | | | | +---------+

Class representing a bounding box in Two-dimensional coordinate system

Hierarchy

  • Box2

Index

Constructors

constructor

Properties

max

max: Vector2 = ...

Box2 的最大顶点(右上角)

min

min: Vector2 = ...

Box2 的最小顶点(左下角)

Accessors

center

points

  • Box2 的 4 个顶点

    当前坐标系为,X向左为正,Y向上为正时,其4个顶点相对位置如下:

    3---------2 | | | | | | 0---------1

    Returns Vector2[]

size

Methods

checkValid

  • checkValid(): boolean

setMax

setMin

Static createByGeometry

  • 根据几何信息计算一个 Box2

    Calculate the Box2 base on geometric information

    Parameters

    Returns Box2

    A Box2

Static createByPoints

  • 计算包围所有点的最小 Box2

    Calculate the smallest Box2 surrounding all points

    Parameters

    Returns Box2

    A Box2

Legend

  • Constructor
  • Property
  • Method
  • Static property
  • Static method
  • Property
  • Private property

Generated using TypeDoc