Google I/O returns May 18-20! Reserve space and build your schedule Register now

Module: tfg.rendering.opengl.math

This module implements math routines used by OpenGL.


clip_to_ndc(...): Transforms points from clip to normalized device coordinates (ndc).

eye_to_clip(...): Transforms points from eye to clip space.

interpolate_attributes(...): Interpolates attributes using barycentric weights.

model_to_eye(...): Transforms points from model to eye coordinates.

model_to_screen(...): Transforms points from model to screen coordinates.

ndc_to_screen(...): Transforms points from normalized device coordinates to screen coordinates.

perspective_correct_barycentrics(...): Computes perspective correct barycentrics.

perspective_correct_interpolation(...): Returns perspective corrected interpolation of attributes over triangles.