public SceneNode(string _id, string _locationX, string _locationY, string _locationZ, string _rotationP, string _rotationY, string _rotationR, TrackerInput _tracker, string _trackerCh, SceneNode _parent) { id = _id; locationX = _locationX; locationY = _locationY; locationZ = _locationZ; rotationP = _rotationP; rotationY = _rotationY; rotationR = _rotationR; tracker = _tracker; trackerCh = _trackerCh; parent = _parent; }
public SceneNode() { id = "SceneNodeId"; locationX = "0"; locationY = "0"; locationZ = "0"; rotationP = "0"; rotationR = "0"; rotationY = "0"; trackerCh = "0"; tracker = new TrackerInput(); parent = null; }
//Scene Node Parser public void SceneNodeParse(string line) { string id = GetRegEx("id").Match(line).Value; string loc = GetRegComplex("loc").Match(line).Value; string locX = GetRegProp("X").Match(loc).Value; string locY = GetRegProp("Y").Match(loc).Value; string locZ = GetRegProp("Z").Match(loc).Value; string rot = GetRegComplex("rot").Match(line).Value; string rotP = GetRegProp("P").Match(rot).Value; string rotY = GetRegProp("Y").Match(rot).Value; string rotR = GetRegProp("R").Match(rot).Value; string _trackerId = GetRegEx("tracker_id").Match(line).Value; TrackerInput tracker = (TrackerInput)inputs.Find(x => x.id == _trackerId); string _trackerCh = GetRegEx("tracker_ch").Match(line).Value; string _parent = GetRegEx("parent").Match(line).Value; SceneNode parent = sceneNodes.Find(x => x.id == _parent); sceneNodes.Add(new SceneNode(id, locX, locY, locZ, rotP, rotY, rotR, tracker, _trackerCh, parent)); }