private Watch3D(IEnumerable <PortModel> inPorts, IEnumerable <PortModel> outPorts) : base(inPorts, outPorts) { ArgumentLacing = LacingStrategy.Disabled; WatchWidth = 200; WatchHeight = 200; ShouldDisplayPreviewCore = false; Camera = new Watch3DCamera(); }
public Watch3D() { InPortData.Add(new PortData("", Resources.Watch3DPortDataInputToolTip)); OutPortData.Add(new PortData("", Resources.Watch3DPortDataInputToolTip)); RegisterAllPorts(); ArgumentLacing = LacingStrategy.Disabled; WatchWidth = 200; WatchHeight = 200; ShouldDisplayPreviewCore = false; Camera = new Watch3DCamera(); }
/// <summary> /// Deserializes camera from XML, if there is no any Deserialized action. /// It's used for creation of camera, that will be sent to Flood. /// </summary> private void DeserializeCamera() { var cameraNode = initialCameraData.ChildNodes .Cast <XmlNode>() .FirstOrDefault (innerNode => innerNode.Name.Equals("camera", StringComparison.OrdinalIgnoreCase)); if (cameraNode == null || cameraNode.Attributes == null || cameraNode.Attributes.Count == 0) { return; } var name = cameraNode.Attributes["Name"].Value; var ex = float.Parse(cameraNode.Attributes["eyeX"].Value, CultureInfo.InvariantCulture); var ey = float.Parse(cameraNode.Attributes["eyeY"].Value, CultureInfo.InvariantCulture); var ez = float.Parse(cameraNode.Attributes["eyeZ"].Value, CultureInfo.InvariantCulture); var lx = float.Parse(cameraNode.Attributes["lookX"].Value, CultureInfo.InvariantCulture); var ly = float.Parse(cameraNode.Attributes["lookY"].Value, CultureInfo.InvariantCulture); var lz = float.Parse(cameraNode.Attributes["lookZ"].Value, CultureInfo.InvariantCulture); var ux = float.Parse(cameraNode.Attributes["upX"].Value, CultureInfo.InvariantCulture); var uy = float.Parse(cameraNode.Attributes["upY"].Value, CultureInfo.InvariantCulture); var uz = float.Parse(cameraNode.Attributes["upZ"].Value, CultureInfo.InvariantCulture); Camera = new Watch3DCamera { Name = name, EyeX = ex, EyeY = ey, EyeZ = ez, LookX = lx, LookY = ly, LookZ = lz, UpX = ux, UpY = uy, UpZ = uz }; }
/// <summary> /// Deserializes camera from XML, if there is no any Deserialized action. /// It's used for creation of camera, that will be sent to Flood. /// </summary> private void DeserializeCamera() { var cameraNode = initialCameraData.ChildNodes .Cast<XmlNode>() .FirstOrDefault (innerNode => innerNode.Name.Equals("camera", StringComparison.OrdinalIgnoreCase)); if (cameraNode == null || cameraNode.Attributes == null || cameraNode.Attributes.Count == 0) { return; } var name = cameraNode.Attributes["Name"].Value; var ex = float.Parse(cameraNode.Attributes["eyeX"].Value, CultureInfo.InvariantCulture); var ey = float.Parse(cameraNode.Attributes["eyeY"].Value, CultureInfo.InvariantCulture); var ez = float.Parse(cameraNode.Attributes["eyeZ"].Value, CultureInfo.InvariantCulture); var lx = float.Parse(cameraNode.Attributes["lookX"].Value, CultureInfo.InvariantCulture); var ly = float.Parse(cameraNode.Attributes["lookY"].Value, CultureInfo.InvariantCulture); var lz = float.Parse(cameraNode.Attributes["lookZ"].Value, CultureInfo.InvariantCulture); var ux = float.Parse(cameraNode.Attributes["upX"].Value, CultureInfo.InvariantCulture); var uy = float.Parse(cameraNode.Attributes["upY"].Value, CultureInfo.InvariantCulture); var uz = float.Parse(cameraNode.Attributes["upZ"].Value, CultureInfo.InvariantCulture); Camera = new Watch3DCamera { Name = name, EyeX = ex, EyeY = ey, EyeZ = ez, LookX = lx, LookY = ly, LookZ = lz, UpX = ux, UpY = uy, UpZ = uz }; }
private Watch3D(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts) : base(inPorts, outPorts) { ArgumentLacing = LacingStrategy.Disabled; WatchWidth = 200; WatchHeight = 200; ShouldDisplayPreviewCore = false; Camera = new Watch3DCamera(); }