Skip to content

Commit

Permalink
chore: minor cleanup in VolumeRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Nov 20, 2023
1 parent 8b5cbcb commit a90a5f7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions UnityClient/Packages/vbl.urchin/Scripts/Behaviors/VolumeRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ public class VolumeRenderer : MonoBehaviour
[SerializeField] GameObject volumeLoadingUIGO;
[SerializeField] TMP_Text volumeLoadingUIText;

private Texture3D volumeTexture;
public Texture3D volumeTexture;
private Dictionary<string, Color32[]> volumeData;
private Dictionary<string, Color32[]> colormaps;
private Dictionary<string, Color[]> colormaps;

private Color32[] defaultColormap;
private Color32 black;
private Color32 transparentBlack;
private Color[] defaultColormap;
private Color black;
private Color transparentBlack;

private void Awake()
{
volumeData = new Dictionary<string, Color32[]>();
colormaps = new Dictionary<string, Color32[]>();
colormaps = new Dictionary<string, Color[]>();

black = new Color32(0, 0, 0, 1);
transparentBlack = new Color32(0, 0, 0, 0);
black = new Color(0, 0, 0, 1);
transparentBlack = new Color(0, 0, 0, 0);

defaultColormap = new Color32[256];
defaultColormap = new Color[256];
for (int i = 0; i < 255; i++)
defaultColormap[i] = black;
defaultColormap[255] = transparentBlack;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void DeleteVolume(string name)
public void SetVolumeColormap(string name, List<string> hexColors)
{
Debug.Log("(UM_VolRend) Creating new colormap for: " + name);
Color32[] newMap = new Color32[256];
Color[] newMap = new Color[256];
for (int i = 0; i < 255; i++)
{
if (i < hexColors.Count)
Expand Down

0 comments on commit a90a5f7

Please sign in to comment.