internal static LightFrameList getLightFrameList(Stream fs) { LightFrameList lfl = new LightFrameList(); if (fs == null || fs.Position >= fs.Length) { lfl.LightCount = 0; return(lfl); } try { lfl.LightCount = ParserHelper.getDWORD(fs); for (int i = 0; i < lfl.LightCount; i++) { lfl.LightFrames.Add(LightFrameData.getLightFrame(fs)); } } catch (Exception e) { lfl.LightCount = (uint)lfl.LightFrames.Count; System.Diagnostics.Debug.WriteLine(e.StackTrace + e.Message); return(lfl); } return(lfl); }
internal static LightFrameData getLightFrame(Stream fs) { LightFrameData lf = new LightFrameData(); lf.FrameNumber = ParserHelper.getDWORD(fs); lf.LightColor = ParserHelper.getFloat3(fs); lf.LightPosition = ParserHelper.getFloat3(fs); return(lf); }