private void SetSizedArrayForChannel(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim, Array values, int valuesCount) { if (this.canAccess) { this.SetArrayForChannelImpl(channel, format, dim, values, valuesCount); } else { this.PrintErrorCantAccessMesh(channel); } }
private T[] GetAllocArrayFromChannel <T>(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim) { if (this.canAccess) { if (this.HasChannel(channel)) { return((T[])this.GetAllocArrayFromChannelImpl(channel, format, dim)); } } else { this.PrintErrorCantAccessMesh(channel); } return(new T[0]); }
private void SetListForChannel <T>(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim, List <T> values) { this.SetSizedArrayForChannel(channel, format, dim, Mesh.ExtractArrayFromList(values), this.SafeLength <T>(values)); }
private void SetArrayForChannel <T>(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim, T[] values) { this.SetSizedArrayForChannel(channel, format, dim, values, this.SafeLength(values)); }
private extern void GetArrayFromChannelImpl(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim, Array values);
private extern Array GetAllocArrayFromChannelImpl(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim);
private extern void SetArrayForChannelImpl(Mesh.InternalShaderChannel channel, Mesh.InternalVertexChannelType format, int dim, Array values, int arraySize);
private void GetListForChannel <T>(List <T> buffer, int capacity, Mesh.InternalShaderChannel channel, int dim, Mesh.InternalVertexChannelType channelType) { buffer.Clear(); if (!this.canAccess) { this.PrintErrorCantAccessChannel(channel); } else if (this.HasChannel(channel)) { NoAllocHelpers.EnsureListElemCount <T>(buffer, capacity); this.GetArrayFromChannelImpl(channel, channelType, dim, NoAllocHelpers.ExtractArrayFromList(buffer)); } }
private void GetListForChannel <T>(List <T> buffer, int capacity, Mesh.InternalShaderChannel channel, int dim, Mesh.InternalVertexChannelType channelType) { buffer.Clear(); if (!this.canAccess) { this.PrintErrorCantAccessMesh(channel); } else if (this.HasChannel(channel)) { this.PrepareUserBuffer <T>(buffer, capacity); this.GetArrayFromChannelImpl(channel, channelType, dim, Mesh.ExtractArrayFromList(buffer)); } }