Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultOrthographic = Ortho(1, 1, 1, 100)
DefaultOrthographic is the default projection matrix using Ortho.
var DefaultPerspective = Frustum(1, 1, 1, 100)
DefaultPerspective is the default projection matrix using Frustum.
Functions ¶
func Frustum ¶
Frustum will return a matrix capabable of projecting points inside the cube specified by l,r,b,t,n,f = -r,r,-t,t,-n,-f to clip coordinates. For all valid (non clipped) coordinates the following condition holds: -wc < xc,yc,zc < wc All coordinates for which this condition doesn't hold need to be clipped. To get from clip space coordinates to native device coordinates divide the xc,yc,zc by wc. So xn,yn,zn = xc/wc,yc/wc,zc/wc will give coordinates in de range [-1,1]. These need to be mapped via a viewport to screen coordinates.
func Perspective ¶
Types ¶
This section is empty.