UnityMol  0.9.6-875
UnityMol viewer / In developement
SugarRibbons Class Reference
+ Collaboration diagram for SugarRibbons:

Public Member Functions

 SugarRibbons (bool SugarOnly)
 
List< List< GameObject > > createSugarRibs (float RibbonsThickness, bool sugarOnly, float thickness_Little, float thickness_BIG, float thickness_bond_6_C1_C4, float thickness_6_other, float thickness_bond_5, float lighter_color_factor_ring, float lighter_color_factor_bond, int color_mode_ring, int color_mode_bond, ColorObject bondcolor, ColorObject ringcolor, float OxySphereSize, ColorObject OxySphereColor)
 
void changeColor (int which)
 
Vector3 calcMidPoint (Vector3 a, Vector3 b)
 
List< Vector3 > enlargeMesh (int i, float scaling)
 
GameObject CreateOxygenSphere (int pos, int res, int sugartype=0)
 
List< GameObject > ShowOxySphere (int colortype)
 
GameObject CreateSugarRibbonsObj (Mesh mesh, string res="", string chain="", string tag="SugarRibbons", int id=0)
 
List< List< GameObject > > createSugarRibbons ()
 
void updateColorBond (List< GameObject > objs, ColorObject newColor)
 
void updateColorRing (List< GameObject > objs, ColorObject newColor)
 
void updateColorBond (List< GameObject > objs, int type)
 
void updateColorRing (List< GameObject > objs, int type)
 
Color lightColor (Color color, float correctionFactor=0.35f)
 
void cleanup ()
 

Static Public Member Functions

static void Solve (Mesh mesh)
 

Public Attributes

List< Mesh > CycleMesh = new List<Mesh>()
 
List< Mesh > CycleBIGMesh = new List<Mesh>()
 
List< Mesh > meshesRingUp =new List<Mesh>()
 
List< Mesh > meshesRingDown = new List<Mesh>()
 
List< Mesh > meshesSideRing = new List<Mesh> ()
 
List< Mesh > meshesBIGRingUp =new List<Mesh>()
 
List< Mesh > meshesBIGRingDown = new List<Mesh>()
 
List< Mesh > meshesBIGSideRing = new List<Mesh> ()
 
List< Mesh > meshesBondUp = new List<Mesh>()
 
List< Mesh > meshesBondDown = new List<Mesh>()
 
List< Mesh > meshesBondSide = new List<Mesh>()
 
List< GraphVertexmolAsGraph = new List<GraphVertex>()
 
List< List< int > > cycles = new List<List<int>>()
 
List< string > residueslist = new List<string>()
 
List< int > residuesNumberlist = new List<int>()
 
List< Vector3 > barylist = new List<Vector3>()
 
List< Vector3 > vertices = new List<Vector3>()
 
List< Color32 > colors = new List<Color32>()
 
List< Vector3 > normals = new List<Vector3>()
 
List< int > triangles = new List<int>()
 
float THICKNESS
 
float THICKNESS_LITTLE_MESH
 
float THICKNESS_BIG_MESH
 
float THICKNESS_BOND_6_C1_C4
 
float THICKNESS_BOND_6_OTHER
 
float THICKNESS_BOND_5
 
float LIGHTER_COLOR_FACTOR_RING
 
float LIGHTER_COLOR_FACTOR_BOND
 
float OXYSPHERESIZE
 
bool SUGAR_ONLY
 
int COLOR_MODE_RING
 
int COLOR_MODE_BOND
 
int SUGAR =0
 
int CHAIN =1
 
int PICKER =2
 
ColorObject BONDCOLOR
 
ColorObject RINGCOLOR
 
ColorObject OXYSPHERECOLOR
 
int nbRes
 
List< string > sugarResname = new List<string>()
 
List< float[]> atomsLocationlist = new List<float[]>()
 
List< string > atomsResnamelist = new List<string>()
 
List< string > atomsNamelist = new List<string>()
 
List< string > resChainList = new List<string>()
 
List< int[]> bondEPList = new List<int[]>()
 
Dictionary< int, List< int > > connectivityList = new Dictionary<int, List<int>>()
 
Dictionary< int, Dictionary< int, int[]> > MeshIndexForAtom = new Dictionary<int, Dictionary<int, int[]>>()
 
Dictionary< int, string > res_for_bond = new Dictionary<int, string>()
 

Static Public Attributes

static float[] wideness = {1f, 2f, 1f}
 

Private Member Functions

Vector3 LinearComb (float scalar0, Vector3 vector0, float scalar1, Vector3 vector1)
 
Vector3 float3toVector3 (float[] point)
 
void generateCycleMesh2 ()
 
List< Vector3 > makeFlatVertex (List< Vector3 > verticeEn)
 
void generateBiggerCycleMesh (float scaling=0.60f)
 
void generateRibbonsMesh (Mesh centralMesh, int resnumber, float thicknessCenter=1f, bool center=true)
 
void create_Bond ()
 
void debugline (Vector3 a, Vector3 b)
 
void CalculBarycenter ()
 
Vector3 calculMeshBarycenter (Mesh mesh)
 
Vector3 calculMidPoint (Vector3 a, Vector3 b)
 
int findRingAtomIndex (int ringIndex, int AtomNumber)
 
Vector3 CycleAtomToVector3 (int index_res, int number)
 
Vector3 calcullittleRibbonsControlPoint (Vector3 a, Vector3 b, float size=0.7f)
 
void createDebugSphere (Vector3 point, Color color, float size=1f)
 
Vector3 calculMeanNormalMesh (Mesh mesh)
 
int[] invertTrianglesMesh (Mesh mesh)
 
int[] generateTriangleSide (Mesh mesh)
 

Detailed Description

Definition at line 8 of file SugarRibbons.cs.

Constructor & Destructor Documentation

Member Function Documentation

Vector3 SugarRibbons.calcMidPoint ( Vector3  a,
Vector3  b 
)

Definition at line 283 of file SugarRibbons.cs.

Referenced by enlargeMesh().

+ Here is the caller graph for this function:

void SugarRibbons.CalculBarycenter ( )
private

Definition at line 984 of file SugarRibbons.cs.

Referenced by SugarRibbons().

+ Here is the caller graph for this function:

Vector3 SugarRibbons.calcullittleRibbonsControlPoint ( Vector3  a,
Vector3  b,
float  size = 0.7f 
)
private

Definition at line 1050 of file SugarRibbons.cs.

Referenced by makeFlatVertex().

+ Here is the caller graph for this function:

Vector3 SugarRibbons.calculMeanNormalMesh ( Mesh  mesh)
private

Definition at line 1072 of file SugarRibbons.cs.

Referenced by generateRibbonsMesh().

+ Here is the caller graph for this function:

Vector3 SugarRibbons.calculMeshBarycenter ( Mesh  mesh)
private

Definition at line 1007 of file SugarRibbons.cs.

Vector3 SugarRibbons.calculMidPoint ( Vector3  a,
Vector3  b 
)
private

Definition at line 1024 of file SugarRibbons.cs.

void SugarRibbons.changeColor ( int  which)

Definition at line 217 of file SugarRibbons.cs.

void SugarRibbons.cleanup ( )

Definition at line 1126 of file SugarRibbons.cs.

Referenced by SugarManager.DestroySugarRibs().

+ Here is the caller graph for this function:

void SugarRibbons.create_Bond ( )
private

Definition at line 533 of file SugarRibbons.cs.

References UI.GUIDisplay.ChainColorDict, ColorObject.color, UI.GUIDisplay.colorByResiduesDict, findRingAtomIndex(), lightColor(), and Molecule.Model.MoleculeModel.resChainList.

Referenced by createSugarRibbons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SugarRibbons.createDebugSphere ( Vector3  point,
Color  color,
float  size = 1f 
)
private

Definition at line 1062 of file SugarRibbons.cs.

GameObject SugarRibbons.CreateOxygenSphere ( int  pos,
int  res,
int  sugartype = 0 
)

Definition at line 701 of file SugarRibbons.cs.

References UI.GUIDisplay.ChainColorDict, and UI.GUIDisplay.colorByResiduesDict.

Referenced by ShowOxySphere().

+ Here is the caller graph for this function:

List<List<GameObject> > SugarRibbons.createSugarRibbons ( )

Definition at line 847 of file SugarRibbons.cs.

References create_Bond(), CreateSugarRibbonsObj(), generateBiggerCycleMesh(), generateCycleMesh2(), and generateRibbonsMesh().

Referenced by createSugarRibs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GameObject SugarRibbons.CreateSugarRibbonsObj ( Mesh  mesh,
string  res = "",
string  chain = "",
string  tag = "SugarRibbons",
int  id = 0 
)

For each mesh, we create Two mesh (to have a ribbon with tchickness)

Parameters
meshMesh.
resRes.

Definition at line 744 of file SugarRibbons.cs.

References Solve().

Referenced by createSugarRibbons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

List<List<GameObject> > SugarRibbons.createSugarRibs ( float  RibbonsThickness,
bool  sugarOnly,
float  thickness_Little,
float  thickness_BIG,
float  thickness_bond_6_C1_C4,
float  thickness_6_other,
float  thickness_bond_5,
float  lighter_color_factor_ring,
float  lighter_color_factor_bond,
int  color_mode_ring,
int  color_mode_bond,
ColorObject  bondcolor,
ColorObject  ringcolor,
float  OxySphereSize,
ColorObject  OxySphereColor 
)

Definition at line 189 of file SugarRibbons.cs.

References createSugarRibbons().

Referenced by SugarManager.CreateSugarRibs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 SugarRibbons.CycleAtomToVector3 ( int  index_res,
int  number 
)
private

Definition at line 1041 of file SugarRibbons.cs.

Referenced by enlargeMesh(), and generateCycleMesh2().

+ Here is the caller graph for this function:

void SugarRibbons.debugline ( Vector3  a,
Vector3  b 
)
private

Definition at line 831 of file SugarRibbons.cs.

List<Vector3> SugarRibbons.enlargeMesh ( int  i,
float  scaling 
)

Definition at line 287 of file SugarRibbons.cs.

References calcMidPoint(), and CycleAtomToVector3().

Referenced by generateBiggerCycleMesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SugarRibbons.findRingAtomIndex ( int  ringIndex,
int  AtomNumber 
)
private

Definition at line 1033 of file SugarRibbons.cs.

Referenced by create_Bond().

+ Here is the caller graph for this function:

Vector3 SugarRibbons.float3toVector3 ( float[]  point)
private

Definition at line 72 of file SugarRibbons.cs.

void SugarRibbons.generateBiggerCycleMesh ( float  scaling = 0.60f)
private

Definition at line 393 of file SugarRibbons.cs.

References UI.GUIDisplay.ChainColorDict, ColorObject.color, UI.GUIDisplay.colorByResiduesDict, enlargeMesh(), lightColor(), makeFlatVertex(), and Molecule.Model.MoleculeModel.resChainList.

Referenced by createSugarRibbons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SugarRibbons.generateCycleMesh2 ( )
private

Definition at line 240 of file SugarRibbons.cs.

References UI.GUIDisplay.colorByResiduesDict, and CycleAtomToVector3().

Referenced by createSugarRibbons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SugarRibbons.generateRibbonsMesh ( Mesh  centralMesh,
int  resnumber,
float  thicknessCenter = 1f,
bool  center = true 
)
private

Definition at line 457 of file SugarRibbons.cs.

References calculMeanNormalMesh(), UI.GUIDisplay.colorByResiduesDict, generateTriangleSide(), and invertTrianglesMesh().

Referenced by createSugarRibbons().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int [] SugarRibbons.generateTriangleSide ( Mesh  mesh)
private

Definition at line 1103 of file SugarRibbons.cs.

Referenced by generateRibbonsMesh().

+ Here is the caller graph for this function:

int [] SugarRibbons.invertTrianglesMesh ( Mesh  mesh)
private

Definition at line 1092 of file SugarRibbons.cs.

Referenced by generateRibbonsMesh().

+ Here is the caller graph for this function:

Color SugarRibbons.lightColor ( Color  color,
float  correctionFactor = 0.35f 
)

Definition at line 1118 of file SugarRibbons.cs.

Referenced by create_Bond(), generateBiggerCycleMesh(), updateColorBond(), and updateColorRing().

+ Here is the caller graph for this function:

Vector3 SugarRibbons.LinearComb ( float  scalar0,
Vector3  vector0,
float  scalar1,
Vector3  vector1 
)
private

Definition at line 38 of file SugarRibbons.cs.

List<Vector3> SugarRibbons.makeFlatVertex ( List< Vector3 >  verticeEn)
private

Definition at line 356 of file SugarRibbons.cs.

References calcullittleRibbonsControlPoint().

Referenced by generateBiggerCycleMesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

List<GameObject> SugarRibbons.ShowOxySphere ( int  colortype)

Definition at line 724 of file SugarRibbons.cs.

References CreateOxygenSphere().

Referenced by SugarManager.ResetSugarRibbons(), and SugarManager.ShowOxySphere().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void SugarRibbons.Solve ( Mesh  mesh)
static

Definition at line 773 of file SugarRibbons.cs.

Referenced by CreateSugarRibbonsObj().

+ Here is the caller graph for this function:

void SugarRibbons.updateColorBond ( List< GameObject >  objs,
ColorObject  newColor 
)

Definition at line 890 of file SugarRibbons.cs.

References ColorObject.color, and lightColor().

Referenced by SugarManager.UpdateSugarRibsBondColor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SugarRibbons.updateColorBond ( List< GameObject >  objs,
int  type 
)

Definition at line 910 of file SugarRibbons.cs.

References UI.GUIDisplay.ChainColorDict, UI.GUIDisplay.colorByResiduesDict, and lightColor().

+ Here is the call graph for this function:

void SugarRibbons.updateColorRing ( List< GameObject >  objs,
ColorObject  newColor 
)

Definition at line 899 of file SugarRibbons.cs.

References ColorObject.color, and lightColor().

Referenced by SugarManager.UpdateSugarRibsRingColor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SugarRibbons.updateColorRing ( List< GameObject >  objs,
int  type 
)

Definition at line 960 of file SugarRibbons.cs.

References UI.GUIDisplay.ChainColorDict, UI.GUIDisplay.colorByResiduesDict, and lightColor().

+ Here is the call graph for this function:

Member Data Documentation

List<float[]> SugarRibbons.atomsLocationlist = new List<float[]>()

Definition at line 78 of file SugarRibbons.cs.

List<string> SugarRibbons.atomsNamelist = new List<string>()

Definition at line 80 of file SugarRibbons.cs.

List<string> SugarRibbons.atomsResnamelist = new List<string>()

Definition at line 79 of file SugarRibbons.cs.

List<Vector3> SugarRibbons.barylist = new List<Vector3>()

Definition at line 35 of file SugarRibbons.cs.

ColorObject SugarRibbons.BONDCOLOR

Definition at line 62 of file SugarRibbons.cs.

List<int[]> SugarRibbons.bondEPList = new List<int[]>()

Definition at line 82 of file SugarRibbons.cs.

int SugarRibbons.CHAIN =1

Definition at line 60 of file SugarRibbons.cs.

int SugarRibbons.COLOR_MODE_BOND

Definition at line 58 of file SugarRibbons.cs.

int SugarRibbons.COLOR_MODE_RING

Definition at line 57 of file SugarRibbons.cs.

List<Color32> SugarRibbons.colors = new List<Color32>()

Definition at line 43 of file SugarRibbons.cs.

Dictionary<int,List<int> > SugarRibbons.connectivityList = new Dictionary<int, List<int>>()

Definition at line 84 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.CycleBIGMesh = new List<Mesh>()

Definition at line 13 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.CycleMesh = new List<Mesh>()

Definition at line 12 of file SugarRibbons.cs.

List<List<int> > SugarRibbons.cycles = new List<List<int>>()

Definition at line 31 of file SugarRibbons.cs.

float SugarRibbons.LIGHTER_COLOR_FACTOR_BOND

Definition at line 54 of file SugarRibbons.cs.

Referenced by SugarOldGUI.ColorTuneMenu().

float SugarRibbons.LIGHTER_COLOR_FACTOR_RING

Definition at line 53 of file SugarRibbons.cs.

Referenced by SugarOldGUI.ColorTuneMenu().

List<Mesh> SugarRibbons.meshesBIGRingDown = new List<Mesh>()

Definition at line 21 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesBIGRingUp =new List<Mesh>()

Definition at line 20 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesBIGSideRing = new List<Mesh> ()

Definition at line 22 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesBondDown = new List<Mesh>()

Definition at line 26 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesBondSide = new List<Mesh>()

Definition at line 27 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesBondUp = new List<Mesh>()

Definition at line 25 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesRingDown = new List<Mesh>()

Definition at line 17 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesRingUp =new List<Mesh>()

Definition at line 16 of file SugarRibbons.cs.

List<Mesh> SugarRibbons.meshesSideRing = new List<Mesh> ()

Definition at line 18 of file SugarRibbons.cs.

Dictionary<int, Dictionary<int, int[]> > SugarRibbons.MeshIndexForAtom = new Dictionary<int, Dictionary<int, int[]>>()

Definition at line 85 of file SugarRibbons.cs.

List<GraphVertex> SugarRibbons.molAsGraph = new List<GraphVertex>()

Definition at line 30 of file SugarRibbons.cs.

int SugarRibbons.nbRes

Definition at line 68 of file SugarRibbons.cs.

List<Vector3> SugarRibbons.normals = new List<Vector3>()

Definition at line 44 of file SugarRibbons.cs.

ColorObject SugarRibbons.OXYSPHERECOLOR

Definition at line 64 of file SugarRibbons.cs.

float SugarRibbons.OXYSPHERESIZE

Definition at line 55 of file SugarRibbons.cs.

Referenced by SugarOldGUI.SugarRibbonsTune().

int SugarRibbons.PICKER =2

Definition at line 61 of file SugarRibbons.cs.

Dictionary<int, string> SugarRibbons.res_for_bond = new Dictionary<int, string>()

Definition at line 86 of file SugarRibbons.cs.

List<string> SugarRibbons.resChainList = new List<string>()

Definition at line 81 of file SugarRibbons.cs.

List<string> SugarRibbons.residueslist = new List<string>()

Definition at line 32 of file SugarRibbons.cs.

List<int> SugarRibbons.residuesNumberlist = new List<int>()

Definition at line 33 of file SugarRibbons.cs.

ColorObject SugarRibbons.RINGCOLOR

Definition at line 63 of file SugarRibbons.cs.

int SugarRibbons.SUGAR =0

Definition at line 59 of file SugarRibbons.cs.

bool SugarRibbons.SUGAR_ONLY

Definition at line 56 of file SugarRibbons.cs.

List<string> SugarRibbons.sugarResname = new List<string>()

Definition at line 69 of file SugarRibbons.cs.

float SugarRibbons.THICKNESS

Definition at line 47 of file SugarRibbons.cs.

float SugarRibbons.THICKNESS_BIG_MESH

Definition at line 49 of file SugarRibbons.cs.

float SugarRibbons.THICKNESS_BOND_5

Definition at line 52 of file SugarRibbons.cs.

float SugarRibbons.THICKNESS_BOND_6_C1_C4

Definition at line 50 of file SugarRibbons.cs.

float SugarRibbons.THICKNESS_BOND_6_OTHER

Definition at line 51 of file SugarRibbons.cs.

float SugarRibbons.THICKNESS_LITTLE_MESH

Definition at line 48 of file SugarRibbons.cs.

List<int> SugarRibbons.triangles = new List<int>()

Definition at line 45 of file SugarRibbons.cs.

List<Vector3> SugarRibbons.vertices = new List<Vector3>()

Definition at line 42 of file SugarRibbons.cs.

float [] SugarRibbons.wideness = {1f, 2f, 1f}
static

Definition at line 66 of file SugarRibbons.cs.


The documentation for this class was generated from the following file: