// Pass through the settable parameters and set the default values public void SetParameterDefaultValues(LodenContext pContext) { foreach (ParameterDefnBase parm in ParameterDefinitions) { parm.context = pContext; parm.AssignDefault(); } }
// Given a scene, do the LOD ("level of detail") conversion public LodenRegion(Scene pScene, LodenContext pLContext) { _scene = pScene; LContext = pLContext; // Register this lod controller for the region so other modules can access _scene.RegisterModuleInterface <LodenRegion>(this); }
// Get user set values out of the ini file. public void SetParameterConfigurationValues(IConfig cfg, LodenContext pContext) { foreach (ParameterDefnBase parm in ParameterDefinitions) { // _context.log.DebugFormat("{0}: parm={1}, desc='{2}'", _logHeader, parm.name, parm.desc); parm.context = pContext; string configValue = cfg.GetString(parm.name, parm.GetValue()); if (!String.IsNullOrEmpty(configValue)) { parm.SetValue(cfg.GetString(parm.name, parm.GetValue())); } } }
// IRegionModuleBase.Initialize public void Initialise(IConfigSource pConfig) { var sysConfig = pConfig.Configs["Loden"]; _lcontext = new LodenContext(sysConfig, null, _log); _lcontext.parms = new LodenParams(_lcontext); if (sysConfig != null) { _lcontext.parms.SetParameterConfigurationValues(sysConfig, _lcontext); } if (_lcontext.parms.P <bool>("Enabled")) { _log.InfoFormat("{0} Enabled", _logHeader); } }
public LodenAssets(Scene scene, LodenContext pContext) { _scene = scene; _context = pContext; }
public LodenParams(LodenContext pContext) { _context = pContext; SetParameterDefaultValues(_context); }
public LodenStats(LodenContext pContext) { _context = pContext; }