Go to the documentation of this file.00001 #region using statements
00002 using System;
00003 using System.Collections.Generic;
00004 using System.Linq;
00005 using System.Text;
00006 using Microsoft.Xna.Framework;
00007 using Microsoft.Xna.Framework.Graphics;
00008 using visLU2.Effects;
00009 #endregion
00010
00011 namespace visLU2
00012 {
00016 public struct EngineState
00017 {
00018 public bool updateCamera;
00019 public bool loadData;
00020 public bool updateData;
00021 public bool drawData;
00022
00023 public EngineState(bool _updateCamera, bool _loadData, bool _updateData, bool _drawdata)
00024 {
00025 updateCamera = _updateCamera;
00026 loadData = _loadData;
00027 updateData = _updateData;
00028 drawData = _drawdata;
00029 }
00030
00031 }
00032
00036 public enum ViewMode
00037 {
00038
00039 VolView = 0,
00040 TopView,
00041 SideView,
00042 FrontView
00043 };
00044
00045 public enum ActiveTab
00046 {
00047 Default = 0,
00048 ArrowTab,
00049 ChannelsTab,
00050 StreamlinesTab,
00051 MainMenu,
00052 XnaDrawSurface
00053 };
00054
00058 public sealed class GameProperties
00059 {
00060
00061 static GameProperties instance = new GameProperties();
00062
00063 #region game and engine states
00064 public bool startGame = false;
00065 public bool exitGame = false;
00066 public bool updateGuiForm = false;
00067 public bool fullscreen = false;
00068 public bool dataLoaded = false;
00069 public EngineState engineState = new EngineState(true, false, true, true);
00070 #endregion
00071
00072 #region xna draw window
00073 public int GuiWindowWidth = 1024;
00074 public int GuiWindowHeight = 768;
00075 public int XNADrawSurfaceWidth = 700;
00076 public int XNADrawSurfaceHeight = 700;
00077 public int fullscreenWidth = 1024;
00078 public int fullscreenHeight = 786;
00079 public Viewport XNAViewport;
00080 #endregion
00081
00082 #region transfer function
00083
00084
00085 public bool enableTransferFunction = true;
00086 public bool enableTransferAlphaValues = true;
00087 public float[] distinctDensityValues;
00088 public int[] countDensityValues;
00089 public List<List<TransferControlPoint>> channelControlPoints = new List<List<TransferControlPoint>>();
00090 public List<Color[]> colorArray = new List<Color[]>();
00091 public bool updateChannelColor = false;
00092 #endregion
00093
00094 #region gui input
00095
00096 public String dataDir = "Data\\";
00097
00098 public String dataFilename = "blockData\\c_block.gri";
00099 public String saveFilename = "Data\\Screenshots";
00100 public bool relativePath = false;
00101 public List<String> blockDataChannels = new List<string>{"Velocity" , "Pressure" , "Vorticity"};
00102 public List<String> hurricaneDataChannels = new List<string> { "Velocity", "Temperatur", "Wolkenwasseranteil" };
00103 public bool saveView = false;
00104
00105
00106 public ViewMode viewMode = ViewMode.VolView;
00107 public ActiveTab activeTab = ActiveTab.Default;
00108
00109
00110 public bool enableChannels = true;
00111 public List<string> channelNames = new List<string>();
00112 public int currentChannelIdx = 0;
00113 public bool enableChannelTransferFunction = false;
00114 public bool composeChannels = false;
00115
00116
00117 public bool enableArrowPlot = false;
00118 public bool scaleArrowLength = false;
00119 public bool enableArrowTransferFunction = false;
00120 public float apStepsize = 20.0f;
00121 public float apAlpha = 0.8f;
00122 public List<TransferControlPoint> arrowControlPoints = new List<TransferControlPoint>();
00123 public Color[] arrowColorArray = new Color[256];
00124 public bool updateArrowColor = false;
00125
00126
00127 public bool enableStreamlines = false;
00128 public bool enableRungeKutta = false;
00129 public float Dt = 0.01f;
00130 public float Dsep = 2.0f;
00131 public float Dtest = 0.25f;
00132 public float maxDsep = 10.0f;
00133 public float lineLength = 10.0f;
00134 public float maxLineLength = 100.0f;
00135 public float lineWidth = 0.2f;
00136 public bool enableTapering = false;
00137 public bool enableGlyphMapping = false;
00138 public bool enableTextureGeneration = false;
00139
00140
00141 public int xDataRange = 100;
00142 public int yDataRange = 100;
00143 public int zDataRange = 100;
00144 public float xSliceValue = 0.5f;
00145 public float ySliceValue = 0.5f;
00146 public float zSliceValue = 0.5f;
00147
00148
00149 public bool enableClippingPlane = false;
00150
00151
00152
00153
00154
00155 public bool perspectiveProjection = false;
00156 public bool maximumIntensityProjection = false;
00157
00158
00159
00160
00161
00162 public bool enableFrontToBackBlend = true;
00163
00164
00165 public bool enableShading = true;
00166
00167
00168 public int gradientSampleSize = 1;
00169
00170
00171
00172 public Vector3 cameraPosition = new Vector3(0.0f, 0.0f, 50.0f);
00173 public Vector3 dataOrigin = Vector3.Zero;
00174 #endregion
00175
00176
00177 public static GameProperties Instance
00178 {
00179 get
00180 {
00181 return instance;
00182 }
00183 }
00184
00185 private static void calculateViewportDimension()
00186 {
00187
00188 }
00189
00190 static GameProperties(){}
00191
00192 GameProperties(){}
00193 }
00194 }