62 using System.Collections.Generic;
81 public static bool reset =
false;
92 xDim = depth.GetLength(0);
93 yDim = depth.GetLength(1);
94 zDim = depth.GetLength(2);
96 Debug.Log(
"Dimensions:");
97 Debug.Log(xDim.ToString());
98 Debug.Log(yDim.ToString());
99 Debug.Log(zDim.ToString());
104 invDelta.x = 1f/delta.x;
105 invDelta.y = 1f/delta.y;
106 invDelta.z = 1f/delta.z;
111 origin.x = -origin.x;
132 if(x<0 || y<0 || z<0)
144 float depthPercentage;
146 Vector3 position = Vector3.zero;
147 Vector3 indices = Vector3.zero;
149 position = bu.transform.position;
150 indices = Vector3.Scale(invDelta, (position - origin));
156 pointDepth = depth[x,y,z];
161 pointDepth = pointDepth +
OFFSET;
163 if(pointDepth <= MAX_DEPTH)
166 depthPercentage = Mathf.Abs(pointDepth/MAX_DEPTH);
167 colorFactor = 1f - depthPercentage;
168 colorFactor = Mathf.Pow(colorFactor, 2);
181 Debug.Log(
"DepthCueing: Reverting to original colors");
DepthCueing()
Initializes a new instance of the DepthCueing class.
bool InBounds(int x, int y, int z)
This function is currently not used, but can be useful for debugging, to check whether the index comp...
void Revert()
Reverts the molecule to its original colors, that is before the Depth Cueing effect was applied...
static List< Color > atomsColorList
The color of each atom.
static Vector3 MinValue
The "smallest" corner of the bounding box that encloses the molecule.
void Darken()
Darkens the molecule.
static List< Color > originalColors
void BuildColorList()
Builds the list of the original colors, that is before the Depth Cueing effect is applied...