|
UnityMol
0.9.6-875
UnityMol viewer / In developement
|
Collaboration diagram for AmbientOcclusion:Public Member Functions | |
| AmbientOcclusion () | |
| void | Occlude () |
| void | Revert () |
Static Public Attributes | |
| static bool | isEnabled = false |
| static bool | reset = false |
Static Private Member Functions | |
| static float | AverageOfSurroundingCubes (int i, int j, int k) |
| static float | WeightedAverageOfSurroundingCubes (int i, int j, int k) |
| static void | BuildColorList () |
| static void | FillFacesWithZeros () |
| static void | SetOcclusionGridBounds () |
Private Attributes | |
| const float | faceCoef = 1f |
| const float | diagCoef = 0.707106781186548f |
| const float | cornerCoef = 0.25f |
| const float | totalWeightFactor = 1f/(6f*faceCoef + 12f*diagCoef + 8f*cornerCoef) |
Static Private Attributes | |
| static GameObject | pdb2den |
| static PDBtoDEN | genDensity |
| static float[,,] | density |
| static float[,,] | occlusion |
| static BallUpdate[] | balls |
| static Vector3 | delta |
| static Vector3 | origin = MoleculeModel.MinValue |
| static Vector3 | fudgeFactor |
| static Vector3 | inverseDelta |
| static int | xDim |
| static int | yDim |
| static int | zDim |
| static List< Color > | originalColors |
| static float | minDensity = float.MaxValue |
| static float | maxDensity = -float.MaxValue |
| static bool | weighted = true |
| static float | compensationFactor = 1.30f |
Definition at line 66 of file AmbientOcclusion.cs.
| AmbientOcclusion.AmbientOcclusion | ( | ) |
Initializes a new instance of the AmbientOcclusion class.
Definition at line 217 of file AmbientOcclusion.cs.
References Molecule.Model.MoleculeModel.atomsLocationlist, AverageOfSurroundingCubes(), BuildColorList(), FillFacesWithZeros(), PDBtoDEN.fudgeFactor, PDBtoDEN.GridS, Molecule.Model.MoleculeModel.MinValue, SetOcclusionGridBounds(), PDBtoDEN.TranPDBtoDEN(), WeightedAverageOfSurroundingCubes(), xDim, yDim, and zDim.
Here is the call graph for this function:
|
staticprivate |
Computes the sum of the surrounding cubes.
That is the eight cubes around the cube of interest at the same Z coordinate, the 9 cubes right below (z-1) and the 9 cubes right above (z+1).
| i | X coordinate of the cube |
| j | Y coordinate of the cube |
| k | Z coordinate of the cube |
Definition at line 113 of file AmbientOcclusion.cs.
Referenced by AmbientOcclusion().
Here is the caller graph for this function:
|
staticprivate |
Builds the list of the original colors, that is before the Depth Cueing effect is applied.
Definition at line 159 of file AmbientOcclusion.cs.
References Molecule.Model.MoleculeModel.atomsColorList.
Referenced by AmbientOcclusion().
Here is the caller graph for this function:
|
staticprivate |
This fills the "faces" of the cube with zeros, because they do not have the necessary number of neighbors for a proper sum.
In practice the grid is probably much larger than the molecules, which means these locations do not contain any atom and therefore do not matter, but just in case...
Definition at line 168 of file AmbientOcclusion.cs.
References xDim, yDim, and zDim.
Referenced by AmbientOcclusion().
Here is the caller graph for this function:| void AmbientOcclusion.Occlude | ( | ) |
Perfoms the actual Ambient Occlusion operations.
Definition at line 272 of file AmbientOcclusion.cs.
References Molecule.Model.MoleculeModel.atomsColorList, fudgeFactor, BallUpdate.number, and BallUpdate.resetColors.
Referenced by AdvancedOptionsOldGUI.AdvOptions().
Here is the caller graph for this function:| void AmbientOcclusion.Revert | ( | ) |
Reverts the molecule to its original colors, that is before the Depth Cueing effect was applied.
Definition at line 328 of file AmbientOcclusion.cs.
References Molecule.Model.MoleculeModel.atomsColorList, originalColors, and BallUpdate.resetColors.
Referenced by AdvancedOptionsOldGUI.AdvOptions().
Here is the caller graph for this function:
|
staticprivate |
Sets the occlusion grid bounds.
I.e. this function determines the highest and lowest densities found.
Definition at line 192 of file AmbientOcclusion.cs.
Referenced by AmbientOcclusion().
Here is the caller graph for this function:
|
staticprivate |
Definition at line 135 of file AmbientOcclusion.cs.
References totalWeightFactor.
Referenced by AmbientOcclusion().
Here is the caller graph for this function:
|
staticprivate |
Definition at line 71 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 92 of file AmbientOcclusion.cs.
|
private |
Definition at line 88 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 72 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 69 of file AmbientOcclusion.cs.
|
private |
Definition at line 87 of file AmbientOcclusion.cs.
|
private |
Definition at line 86 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 74 of file AmbientOcclusion.cs.
Referenced by Occlude().
|
staticprivate |
Definition at line 68 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 76 of file AmbientOcclusion.cs.
|
static |
Definition at line 83 of file AmbientOcclusion.cs.
Referenced by AdvancedOptionsOldGUI.AdvOptions().
|
staticprivate |
Definition at line 81 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 80 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 70 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 73 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 78 of file AmbientOcclusion.cs.
Referenced by Revert().
|
staticprivate |
Definition at line 67 of file AmbientOcclusion.cs.
|
static |
Definition at line 84 of file AmbientOcclusion.cs.
Referenced by AdvancedOptionsOldGUI.AdvOptions(), and Molecule3D.clearScene().
|
private |
Definition at line 89 of file AmbientOcclusion.cs.
Referenced by WeightedAverageOfSurroundingCubes().
|
staticprivate |
Definition at line 91 of file AmbientOcclusion.cs.
|
staticprivate |
Definition at line 77 of file AmbientOcclusion.cs.
Referenced by AmbientOcclusion(), and FillFacesWithZeros().
|
staticprivate |
Definition at line 77 of file AmbientOcclusion.cs.
Referenced by AmbientOcclusion(), and FillFacesWithZeros().
|
staticprivate |
Definition at line 77 of file AmbientOcclusion.cs.
Referenced by AmbientOcclusion(), and FillFacesWithZeros().