UnityMol  0.9.6-875
UnityMol viewer / In developement
MarchingModel.cs
Go to the documentation of this file.
1 
66 using UnityEngine;
67 using System.Collections;
68 
69 public class MarchingModel : MonoBehaviour {
70 
71 
72 
73  public static int[] TMPtriangles; // to store mesh.triangles, before we know the size
74  public static Vector3[] TMPvertices; // to store mesh.vertices, before we know the size
75  public static int[] Mtriangles; // to store final array of mesh.triangles
76  public static Vector3[] Mvertices; // to store final array of mesh.vertices
77  public static Color[] TMPColors; // to store mesh.colors
78  public static Color[] MColors; // to store final arrary of mesh.colors
79 
80  public static bool[] marchedCubes; // list of length "dataLength", indicates if cubes already have been marched
81  public static bool[] marchedCubes2; // list of length "dataLength", indicates if cubes already have been marched
82  public static bool[] queuedCubes;
83  public static bool[] queuedCubes2;
84  public static int[] vertIndexGrid; // list of length "dataLength", records indexes of previously created vertices, so we can build the triangle indexes list using unique vertices
85  public static int[] vertIndexGrid2; // list of length "dataLength", records indexes of previously created vertices, so we can build the triangle indexes list using unique vertices
86  public int dataLength; // total nb of points, = ncellsX * ncellsY * ncellsZ
87  public static int[] indList; // stores all grid points indices ("ind") which are >= density threshold ("minValue")
88 
89  public static int[] cubeIndex; // list cubeIndex[ind] of already marched cubes // TODO : Useless to store as array, could be a simple int ?
90  public static int[] index;
91  // Use this for initialization
92  void Start () {
93 
94  }
95 
96 
97 }
static int[] vertIndexGrid2
static int[] vertIndexGrid
static int[] cubeIndex
static Vector3[] Mvertices
static Vector3[] TMPvertices
static int[] Mtriangles
static bool[] marchedCubes2
static int[] indList
static int[] TMPtriangles
static bool[] queuedCubes
static Color[] MColors
static Color[] TMPColors
static bool[] marchedCubes
static bool[] queuedCubes2
static int[] index