Skip to content

Bounds bindings

SDraw edited this page Jun 14, 2023 · 2 revisions

Refer to Unity's Bounds documentation for properties and methods description.

Constructor

  • object Bounds(Vector3 center = Vector3.zero, Vector3 size = Vector3.zero)

Properties

  • center: get/set, Vector3
  • extents: get/set, Vector3
  • max: get/set, Vector3
  • min: get/set, Vector3
  • size: get/set, Vector3

Methods

  • Vector3 ClosestPoint(Vector3 point)
  • bool Contains(Vector3 point)
  • bool Encapsulate(Vector3 point)
  • bool Expand(float amount)
  • bool IntersectRay(Ray ray)
  • bool Intersects(Bounds bounds)
  • bool SetMinMax(Vector3 min, Vector3 max)
  • float SqrDistance(Vector3 point)

Utility functions

  • bool IsBounds(object obj): checks if object is type of Bounds.