Ejemplo n.º 1
0
    void ShowCellData(string cellName, FluidSimulator simulator, FluidCellIndex cellIndex, ref bool showCell, bool showOperationData)
    {
        return;

        int gridSize = simulator.fluidParameters.gridSize;

        if (cellIndex.x >= 0 && cellIndex.y >= 0 && cellIndex.z >= 0 &&
            cellIndex.x < gridSize && cellIndex.y < gridSize && cellIndex.z < gridSize)
        {
            FluidCell cell = simulator.GetCell(cellIndex);

            showCell = EditorGUILayout.Foldout(showCell, string.Format("{0} {1}", cellName, cellIndex.ToString()));
            if (showCell)
            {
                EditorGUILayout.LabelField("Density", "" + cell.density);
                EditorGUILayout.LabelField("Velocity", "" + cell.velocity);
                EditorGUILayout.LabelField("Raw Divergence", "" + cell.rawDivergence);
                EditorGUILayout.LabelField("Relaxed Divergence", "" + cell.relaxedDivergence);
                if (showOperationData)
                {
                    FluidCellOperationData operationData = simulator.GetCellOperationData(cellIndex);
                    EditorGUILayout.LabelField("Advect Index Velocity", "" + operationData.advectIdVelocity.ToString());
                    EditorGUILayout.LabelField("Advect Past Index", "" + operationData.advectPastId.ToString());
                    EditorGUILayout.LabelField("Advect SamplePercentages", "" + operationData.advectSamplePercentages);
                }
                EditorGUILayout.Space();
            }
        }
    }