6 using System.Collections.Generic;
45 GUILayout.BeginHorizontal();
46 if (GUILayout.Button (
new GUIContent (
"Cube",
"Use cubes to represent atoms"))) {
48 Debug.Log(
"Cube representation");
59 if (GUILayout.Button (
new GUIContent (
"Sphere",
"Use triangulated spheres to represent atoms"))) {
61 Debug.Log(
"Sphere representation");
70 GUILayout.EndHorizontal ();
73 GUILayout.BeginHorizontal ();
74 if (GUILayout.Button (
new GUIContent (
"Hyperball",
"Use the HyperBalls shader to render atoms"))) {
76 Debug.Log(
"HyperBall representation");
87 if (GUILayout.Button (
new GUIContent (
"Particle",
"Use the ParticleBall shader to represent atoms"))) {
99 GUILayout.EndHorizontal ();
100 GUILayout.BeginHorizontal ();
102 if (GUILayout.Button (
new GUIContent (
"Optimized Hyperball",
"Use the Optimized HyperBalls shader to render atoms"))) {
103 Debug.Log(
"Optimized Hyperball representation");
113 showAtomType =
false;
119 GUILayout.EndHorizontal ();
123 if (Event.current.type == EventType.Repaint)
133 GUILayout.BeginHorizontal ();
134 if (GUILayout.Button (
new GUIContent (
"Metaphor",
"Change HyperBalls parameters to values for standard representations")))
135 showMetaphorType = !showMetaphorType;
136 GUILayout.EndHorizontal ();
138 if (Event.current.type == EventType.Repaint)
150 public static void Bond (
int a) {
154 GUILayout.BeginHorizontal ();
155 GUILayout.FlexibleSpace();
156 if (GUILayout.Button (
new GUIContent (
"Cube",
"Use Cubes to represent bonds"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
157 showBondType =
false;
162 if (GUILayout.Button (
new GUIContent (
"Line",
"Use the Line renderer to represent bonds"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
163 showBondType =
false;
167 GUILayout.FlexibleSpace();
168 GUILayout.EndHorizontal ();
170 GUILayout.BeginHorizontal ();
171 GUILayout.FlexibleSpace();
172 if (GUILayout.Button (
new GUIContent (
"HyperStick",
"Use the HyperStick shader to represent bonds"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
173 showBondType =
false;
178 if (GUILayout.Button (
new GUIContent (
"No Stick",
"Do not render any bonds"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
179 showBondType =
false;
183 GUILayout.FlexibleSpace();
184 GUILayout.EndHorizontal ();
186 GUILayout.BeginHorizontal ();
188 if (GUILayout.Button (
new GUIContent (
"Optimized HyperStick",
"Use the Optimized HyperBalls shader to render sticks"))) {
189 showBondType =
false;
193 GUILayout.EndHorizontal ();
198 if (Event.current.type == EventType.Repaint)
235 GUILayout.BeginHorizontal ();
236 if (GUILayout.Button (
new GUIContent (
"CPK",
"CPK representation as balls and sticks"))) {
237 newGlobalRadius = 0.2f;
238 deltaRadius = (newGlobalRadius -
globalRadius) / transDelta;
240 deltaShrink = (newShrink -
shrink) / transDelta;
242 deltaScale = (newScale -
linkScale) / transDelta;
243 transMETAPHOR =
true;
245 GUILayout.EndHorizontal ();
247 GUILayout.BeginHorizontal ();
249 if (GUILayout.Button (
new GUIContent (
"Licorice",
"Licorice representation of the molecule"))) {
250 newGlobalRadius = 0.1f;
251 deltaRadius = (newGlobalRadius -
globalRadius) / transDelta;
253 deltaShrink = (newShrink -
shrink) / transDelta;
255 deltaScale = (newScale -
linkScale) / transDelta;
256 transMETAPHOR =
true;
258 GUILayout.EndHorizontal ();
259 GUILayout.BeginHorizontal ();
261 if (GUILayout.Button (
new GUIContent (
"VdW",
"van der Waals representation as spacefilling spheres"))) {
262 newGlobalRadius = 1.0f;
263 deltaRadius = (newGlobalRadius -
globalRadius) / transDelta;
265 deltaShrink = (newShrink -
shrink) / transDelta;
267 deltaScale = (newScale -
linkScale) / transDelta;
268 transMETAPHOR =
true;
270 GUILayout.EndHorizontal ();
271 GUILayout.BeginHorizontal ();
273 if (GUILayout.Button (
new GUIContent (
"Smooth",
"Smooth HyperBalls metaphor representation"))) {
274 newGlobalRadius = 0.35f;
275 deltaRadius = (newGlobalRadius -
globalRadius) / transDelta;
277 deltaShrink = (newShrink -
shrink) / transDelta;
279 deltaScale = (newScale -
linkScale) / transDelta;
280 transMETAPHOR =
true;
282 GUILayout.EndHorizontal ();
283 GUILayout.BeginHorizontal ();
285 if (GUILayout.Button (
new GUIContent (
"SmoothLink",
"SmoothLink HyperBalls representation"))) {
286 newGlobalRadius = 0.4f;
287 deltaRadius = (newGlobalRadius -
globalRadius) / transDelta;
289 deltaShrink = (newShrink -
shrink) / transDelta;
291 deltaScale = (newScale -
linkScale) / transDelta;
292 transMETAPHOR =
true;
294 GUILayout.EndHorizontal ();
295 if (Event.current.type == EventType.Repaint)
308 GUILayout.BeginHorizontal ();
309 GUILayout.Label (
"Velocity Colors:");
310 GUILayout.EndHorizontal ();
312 GUILayout.BeginHorizontal ();
326 GUILayout.EndHorizontal ();
327 if (Event.current.type == EventType.Repaint)
344 "Determines shrink factor parameter for HyperBalls",
true, sliderWidth, 1);
348 "Determines scale parameter",
true, sliderWidth, 1);
378 GUILayout.BeginHorizontal();
380 GUILayout.EndHorizontal();
382 GUILayout.BeginHorizontal();
384 GUILayout.EndHorizontal();
400 true, sliderWidth, 1);
449 GUILayout.BeginHorizontal();
450 GUILayout.Label(
"Color/Texture/Scale");
451 GUILayout.EndHorizontal();
453 GUILayout.BeginHorizontal ();
454 GUILayout.FlexibleSpace();
455 if (GUILayout.Button (
new GUIContent (
"Renderer",
"Choose the color, texture and scale of each atom"), GUILayout.Width(
Rectangles.
atomButtonWidth))){
463 if (GUILayout.Button (
new GUIContent (
"Panels",
"Open colors and textures panels menu"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
467 GUILayout.FlexibleSpace();
468 GUILayout.EndHorizontal ();
470 GUILayout.BeginHorizontal();
499 GUILayout.EndHorizontal();
504 if(tmpRadius != globalRadius){
505 globalRadius = tmpRadius;
512 showAtomType =
false;
515 showBondType =
false;
524 GUILayout.BeginHorizontal();
532 GUILayout.EndHorizontal();
536 GUILayout.BeginHorizontal();
540 (
"LOD mode",
"Toggle LOD. When this is enabled and the molecule is moving, hyperboloids are replaced by particle balls for smoother framerates."));
547 GUILayout.EndHorizontal();
550 const float maxshine = 200f;
560 if(tmpShininess != shininess){
561 shininess = tmpShininess;
562 float correctedShininess = 0.0f;
563 if(shininess != 0.0f){
565 correctedShininess = (maxshine+1f) - shininess;
577 if (Event.current.type == EventType.Repaint)
589 GUILayout.BeginHorizontal ();
590 GUILayout.FlexibleSpace();
593 GUILayout.FlexibleSpace();
594 GUILayout.EndHorizontal ();
596 GUILayout.BeginHorizontal ();
597 GUILayout.FlexibleSpace();
598 string atomtype =
"";
610 atomtype =
"HyperBall";
613 atomtype =
"Raycasting";
616 atomtype =
"Common Billboard";
619 atomtype =
"RayCasting Billboard";
622 atomtype =
"HyperBall Billboard";
625 atomtype =
"RayCasting Sprite";
628 atomtype =
"Multi-Hyperball";
631 atomtype =
"CombineMesh HyperBall";
634 atomtype =
"ParticleBall";
637 atomtype =
"ParticleBallAlpahBlend";
640 atomtype =
"Optimized Hyperball";
644 string displayAtomType;
645 if (atomtype ==
"ParticleBall")
646 displayAtomType =
"Particle";
648 displayAtomType = atomtype;
649 if (GUILayout.Button (
new GUIContent (displayAtomType,
"Change the atom appearance style or rendering method"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
651 showBondType =
false;
656 string bondtype =
"";
665 bondtype =
"HyperStick";
668 bondtype =
"TubeStick";
671 bondtype =
"Billboard HyperStick";
674 bondtype =
"Particle Stick";
677 bondtype =
"No Stick";
680 bondtype =
"Optimized HyperStick";
685 if (GUILayout.Button (
new GUIContent (bondtype,
"Change the bond appearance style or rendering method"), GUILayout.Width(
Rectangles.
atomButtonWidth))) {
687 showAtomType =
false;
689 GUILayout.FlexibleSpace();
690 GUILayout.EndHorizontal ();
692 GUILayout.BeginHorizontal();
696 if(GUILayout.Button(
new GUIContent(
"Smooth HyperBalls",
"Set a parameter combo for HyperBalls and Sticks with SmoothLinks once"))) {
700 GUILayout.EndHorizontal();
701 GUILayout.BeginHorizontal();
702 if(GUILayout.Button(
new GUIContent(
"Optimized HyperBalls",
"Create a mesh for an effective rendering method"))) {
708 GUILayout.EndHorizontal();
710 if (Event.current.type == EventType.Repaint)
726 GUILayout.BeginHorizontal();
728 GUILayout.EndHorizontal();
730 GUILayout.BeginHorizontal();
737 GUILayout.EndHorizontal();
748 GUILayout.BeginHorizontal();
750 "Adjusts the brightness of atoms and bonds represented with the MatCap shader",
759 GUILayout.EndHorizontal();
762 if (Event.current.type == EventType.Repaint)
static bool toggle_NA_HIDE
static bool showSetAtomScales
static bool networkLoaded
static Molecule3D Molecule3DComp
static void ToggleDistanceCueing(bool enabling)
static void AtomStyle(int a)
Defines the style of atoms.
static bool resetBrightness
static bool toggle_DISTANCE_CUEING
static void HideMolecule()
static bool showHyperballsMenu
static bool resetShininess
static float newGlobalRadius
static ColorPicker m_colorPicker
static void AtomMenu(int a)
Defines the Atom menu.
static void HyperballStyle(int a)
Defines the Hyperball Style window.
static bool transMETAPHOR
abstract void DisableShadows()
static bool toggle_NA_HBALLSMOOTH
static List< string > applyToAtoms
static bool showCubeLineBondMenu
static bool showSurfaceButton
static bool fieldLineFileExists
static bool showMetaphorType
static bool showAtomsExtendedMenu
static void PhysicalChoice()
This function defines the GUI components that let users choose the colors used in interactive mode...
static void Bond(int a)
Defines the bond type selection menu window, which is called from the appearance menu.
static void showHydrogens(bool hide)
static int hyperballWidth
static bool resetBrightness
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 resetInteractive
static bool toggle_HIDE_HYDROGEN
static void CubeLineBond(int a)
Defines the cube/line bond window, that lets users define how wide they want their bonds...
static int cubeLineBondTypeWidth
static bool toggle_NA_MEASURE
!WiP Includes FLAGS of GUI.
static void ChangeRepresentation(UIData.AtomType newAtomType, UIData.BondType newBondType=UIData.BondType.nobond)
static bool showPanelsMenu
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 hballsmoothmode
static bool toggle_NA_CLICK
static bool distanceCueingEnabled
static bool toggle_NA_AUTOMOVE
static bool toggle_LIGHTCAM
static void SetTitle(string s)
Sets the title of the current window.
static bool toggle_NA_INTERACTIVE
static bool resetShininess
static int atomButtonWidth
static float previous_angle
static void MetaphorControl()
Just triggers the metaphor menu.
static float globalRadius
static bool toggle_NA_CAMLOCK
static void RenderingParameters()
Defines the rendering parameters, in the atom appearance menu.
static void Metaphor(int a)
Defines the Metaphor menu window, which is launched by the Metaphor button in the Hperball Style wind...
static GenericManager getCurrentBondManager()
static bool toggle_NA_SWITCH
static bool showChainsMenu
static void LightStop()
Prevents the light from moving with the camera.
static bool surfaceFileExists
static void ShowMolecule()
static void SetAtomStyle()
Sets the atom style.
abstract void EnableShadows()
UIData.AtomType PreviousAtomType
static GenericManager getCurrentAtomManager()
static bool showResiduesMenu
static bool showGrayColor