void Start() { _brushController = GameObject.Find("Brush").GetComponent <BrushController> (); _segments = new Dictionary <IntVector3, GameObject> (new IntVector3.EqualityComparer()); _marchingCubesEngine = GameObject.Find("MarchingCubesEngine").GetComponent <MarchingCubesEngine> (); Debug.Assert(_marchingCubesEngine != null); _colorPicker = GameObject.Find("ColorPicker").GetComponent <ColorPicker> (); _runtimeTranslation = GameObject.Find("RuntimeTranslation").GetComponent <RuntimeTranslation> (); _editorState = GameObject.Find("UICanvas").GetComponent <EditorState> (); _materialsController = GameObject.Find("MaterialsCanvas").GetComponent <MaterialsController> (); Debug.Assert(_materialsController != null); int width = 2 * EDITOR_SPACE_HALF_WIDTH + 1; _editSpace = new int[width, width, width]; if (use_lerp_color) { GenNearestVoxelPointForEdgePointTable(); } else { GenNearestVoxelPointTable(); } _meshRenderer = GetComponent <MeshRenderer> (); }
public void Init() { _marchingCubesEngine = GameObject.Find("MarchingCubesEngine").GetComponent <MarchingCubesEngine> (); _editSpace = new int[poly_object_segment_width + 1, poly_object_segment_width + 1, poly_object_segment_width + 1]; _count = 0; }