mathtils, convenience attributes added 'row' and 'col', this makes the row/col swap a lot easier to deal with, since

now you can still use column access

previously...
  mat[2] = 1, 2, 3

needed to be converted into...
  mat[0][2] = 1
  mat[1][2] = 2
  mat[2][2] = 3

but with column access you can do...
  mat.col[2] = 1, 2, 3


Having 'row' attribute is a bit redundant since direct indexing on a matrix uses row but included for completeness.
This commit is contained in:
2011-12-24 07:03:19 +00:00
parent 28a5549ecf
commit 2a80368005
3 changed files with 218 additions and 7 deletions

View File

@@ -425,7 +425,9 @@ PyMODINIT_FUNC PyInit_mathutils(void)
if (PyType_Ready(&vector_Type) < 0)
return NULL;
if (PyType_Ready(&matrix_Type) < 0)
return NULL;
return NULL;
if (PyType_Ready(&matrix_access_Type) < 0)
return NULL;
if (PyType_Ready(&euler_Type) < 0)
return NULL;
if (PyType_Ready(&quaternion_Type) < 0)