setToModelviewProjection

fun setToModelviewProjection(projection: Matrix4, modelview: Matrix4, viewport: Viewport): Frustum

Sets this frustum to one appropriate for a modelview-projection matrix. A modelview-projection matrix's view frustum is a Cartesian volume that contains everything visible in a scene displayed using that modelview-projection matrix.
This method assumes that the specified matrices represents a projection matrix and a modelview matrix respectively. If this is not the case the results are undefined.

Return

this frustum, with its planes set to the modelview-projection matrix's view frustum, in Cartesian coordinates

Parameters

projection

the projection matrix to extract the frustum from

modelview

the modelview matrix defining the frustum's position and orientation in Cartesian coordinates

viewport

the screen coordinate viewport corresponding to the projection matrix


fun setToModelviewProjection(projection: Matrix4, modelview: Matrix4, viewport: Viewport, subViewport: Viewport): Frustum

Sets this frustum to one appropriate for a subset of a modelview-projection matrix. A modelview-projection matrix's view frustum is a Cartesian volume that contains everything visible in a scene displayed using that modelview-projection matrix. The subset is defined by the region within the original viewport that the frustum contains.
This method assumes that the specified matrices represents a projection matrix and a modelview matrix respectively. If this is not the case the results are undefined.

Return

this frustum, with its planes set to the modelview-projection matrix's view frustum, in Cartesian coordinates

Parameters

projection

the projection matrix to extract the frustum from

modelview

the modelview matrix defining the frustum's position and orientation in Cartesian coordinates

viewport

the screen coordinate viewport corresponding to the projection matrix

subViewport

the screen coordinate region the frustum should contain