reset_matrix()#

Replaces the current matrix with the identity matrix.

Examples#

 1def setup():
 2    py5.size(100, 100, py5.P3D)
 3    py5.no_fill()
 4    py5.box(80)
 5    py5.print_matrix()
 6    # prints:
 7    # 01.0000  00.0000  00.0000 -50.0000
 8    # 00.0000  01.0000  00.0000 -50.0000
 9    # 00.0000  00.0000  01.0000 -86.6025
10    # 00.0000  00.0000  00.0000  01.0000
11
12    py5.reset_matrix()
13    py5.box(80)
14    py5.print_matrix()
15    # prints:
16    # 1.0000  0.0000  0.0000  0.0000
17    # 0.0000  1.0000  0.0000  0.0000
18    # 0.0000  0.0000  1.0000  0.0000
19    # 0.0000  0.0000  0.0000  1.0000

Description#

Replaces the current matrix with the identity matrix. The equivalent function in OpenGL is gl_load_identity().

Underlying Processing method: resetMatrix

Syntax#

reset_matrix() -> None

Updated on November 12, 2021 11:30:58am UTC