3 using System.Collections.Generic;
    47     protected static string[] 
ve2_grays_ramps = {
"grayscale ramp", 
"grayscale ramp inverse"};
    68         if(mainCamera == null)
    69             mainCamera = Camera.main;
    74         if(showBackgroundType)
    81         GUILayout.BeginHorizontal ();
    82         if (GUILayout.Button (
new GUIContent (
"Effects", 
"Toggle what kind of special effect to apply to the scene"))) 
    83             showEffectType = !showEffectType;
    84         GUILayout.EndHorizontal ();
    86         GUILayout.BeginHorizontal ();
    87         if (GUILayout.Button (
new GUIContent (
"Infos", 
"Show/Hide the FPS, atom count and bond count"))) 
    89         GUILayout.EndHorizontal ();
    91         if (Event.current.type == EventType.Repaint)
    97         GUILayout.BeginHorizontal();
   101         if (GUILayout.Button(
new GUIContent(
"OK", 
"Apply new GUI Scale")))
   106         GUILayout.EndHorizontal();
   108         GUILayout.BeginHorizontal();
   109         if (GUILayout.Button(
new GUIContent(
"Ortho/Persp", 
"Switches between orthographic and perspective camera"))){
   110             if(mainCamera.orthographic)
   111                 mainCamera.orthographic = false ;
   113                 mainCamera.orthographic = true ;
   114                 mainCamera.orthographicSize = 20f ;
   117         GUILayout.EndHorizontal();
   119         GUILayout.BeginHorizontal();
   121                 "Camera Size", 
"This slider changes the size of the orthographic camera.", mainCamera.orthographic, 100, 20);
   124         GUILayout.EndHorizontal();
   128         GUILayout.BeginHorizontal();
   130                                             "This switches between the complete set of textures and a selection of the best ones"))){
   138         if (GUILayout.Button(
new GUIContent(
"Depth Cueing", 
"Depth Cueing"))) {
   150         GUILayout.EndHorizontal();
   152         GUILayout.BeginHorizontal();
   153         if (GUILayout.Button(
new GUIContent(
"Volumetric Depth Cueing", 
"Volumetric Depth Cueing"))) {
   162             volumObj = GameObject.FindGameObjectWithTag(
"Volumetric");
   165             if(showVolumetricDepth) {
   168                 volumetricDepth.
Init();
   172                 volumetricDepth.
Clear();
   176         if(GUILayout.Button(
new GUIContent(
"Ambient Occlusion", 
"Ambient occlusion based on molecular density."))) {
   178                 ambientOcclusion.
Revert();
   184         GUILayout.EndHorizontal();
   358         GameObject LocCamera = GameObject.Find (
"Camera");
   360         GUILayout.BeginHorizontal ();
   362         if (GUILayout.Button (
new GUIContent (
"1", 
"Lerpz background")))
   363             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/skyBoxLerpzMaterial");       
   365         if (GUILayout.Button (
new GUIContent (
"2", 
"HotDesert background")))
   366             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/skyBoxHotDesert");
   368         if (GUILayout.Button (
new GUIContent (
"3", 
"Molecule background")))
   369             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/skyBoxmolecularMaterial");
   371         if (GUILayout.Button (
new GUIContent (
"4", 
"Snow background")))
   372             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/skyBoxSnow");
   374         GUILayout.EndHorizontal ();
   376         GUILayout.BeginHorizontal ();
   377         if (GUILayout.Button (
new GUIContent (
"5", 
"DawnDusk Skybox")))
   378                         LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/DawnDusk Skybox");               
   380         if (GUILayout.Button (
new GUIContent (
"6", 
"Eerie Skybox")))
   381             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/Eerie Skybox");              
   383         if (GUILayout.Button (
new GUIContent (
"7", 
"MoonShine Skybox")))
   384             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/MoonShine Skybox");              
   386         if (GUILayout.Button (
new GUIContent (
"8", 
"Overcast1 Skybox")))
   387             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/Overcast1 Skybox");              
   389         GUILayout.EndHorizontal ();
   391         GUILayout.BeginHorizontal ();
   393         if (GUILayout.Button (
new GUIContent (
"9", 
"Overcast2 Skybox")))
   394             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/Overcast2 Skybox");
   396         if (GUILayout.Button (
new GUIContent (
"10", 
"StarryNight Skybox")))
   397             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/StarryNight Skybox");                
   399         if (GUILayout.Button (
new GUIContent (
"11", 
"Sunny1 Skybox")))
   400             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/Sunny1 Skybox");             
   402         GUILayout.EndHorizontal ();
   404         GUILayout.BeginHorizontal ();
   406         if (GUILayout.Button (
new GUIContent (
"12", 
"Sunny2 Skybox")))
   407             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/Sunny2 Skybox");             
   409         if (GUILayout.Button (
new GUIContent (
"13", 
"Sunny3 Skybox")))
   410             LocCamera.GetComponent<Skybox> ().material = (Material)Resources.Load (
"skybox/Sunny3 Skybox");             
   412         GUILayout.EndHorizontal ();
   414         if (Event.current.type == EventType.Repaint)
   428         if(mainCamera == null)
   429             mainCamera = Camera.main;
   430         GUILayout.BeginHorizontal ();
   435         toggle_VE_SSAO = GUILayout.Toggle (toggle_VE_SSAO, 
new GUIContent (
"SSAO", 
"Toggle screen space ambient occlusion effect"));
   436         if (!toggle_VE_SSAO) { 
   446         GUILayout.EndHorizontal ();
   448         GUILayout.BeginHorizontal();
   454         toggle_VE_DOF = GUILayout.Toggle (toggle_VE_DOF, 
new GUIContent (
"DOF", 
"Toggle depth of field effect."));
   455         if (!toggle_VE_DOF && mainCamera.GetComponent<
DepthOfField>().enabled) {
   456             mainCamera.GetComponent<
DepthOfField>().enabled = 
false;
   458         } 
else if (toggle_VE_DOF && !mainCamera.GetComponent<
DepthOfField>().enabled) { 
   470                     if(bondManager != null){
   478             mainCamera.GetComponent<
DepthOfField>().enabled = 
true ;
   479             mainCamera.GetComponent<
DepthOfField>().aperture = 0.75f;
   484         GUILayout.EndHorizontal ();
   486         GUILayout.BeginHorizontal ();
   490         toggle_VE_CREASE = GUILayout.Toggle (toggle_VE_CREASE, 
new GUIContent (
"Crease", 
"Toggle crease effect"));
   491         if (!toggle_VE_CREASE && mainCamera.GetComponent<
CreaseShading>().enabled)
   493         else if (toggle_VE_CREASE && !mainCamera.GetComponent<
CreaseShading> ().enabled) { 
   504                     if(bondManager != null){
   517         GUILayout.EndHorizontal ();
   519         GUILayout.BeginHorizontal ();
   523         toggle_VE2_EDGE = GUILayout.Toggle (toggle_VE2_EDGE, 
new GUIContent (
"Edge", 
"Toggle edge detection effect"));
   525         toggle_VE2_EDGEONLY = GUILayout.Toggle (toggle_VE2_EDGEONLY, 
new GUIContent (
"Edge Only", 
"Toggle edge only"));
   526         if (!toggle_VE2_EDGE && mainCamera.GetComponent<
EdgeDetection> ().enabled)
   528         else if (toggle_VE2_EDGE && !mainCamera.GetComponent<
EdgeDetection> ().enabled) { 
   538                     if(bondManager != null){
   547             mainCamera.GetComponent<
EdgeDetection> ().edgeDetectShader = Shader.Find (
"Hidden/EdgeDetect");
   550         if(toggle_VE2_EDGE && mainCamera.GetComponent<
EdgeDetection> ().enabled){
   551             if(toggle_VE2_EDGEONLY)
   556         GUILayout.EndHorizontal ();
   558         GUILayout.BeginHorizontal ();
   560         toggle_VE2_GLOW = GUILayout.Toggle (toggle_VE2_GLOW, 
new GUIContent (
"Glow", 
"Toggle glow effect"));
   561         if (!toggle_VE2_GLOW && mainCamera.GetComponent<
BloomOptimized> ().enabled)
   563         else if (toggle_VE2_GLOW && !mainCamera.GetComponent<
BloomOptimized> ().enabled) { 
   572         GUILayout.EndHorizontal ();
   574         GUILayout.BeginHorizontal ();
   576         toggle_VE2_CONTR = GUILayout.Toggle (toggle_VE2_CONTR, 
new GUIContent (
"ContrastStretch", 
"Toggle contrast stretch effect"));
   577         if (!toggle_VE2_CONTR && mainCamera.GetComponent<
ContrastStretch> ().enabled)
   579         else if (toggle_VE2_CONTR && !mainCamera.GetComponent<
Twirl> ().enabled) { 
   582         GUILayout.EndHorizontal ();
   584         GUILayout.BeginHorizontal ();
   586         toggle_VE2_SEPIA = GUILayout.Toggle (toggle_VE2_SEPIA, 
new GUIContent (
"Sepia", 
"Toggle sepia tone color effect"));
   587         if (!toggle_VE2_SEPIA && mainCamera.GetComponent<
SepiaTone> ().enabled)
   588             mainCamera.GetComponent<
SepiaTone> ().enabled = 
false;
   589         else if (toggle_VE2_SEPIA && !mainCamera.GetComponent<
SepiaTone> ().enabled) { 
   590             mainCamera.GetComponent<
SepiaTone> ().shader = Shader.Find (
"Hidden/Sepiatone Effect");
   591             mainCamera.GetComponent<
SepiaTone> ().enabled = 
true;
   593         GUILayout.EndHorizontal ();
   620         GUILayout.BeginHorizontal ();
   621         toggle_VE2_GRAYS = GUILayout.Toggle (toggle_VE2_GRAYS, 
new GUIContent (
"Grays", 
"Toggle grayscale color effect"));
   622         if (!toggle_VE2_GRAYS && mainCamera.GetComponent<
Grayscale> ().enabled)
   623             mainCamera.GetComponent<
Grayscale> ().enabled = 
false;
   624         else if (toggle_VE2_GRAYS && !mainCamera.GetComponent<
Grayscale> ().enabled) { 
   625             mainCamera.GetComponent<
Grayscale> ().enabled = 
true;
   626             mainCamera.GetComponent<
Grayscale> ().shader = Shader.Find (
"Hidden/Grayscale Effect");
   627             mainCamera.GetComponent<
Grayscale> ().textureRamp = Resources.Load (ve2_grays_ramps [ve2_grays_rampc]) as Texture2D;
   629         GUILayout.EndHorizontal ();
   631         GUILayout.BeginHorizontal ();
   632         if (GUILayout.Button (
new GUIContent (
"Ramp " + ve2_grays_rampc, 
"Choose among several grayscale ramps"))) {
   633             ve2_grays_rampc += 1;
   634             if (ve2_grays_rampc > ve2_grays_rampn)
   637             if (toggle_VE2_GRAYS)
   638                 mainCamera.GetComponent<
Grayscale> ().textureRamp = Resources.Load (ve2_grays_ramps [ve2_grays_rampc]) as Texture2D;
   640         GUILayout.EndHorizontal ();
   642         GUILayout.BeginHorizontal ();
   644         toggle_VE2_NOISE = GUILayout.Toggle (toggle_VE2_NOISE, 
new GUIContent (
"Noise", 
"Toggle noise effect"));
   647         else if (toggle_VE2_NOISE && !mainCamera.GetComponent<
NoiseAndScratches> ().enabled) { 
   654         GUILayout.EndHorizontal ();
   656         GUILayout.BeginHorizontal ();
   658         toggle_VE_BLUR = GUILayout.Toggle (toggle_VE_BLUR, 
new GUIContent (
"Motion Blur", 
"Toggle motion blur effect"));
   659         if (!toggle_VE_BLUR && mainCamera.GetComponent<
MotionBlur> ().enabled)
   660             mainCamera.GetComponent<
MotionBlur> ().enabled = 
false;
   661         else if (toggle_VE_BLUR && !mainCamera.GetComponent<
MotionBlur> ().enabled) { 
   663             mainCamera.GetComponent<
MotionBlur> ().enabled = 
true;
   665         GUILayout.EndHorizontal ();
   667         GUILayout.BeginHorizontal ();
   669         toggle_VE2_BLUR2 = GUILayout.Toggle (toggle_VE2_BLUR2, 
new GUIContent (
"Blur", 
"Toggle overall blur effect"));
   670         if (!toggle_VE2_BLUR2 && mainCamera.GetComponent<
BlurOptimized> ().enabled)
   672         else if (toggle_VE2_BLUR2 && !mainCamera.GetComponent<
BlurOptimized> ().enabled) { 
   676         GUILayout.EndHorizontal ();
   678         GUILayout.BeginHorizontal ();
   680         toggle_VE2_TWIRL = GUILayout.Toggle (toggle_VE2_TWIRL, 
new GUIContent (
"Twirl", 
"Toggle twirl deformation effect"));
   681         if (!toggle_VE2_TWIRL && mainCamera.GetComponent<
Twirl> ().enabled)
   682             mainCamera.GetComponent<
Twirl> ().enabled = 
false;
   683         else if (toggle_VE2_TWIRL && !mainCamera.GetComponent<
Twirl> ().enabled) { 
   684             mainCamera.GetComponent<
Twirl> ().shader = Shader.Find (
"Hidden/Twirt Effect Shader");
   685             mainCamera.GetComponent<
Twirl> ().enabled = 
true;
   687         GUILayout.EndHorizontal ();
   689         GUILayout.BeginHorizontal ();
   691         toggle_VE2_VORTX = GUILayout.Toggle (toggle_VE2_VORTX, 
new GUIContent (
"Vortex", 
"Toggle vortex deformation effect"));
   692         if (!toggle_VE2_VORTX && mainCamera.GetComponent<
Vortex> ().enabled)
   693             mainCamera.GetComponent<
Vortex> ().enabled = 
false;
   694         else if (toggle_VE2_VORTX && !mainCamera.GetComponent<
Vortex> ().enabled) { 
   695             mainCamera.GetComponent<
Vortex> ().shader = Shader.Find (
"Hidden/Twist Effect");
   696             mainCamera.GetComponent<
Vortex> ().enabled = 
true;
   698         GUILayout.EndHorizontal ();
   704         showBackgroundType = 
false;
   711         if (Event.current.type == EventType.Repaint)
   722         GUILayout.BeginHorizontal();
   723         if (GUILayout.Button (
new GUIContent (
"ScreenShot", 
"Capture the screen and save image to the original file path"))) {
   724             GameObject LocCamera = Camera.main.gameObject;
   732         GUILayout.EndHorizontal();
   735         if (GUILayout.Button (
new GUIContent (
"ScreenShot Sequence", 
"Capture the screen sequentially and save images to the original file path"))) {
   736             GameObject LocCamera = Camera.main.gameObject;
   740             comp.
idseq = id_screenshot_sequence/2;
   741             id_screenshot_sequence++;   
   743         if (Event.current.type == EventType.Repaint)
   753         GUILayout.BeginHorizontal ();
   755         GUILayout.Label (
new GUIContent (
"BackGround", 
"Toggle the use of a skybox on/off"), GUILayout.MaxWidth (120));
   763         GUILayout.EndHorizontal ();
   769         if (Event.current.type == EventType.Repaint)
   780         GUILayout.BeginHorizontal ();
   781         if (GUILayout.Button (
new GUIContent (
"White", 
"Set background to plain white")))
   784         if(GUILayout.Button(
new GUIContent (
"Grey", 
"Set background color to grey")))
   787         if (GUILayout.Button (
new GUIContent (
"Black", 
"Set background color to plain black")))
   789         GUILayout.EndHorizontal ();
   792         GUILayout.BeginHorizontal ();
   793         if (GUILayout.Button (
new GUIContent (
"Background Color", 
"Choose the background color"))) {
   799         GUILayout.EndHorizontal ();
   802         if (Event.current.type == EventType.Repaint)
 static bool onlyBestTextures
 
static void BackColor()
Defines the GUI components for setting the BackGround color. 
 
static string[] ve2_ccorr_ramps
 
static bool toggle_VE2_NOISE
 
void ReadFile(string file_name)
 
static bool toggle_VE_CREASE
 
void Revert()
Reverts the molecule to its original colors, that is before the Depth Cueing effect was applied...
 
static bool showEffectType
 
static float maxOrthoSize
 
static bool showBackgroundType
 
static void Background(int a)
Defines the Background selection window. 
 
static Rect colorPickerRect
 
static ColorPicker m_colorPicker
 
static bool toggle_VE2_BLUR2
 
static int id_screenshot_sequence
 
static Vector3 Offset
The offset for the molecule. 
 
static string file_base_name
 
void Occlude()
Perfoms the actual Ambient Occlusion operations. 
 
static bool toggle_VE2_CCORR
 
static int ve2_grays_rampn
 
static bool toggle_VE2_SEPIA
 
static float backgroundColorBlue
 
static void Scale()
Scales all rectangles according to the new guiScale value input by the user. 
 
static int ve2_grays_rampc
 
static int ve2_ccorr_rampn
 
static int ve2_ccorr_rampc
 
static bool toggle_VE2_VORTX
 
static ColorObject BackgroundColor
 
static bool showSurfaceButton
 
static bool showVolumetricDepth
 
static string queryBestTextures()
 
static bool backGroundTrans
 
static bool toggle_VE2_DREAM
 
static void LoadScreenShot()
Loads the GUI components for taking screenshots in the display window. 
 
void Revert()
Reverts the molecule to its original colors, that is before the Depth Cueing effect was applied...
 
override void Init()
Initializes this instance. 
 
static float LabelSlider(float sliderValue, float sliderMinValue, float sliderMaxValue, string labelText, string toolTip, bool enable, int sliderwidth, int labelwidth=100, bool newLine=false)
 
static bool toggle_VE2_CONTR
 
static float backgroundColorRed
 
static void Effects(int a)
Defines the Effect selection window for SSAO, DOF, etc. 
 
static bool toggle_VE_BLUR
 
static bool toggle_VE2_EDGEONLY
 
!WiP Includes FLAGS of GUI. 
 
static void AdvOptions(int a)
Defines the advanced options menu window, which is opened from the main menu window. 
 
static bool toggle_VE_DOF
 
static bool SetTitleExit(string s)
This is a somewhat odd but very convenient function. 
 
!WiP manage GUI, and provide static strings for the GUI. 
 
static bool toggle_VE_SSAO
 
static bool toggle_VE2_GLOW
 
static void BackGroundControl()
Defines the GUI components that allow for background color control in the display menu...
 
static AmbientOcclusion ambientOcclusion
 
void Darken()
Darkens the molecule. 
 
static bool toggle_VE2_TWIRL
 
static float minOrthoSize
 
static bool toggle_VE2_EDGE
 
static bool toggle_VE2_GRAYS
 
static GenericManager getCurrentBondManager()
 
static DepthCueing depthCueing
 
void Clear()
Clears this instance. 
 
static string[] ve2_grays_ramps
 
static float backgroundColorGreen
 
abstract void EnableShadows()
 
static GenericManager getCurrentAtomManager()
 
static bool showGrayColor