70 using System.Collections.Generic;
81 public static GameObject BondCubeParent =
new GameObject(
"BondCubeParent");
89 mainCam = Camera.main;
95 int Number=bondEPList.Count/number;
100 Debug.Log(
"DisplayBonds??bondEPList.Count " + bondEPList.Count);
102 for(
int i=0;i<Number;i++){
103 CreateCylinder(i*number);
106 GameObject cbManagerObj = GameObject.FindGameObjectWithTag(
"CubeBondManager");
114 Debug.Log(
"Bonds?? bondEPList.Count :: " + bondEPList.Count);
116 for(
int i=0;i<Number;i++){
117 CreateCylinderByShader(i*number);
119 GameObject hsManagerObj = GameObject.FindGameObjectWithTag(
"HStickManager");
161 int[] atomsIds = bondEPList[i] as
int[];
163 Stick = (GameObject)GameObject.Instantiate(Resources.Load(
"HStickPrefab"));
185 Stick.GetComponent<Collider>().enabled =
false;
189 Stick.transform.position =
new Vector3(posAtom1[0],posAtom1[1],posAtom1[2]);
190 Stick.transform.parent = BondCubeParent.transform;
205 int[] atomsIds = bondEPList[i] as
int[];
206 GameObject o=GameObject.CreatePrimitive(PrimitiveType.Cube);
207 o.GetComponent<Renderer>().material=(Material)Resources.Load(
"Materials/CubeBoneMaterial");
215 o.transform.localScale=
new Vector3(0.1f,0.1f,1f);
217 o.transform.parent = BondCubeParent.transform;
227 Stick=GameObject.CreatePrimitive(PrimitiveType.Plane);
229 int[] atomsIds = bondEPList[i] as
int[];
231 Stick.transform.Rotate(
new Vector3(0,-180,0));
234 RuntimePlatform platform = Application.platform;
236 case RuntimePlatform.WindowsPlayer:
237 case RuntimePlatform.WindowsWebPlayer:
238 case RuntimePlatform.WindowsEditor:
239 Stick.GetComponent<Renderer>().material.shader=Shader.Find(
"FvNano/Stick HyperBalls 2 OpenGL");
242 Stick.GetComponent<Renderer>().material.shader=Shader.Find(
"FvNano/Stick HyperBalls 2 OpenGL");
250 comp.atomnumber2 = atomsIds[1];
254 Stick.GetComponent<Renderer>().material.SetFloat(
"_Shrink", 0.01f);
256 Stick.transform.parent = BondCubeParent.transform;
void CreateBBCylinderByShader(int i)
void CreateCylinderByShader(int i)
static List< int[]> bondCAList
The bonds between carbon alpha in the CA-Spline.
static bool secondarystruct
Switch between all atoms and C-alpha trace or BFactor secondary structure representation.
static GameObject CreateClip()
override void Init()
Initializes this instance of the manager.
void CreateCylinder(int i)
override void Init()
Initializes this instance of the manager.
!WiP Includes FLAGS of GUI.
static List< int[]> bondEPList
The bonds between atoms.
static List< float[]> atomsLocationlist
The coordinates of each atom.