Box
===

.. lua:module:: Imath

Imath.Box2s
^^^^^^^^^^^

.. lua:class:: Box2s

   .. lua:attribute:: V2s min
   .. lua:attribute:: V2s max

   .. lua:method:: Box2s() -> Box2s
   .. lua:method:: Box2s(Box2s v) -> Box2s
   .. lua:method:: Box2s(V2s point) -> Box2s
   .. lua:method:: Box2s(V2s min, V2s max) -> Box2s
   .. lua:method:: Box2s(short x, short y) -> Box2s
   .. lua:method:: Box2s(short x0, short y0, short x1, short y1) -> Box2s
   .. lua:method:: Box2s(table[2] point) -> Box2s
   .. lua:method:: Box2s(table[2] min, table[2] max) -> Box2s
   .. lua:method:: Box2s(table[4] minMax) -> Box2s

   .. lua:method:: operator==(Box2s o) const -> boolean
   .. lua:method:: operator!=(Box2s o) const -> boolean
   .. lua:method:: operator[](int idx) const -> short
   .. lua:method:: operator[](int idx, short value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V2s point)
   .. lua:method:: extendBy(Box2s box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V2s
   .. lua:method:: center() const -> V2s
   .. lua:method:: intersects(V2s point) const -> boolean
   .. lua:method:: intersects(Box2s box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: toTable() const -> table[4]

Imath.Box2i
^^^^^^^^^^^

.. lua:class:: Box2i

   .. lua:attribute:: V2i min
   .. lua:attribute:: V2i max

   .. lua:method:: Box2i() -> Box2i
   .. lua:method:: Box2i(Box2i v) -> Box2i
   .. lua:method:: Box2i(V2i point) -> Box2i
   .. lua:method:: Box2i(V2i min, V2i max) -> Box2i
   .. lua:method:: Box2i(int x, int y) -> Box2i
   .. lua:method:: Box2i(int x0, int y0, int x1, int y1) -> Box2i
   .. lua:method:: Box2i(table[2] point) -> Box2i
   .. lua:method:: Box2i(table[2] min, table[2] max) -> Box2i
   .. lua:method:: Box2i(table[4] minMax) -> Box2i

   .. lua:method:: operator==(Box2i o) const -> boolean
   .. lua:method:: operator!=(Box2i o) const -> boolean
   .. lua:method:: operator[](int idx) const -> int
   .. lua:method:: operator[](int idx, int value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V2i point)
   .. lua:method:: extendBy(Box2i box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V2i
   .. lua:method:: center() const -> V2i
   .. lua:method:: intersects(V2i point) const -> boolean
   .. lua:method:: intersects(Box2i box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: toTable() const -> table[4]

Imath.Box2f
^^^^^^^^^^^

.. lua:class:: Box2f

   .. lua:attribute:: V2f min
   .. lua:attribute:: V2f max

   .. lua:method:: Box2f() -> Box2f
   .. lua:method:: Box2f(Box2f v) -> Box2f
   .. lua:method:: Box2f(V2f point) -> Box2f
   .. lua:method:: Box2f(V2f min, V2f max) -> Box2f
   .. lua:method:: Box2f(float x, float y) -> Box2f
   .. lua:method:: Box2f(float x0, float y0, float x1, float y1) -> Box2f
   .. lua:method:: Box2f(table[2] point) -> Box2f
   .. lua:method:: Box2f(table[2] min, table[2] max) -> Box2f
   .. lua:method:: Box2f(table[4] minMax) -> Box2f

   .. lua:method:: operator==(Box2f o) const -> boolean
   .. lua:method:: operator!=(Box2f o) const -> boolean
   .. lua:method:: operator[](int idx) const -> float
   .. lua:method:: operator[](int idx, float value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V2f point)
   .. lua:method:: extendBy(Box2f box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V2f
   .. lua:method:: center() const -> V2f
   .. lua:method:: intersects(V2f point) const -> boolean
   .. lua:method:: intersects(Box2f box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: toTable() const -> table[4]

Imath.Box2d
^^^^^^^^^^^

.. lua:class:: Box2d

   .. lua:attribute:: V2d min
   .. lua:attribute:: V2d max

   .. lua:method:: Box2d() -> Box2d
   .. lua:method:: Box2d(Box2d v) -> Box2d
   .. lua:method:: Box2d(V2d point) -> Box2d
   .. lua:method:: Box2d(V2d min, V2d max) -> Box2d
   .. lua:method:: Box2d(double x, double y) -> Box2d
   .. lua:method:: Box2d(double x0, double y0, double x1, double y1) -> Box2d
   .. lua:method:: Box2d(table[2] point) -> Box2d
   .. lua:method:: Box2d(table[2] min, table[2] max) -> Box2d
   .. lua:method:: Box2d(table[4] minMax) -> Box2d

   .. lua:method:: operator==(Box2d o) const -> boolean
   .. lua:method:: operator!=(Box2d o) const -> boolean
   .. lua:method:: operator[](int idx) const -> double
   .. lua:method:: operator[](int idx, double value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V2d point)
   .. lua:method:: extendBy(Box2d box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V2d
   .. lua:method:: center() const -> V2d
   .. lua:method:: intersects(V2d point) const -> boolean
   .. lua:method:: intersects(Box2d box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: toTable() const -> table[4]

Imath.Box3s
^^^^^^^^^^^

.. lua:class:: Box3s

   .. lua:attribute:: V3s min
   .. lua:attribute:: V3s max

   .. lua:method:: Box3s() -> Box3s
   .. lua:method:: Box3s(Box3s v) -> Box3s
   .. lua:method:: Box3s(V3s point) -> Box3s
   .. lua:method:: Box3s(V3s min, V3s max) -> Box3s
   .. lua:method:: Box3s(short x, short y, short z) -> Box3s
   .. lua:method:: Box3s(short x0, short y0, short z0, short x1, short y1, \
                         short z1) -> Box3s
   .. lua:method:: Box3s(table[3] point) -> Box3s
   .. lua:method:: Box3s(table[3] min, table[3] max) -> Box3s
   .. lua:method:: Box3s(table[6] minMax) -> Box3s

   .. lua:method:: operator==(Box3s o) const -> boolean
   .. lua:method:: operator!=(Box3s o) const -> boolean
   .. lua:method:: operator[](int idx) const -> short
   .. lua:method:: operator[](int idx, short value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V3s point)
   .. lua:method:: extendBy(Box3s box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V3s
   .. lua:method:: center() const -> V3s
   .. lua:method:: intersects(V3s point) const -> boolean
   .. lua:method:: intersects(Box3s box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: clip(V3s in) const -> V3s
   .. lua:method:: closestPointOnBox(V3s p) const -> V3s
   .. lua:method:: closestPointInBox(V3s p) const -> V3s

   .. lua:method:: toTable() const -> table[6]

Imath.Box3i
^^^^^^^^^^^

.. lua:class:: Box3i

   .. lua:attribute:: V3i min
   .. lua:attribute:: V3i max

   .. lua:method:: Box3i() -> Box3i
   .. lua:method:: Box3i(Box3i v) -> Box3i
   .. lua:method:: Box3i(V3i point) -> Box3i
   .. lua:method:: Box3i(V3i min, V3i max) -> Box3i
   .. lua:method:: Box3i(int x, int y, int z) -> Box3i
   .. lua:method:: Box3i(int x0, int y0, int z0, int x1, int y1, int z1) \
                     -> Box3i
   .. lua:method:: Box3i(table[3] point) -> Box3i
   .. lua:method:: Box3i(table[3] min, table[3] max) -> Box3i
   .. lua:method:: Box3i(table[6] minMax) -> Box3i

   .. lua:method:: operator==(Box3i o) const -> boolean
   .. lua:method:: operator!=(Box3i o) const -> boolean
   .. lua:method:: operator[](int idx) const -> int
   .. lua:method:: operator[](int idx, int value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V3i point)
   .. lua:method:: extendBy(Box3i box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V3i
   .. lua:method:: center() const -> V3i
   .. lua:method:: intersects(V3i point) const -> boolean
   .. lua:method:: intersects(Box3i box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: clip(V3i in) const -> V3i
   .. lua:method:: closestPointOnBox(V3i p) const -> V3i
   .. lua:method:: closestPointInBox(V3i p) const -> V3i

   .. lua:method:: toTable() const -> table[6]

Imath.Box3f
^^^^^^^^^^^

.. lua:class:: Box3f

   .. lua:attribute:: V3f min
   .. lua:attribute:: V3f max

   .. lua:method:: Box3f() -> Box3f
   .. lua:method:: Box3f(Box3f v) -> Box3f
   .. lua:method:: Box3f(V3f point) -> Box3f
   .. lua:method:: Box3f(V3f min, V3f max) -> Box3f
   .. lua:method:: Box3f(float x, float y, float z) -> Box3f
   .. lua:method:: Box3f(float x0, float y0, float z0, float x1, float y1, \
                         float z1) -> Box3f
   .. lua:method:: Box3f(table[3] point) -> Box3f
   .. lua:method:: Box3f(table[3] min, table[3] max) -> Box3f
   .. lua:method:: Box3f(table[6] minMax) -> Box3f

   .. lua:method:: operator==(Box3f o) const -> boolean
   .. lua:method:: operator!=(Box3f o) const -> boolean
   .. lua:method:: operator[](int idx) const -> float
   .. lua:method:: operator[](int idx, float value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V3f point)
   .. lua:method:: extendBy(Box3f box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V3f
   .. lua:method:: center() const -> V3f
   .. lua:method:: intersects(V3f point) const -> boolean
   .. lua:method:: intersects(Box3f box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: clip(V3f in) const -> V3f
   .. lua:method:: closestPointOnBox(V3f p) const -> V3f
   .. lua:method:: closestPointInBox(V3f p) const -> V3f

   .. lua:method:: transform(M44f m) const -> Box3f
   .. lua:method:: affineTransform(M44f m) const -> Box3f
   .. lua:method:: findEntryAndExitPoints(Line3f ray, V3f& entry, \
                                          V3f& exit) const -> boolean
   .. lua:method:: intersects(Line3f ray, V3f& intersectionPoint) const \
                     -> boolean
   .. lua:method:: intersects(Line3f ray) const -> boolean

   .. lua:method:: toTable() const -> table[6]

Imath.Box3d
^^^^^^^^^^^

.. lua:class:: Box3d

   .. lua:attribute:: V3d min
   .. lua:attribute:: V3d max

   .. lua:method:: Box3d() -> Box3d
   .. lua:method:: Box3d(Box3d v) -> Box3d
   .. lua:method:: Box3d(V3d point) -> Box3d
   .. lua:method:: Box3d(V3d min, V3d max) -> Box3d
   .. lua:method:: Box3d(double x, double y, double z) -> Box3d
   .. lua:method:: Box3d(double x0, double y0, double z0, double x1, \
                         double y1, double z1) -> Box3d
   .. lua:method:: Box3d(table[3] point) -> Box3d
   .. lua:method:: Box3d(table[3] min, table[3] max) -> Box3d
   .. lua:method:: Box3d(table[6] minMax) -> Box3d

   .. lua:method:: operator==(Box3d o) const -> boolean
   .. lua:method:: operator!=(Box3d o) const -> boolean
   .. lua:method:: operator[](int idx) const -> double
   .. lua:method:: operator[](int idx, double value)

   .. lua:method:: makeEmpty()
   .. lua:method:: extendBy(V3d point)
   .. lua:method:: extendBy(Box3d box)
   .. lua:method:: makeInfinite()

   .. lua:method:: size() const -> V3d
   .. lua:method:: center() const -> V3d
   .. lua:method:: intersects(V3d point) const -> boolean
   .. lua:method:: intersects(Box3d box) const -> boolean

   .. lua:method:: majorAxis() const -> int

   .. lua:method:: isEmpty() const -> boolean
   .. lua:method:: hasVolume() const -> boolean
   .. lua:method:: isInfinite() const -> boolean

   .. lua:method:: clip(V3d in) const -> V3d
   .. lua:method:: closestPointOnBox(V3d p) const -> V3d
   .. lua:method:: closestPointInBox(V3d p) const -> V3d

   .. lua:method:: transform(M44d m) const -> Box3d
   .. lua:method:: affineTransform(M44d m) const -> Box3d
   .. lua:method:: findEntryAndExitPoints(Line3d ray, V3d& entry, \
                                          V3d& exit) const -> boolean
   .. lua:method:: intersects(Line3d ray, V3d& intersectionPoint) const \
                     -> boolean
   .. lua:method:: intersects(Line3d ray) const -> boolean

   .. lua:method:: toTable() const -> table[6]