def getRefForMatrix(self, matrix):
matrix_name = np.array2string(matrix)
if matrix_name in self.tdict:
return self.tdict[matrix_name]
oldidx = self.ntindex
self.ntindex += 1
# setup the empty texture array
self.matrices[oldidx] = matrix
self.tdict[matrix_name] = oldidx
# now fill in the values
return oldidx
评论列表
文章目录