private bool load_Labels() { string fn = pviewer.ProjectManager.CurrentProject.FolderPath + "/Data/Labels.xml"; if (!System.IO.File.Exists(fn)) { return(false); } XPathDocument doc = new XPathDocument(fn); XPathNavigator nav = doc.CreateNavigator(); var xml = nav.Select("Labels/Label"); while (xml.MoveNext()) { string xpos = xml.Current.GetAttribute("x", ""); string ypos = xml.Current.GetAttribute("y", ""); string zpos = xml.Current.GetAttribute("z", ""); string name = xml.Current.GetAttribute("name", ""); double x = double.Parse(xpos, System.Globalization.CultureInfo.InvariantCulture); double y = double.Parse(ypos, System.Globalization.CultureInfo.InvariantCulture); double z = double.Parse(zpos, System.Globalization.CultureInfo.InvariantCulture); VRVector3D pos = new VRVector3D(x, y, z); IVRLabel label = m_LabelGroup.Add(name, pos); } return(true); }
public AssetDatas( string name, uint id, VRVector3D position, string temperature, string pressure, AssetDocuments documents ) { _name = name; _id = id; _position = position; _scadaDatas = new AssetScadaDatas( temperature, pressure ); _documents = documents; }
public AssetDatas( IVRBranch branch, AssetDocuments documents, AssetScadaDatas scadaDatas ) { _name = branch.Name; _id = branch.ID; _position = branch.OBB.Position; _scadaDatas = new AssetScadaDatas(); _documents = documents; }
public AssetDatas( string name, uint id, VRVector3D position ) { _name = name; _id = id; _position = position; _scadaDatas = new AssetScadaDatas(); _documents = new AssetDocuments(); }
private bool calc_label(IVRBranch branch, out VRVector3D pos, out string name) { name = branch.Name; pos = branch.AABB.Center; if ((pos.X == 0) && (pos.Y == 0) && (pos.Z == 0)) { return(false); } return(true); }