set method

void set(
  1. int index,
  2. dynamic subIndex,
  3. int dim,
  4. dynamic value, [
  5. bool moveFlag = false,
])

Implementation

void set( int index, dynamic subIndex, int dim, dynamic value, [bool moveFlag = false] ){
	if( moveFlag ){
		move( index );
	}
	if( dim == 1 ){
		_node[index].set( subIndex[0], value );
	} else if( dim == 2 ){
		if(
			(subIndex[0] < 0) || (subIndex[0] == ClipGlobal.invalidArrayIndex) ||
			(subIndex[1] < 0) || (subIndex[1] == ClipGlobal.invalidArrayIndex)
		){
			return;
		}
		_mat[index].set( subIndex[0], subIndex[1], value );
	} else {
		_node[index].set( subIndex, value );
	}
}