internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "controlPoint") { ControlPoint.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); } else if (id == "tessellation") { Tessellation = parser.ParseIntValue(); } else if (id == "weight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "closed") { Closed = parser.ParseBoolValue(); } else if (id == "knot") { Knot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "order") { Order = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "controlPoint") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { ControlPoint = node as X3DCoordinateNode; if (ControlPoint == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "knot") { Knot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "order") { Order = parser.ParseIntValue(); } else if (id == "weight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "controlPoint") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { ControlPoint = node as X3DCoordinateNode; if (ControlPoint == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "knot") { Knot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "order") { Order = parser.ParseIntValue(); } else if (id == "weight" || id == "keyWeight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "dimension") { Dimension = parser.ParseIntValue(); } else if (id == "fractionAbsolute") { FractionAbsolute = parser.ParseBoolValue(); } else if (id == "keyValue") { List <SFVec3f> controlPoints = parser.ParseSFVec3fOrMFVec3fValue(); if (ControlPoint == null) { ControlPoint = new x3dCoordinate(); } x3dCoordinate cp = ControlPoint as x3dCoordinate; if (cp != null) { cp.Point.AddRange(controlPoints); } } else { return(false); } return(true); }