Frustum
-------

.. lua:module:: Imath

Imath.Frustumf
^^^^^^^^^^^^^^

.. lua:class:: Frustumf

   .. lua:method:: Frustumf() -> Frustumf
   .. lua:method:: Frustumf(Frustumf o) -> Frustumf
   .. lua:method:: Frustumf(float nearPlane, float farPlane, float left, \
                            float right, float top, float bottom[, \
                            boolean ortho=false]) -> Frustumf
   .. lua:method:: Frustumf(float nearPlane, float farPlane, float fovx, \
                            float fovy, float aspect) -> Frustumf

   .. lua:method:: operator==(Frustumf o) const -> boolean
   .. lua:method:: operator!=(Frustumf o) const -> boolean

   .. lua:method:: set(float nearPlane, float farPlane, float left, \
                       float right, float top, float bottom[, \
                            boolean ortho=false])
   .. lua:method:: set(float nearPlane, float farPlane, float fovx, \
                       float fovy, float aspect)

   .. lua:method:: modifyNearAndFar(float nearPlane, float farPlane)
   .. lua:method:: setOrthographic(boolean ortho)

   .. lua:method:: orthographic() const -> boolean
   .. lua:method:: nearPlane() const -> float
   .. lua:method:: hither() const -> float
   .. lua:method:: farPlane() const -> float
   .. lua:method:: yon() const -> float
   .. lua:method:: left() const -> float
   .. lua:method:: right() const -> float
   .. lua:method:: bottom() const -> float
   .. lua:method:: top() const -> float

   .. lua:method:: planes() const \
                     -> Plane3f, Plane3f, Plane3f, Plane3f, Plane3f, Plane3f
   .. lua:method:: planes(M44f m) const \
                     -> Plane3f, Plane3f, Plane3f, Plane3f, Plane3f, Plane3f

   .. lua:method:: fovx() const -> float
   .. lua:method:: fovy() const -> float
   .. lua:method:: aspect() const -> float
   .. lua:method:: projectionMatrix() const -> M44f
   .. lua:method:: degenerate() const -> boolean

   .. lua:method:: window(float left, float right, float top, \
                          float bottom) const -> Frustumf

   .. lua:method:: projectScreenToRay(V2f pos) const -> Line3f
   .. lua:method:: projectPointToScreen(V3f point) const -> V2f

   .. lua:method:: ZToDepth(long zval, long min, long max) const -> float
   .. lua:method:: normalizedZToDepth(float zval) const -> float
   .. lua:method:: DepthToZ(float depth, long zmin, long zmax) const -> long

   .. lua:method:: worldRadius(V3f p, float radius) const -> float
   .. lua:method:: screenRadius(V3f p, float radius) const -> float

Imath.Frustumd
^^^^^^^^^^^^^^

.. lua:class:: Frustumd

   .. lua:method:: Frustumd() -> Frustumd
   .. lua:method:: Frustumd(Frustumd o) -> Frustumd
   .. lua:method:: Frustumd(double nearPlane, double farPlane, double left, \
                            double right, double top, double bottom[, \
                            boolean ortho=false]) -> Frustumd
   .. lua:method:: Frustumd(double nearPlane, double farPlane, double fovx, \
                            double fovy, double aspect) -> Frustumd

   .. lua:method:: operator==(Frustumd o) const -> boolean
   .. lua:method:: operator!=(Frustumd o) const -> boolean

   .. lua:method:: set(double nearPlane, double farPlane, double left, \
                       double right, double top, double bottom[, \
                            boolean ortho=false])
   .. lua:method:: set(double nearPlane, double farPlane, double fovx, \
                       double fovy, double aspect)

   .. lua:method:: modifyNearAndFar(double nearPlane, double farPlane)
   .. lua:method:: setOrthographic(boolean ortho)

   .. lua:method:: orthographic() const -> boolean
   .. lua:method:: nearPlane() const -> double
   .. lua:method:: hither() const -> double
   .. lua:method:: farPlane() const -> double
   .. lua:method:: yon() const -> double
   .. lua:method:: left() const -> double
   .. lua:method:: right() const -> double
   .. lua:method:: bottom() const -> double
   .. lua:method:: top() const -> double

   .. lua:method:: planes() const \
                     -> Plane3d, Plane3d, Plane3d, Plane3d, Plane3d, Plane3d
   .. lua:method:: planes(M44d m) const \
                     -> Plane3d, Plane3d, Plane3d, Plane3d, Plane3d, Plane3d

   .. lua:method:: fovx() const -> double
   .. lua:method:: fovy() const -> double
   .. lua:method:: aspect() const -> double
   .. lua:method:: projectionMatrix() const -> M44d
   .. lua:method:: degenerate() const -> boolean

   .. lua:method:: window(double left, double right, double top, \
                          double bottom) const -> Frustumd

   .. lua:method:: projectScreenToRay(V2d pos) const -> Line3d
   .. lua:method:: projectPointToScreen(V3d point) const -> V2d

   .. lua:method:: ZToDepth(long zval, long min, long max) const -> double
   .. lua:method:: normalizedZToDepth(double zval) const -> double
   .. lua:method:: DepthToZ(double depth, long zmin, long zmax) const -> long

   .. lua:method:: worldRadius(V3d p, double radius) const -> double
   .. lua:method:: screenRadius(V3d p, double radius) const -> double

Imath.FrustumTestf
^^^^^^^^^^^^^^^^^^

.. lua:class:: FrustumTestf

   .. lua:method:: FrustumTestf() -> FrustumTestf
   .. lua:method:: FrustumTestf(FrustumTestf o) -> FrustumTestf
   .. lua:method:: FrustumTestf(Frustumf frustum, M44f cameraMatrix) \
                     -> FrustumTestf

   .. lua:method:: operator==(FrustumTestf o) const -> boolean
   .. lua:method:: operator!=(FrustumTestf o) const -> boolean

   .. lua:method:: setFrustum(Frustumf frustum, M44f cameraMatrix)

   .. lua:method:: isVisible(Sphere3f sphere) const -> boolean
   .. lua:method:: isVisible(Box3f box) const -> boolean
   .. lua:method:: isVisible(V3f vec) const -> boolean

   .. lua:method:: completelyContains(Sphere3f sphere) const -> boolean
   .. lua:method:: completelyContains(Box3f box) const -> boolean

   .. lua:method:: cameraMat() const -> M44f
   .. lua:method:: currentFrustum() const -> Frustumf

Imath.FrustumTestd
^^^^^^^^^^^^^^^^^^

.. lua:class:: FrustumTestd

   .. lua:method:: FrustumTestd() -> FrustumTestd
   .. lua:method:: FrustumTestd(FrustumTestd o) -> FrustumTestd
   .. lua:method:: FrustumTestd(Frustumd frustum, M44d cameraMatrix) \
                     -> FrustumTestd

   .. lua:method:: operator==(FrustumTestd o) const -> boolean
   .. lua:method:: operator!=(FrustumTestd o) const -> boolean

   .. lua:method:: setFrustum(Frustumd frustum, M44d cameraMatrix)

   .. lua:method:: isVisible(Sphere3d sphere) const -> boolean
   .. lua:method:: isVisible(Box3d box) const -> boolean
   .. lua:method:: isVisible(V3d vec) const -> boolean

   .. lua:method:: completelyContains(Sphere3d sphere) const -> boolean
   .. lua:method:: completelyContains(Box3d box) const -> boolean

   .. lua:method:: cameraMat() const -> M44d
   .. lua:method:: currentFrustum() const -> Frustumd