internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "align") { Align = parser.ParseSFStringOrMFStringValue(); } else if (id == "offset") { Offset = parser.ParseSFFloatOrMFFloatValue(); } else if (id == "offsetUnits") { OffsetUnits = parser.ParseSFStringOrMFStringValue(); } else if (id == "scaleMode") { ScaleMode = parser.ParseSFStringOrMFStringValue(); } else if (id == "size") { Size = parser.ParseSFFloatOrMFFloatValue(); } else if (id == "sizeUnits") { SizeUnits = parser.ParseSFStringOrMFStringValue(); } 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) { 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) { if (id == "avatarSize") { if (wasAvatarSize) { AvatarSize.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { AvatarSize = parser.ParseSFFloatOrMFFloatValue(); } wasAvatarSize = true; } else if (id == "headlight") { Headlight = parser.ParseBoolValue(); } else if (id == "speed") { Speed = parser.ParseDoubleValue(); } else if (id == "transitionTime") { TransitionTime = parser.ParseDoubleValue(); } else if (id == "transitionType") { if (wasTransitionType) { TransitionType.AddRange(parser.ParseSFStringOrMFStringValue()); } else { TransitionType = parser.ParseSFStringOrMFStringValue(); } wasTransitionType = true; } else if (id == "type") { if (wasType) { Type.AddRange(parser.ParseSFStringOrMFStringValue()); } else { Type = parser.ParseSFStringOrMFStringValue(); } wasType = true; } else if (id == "visibilityLimit") { VisibilityLimit = parser.ParseDoubleValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="groundAngle") GroundAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="groundColor") GroundColor.AddRange(parser.ParseSFColorOrMFColorValue()); else if(id=="backUrl") BackUrl.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="bottomUrl") BottomUrl.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="frontUrl") FrontUrl.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="leftUrl") LeftUrl.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="rightUrl") RightUrl.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="topUrl") TopUrl.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="skyAngle") SkyAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="skyColor") { if(wasSkyColor) SkyColor.AddRange(parser.ParseSFColorOrMFColorValue()); else SkyColor=parser.ParseSFColorOrMFColorValue(); wasSkyColor=true; } else if(id=="transparency") { // since X3D Node Spec and VRML Classic Coding Spec disagree on the fieldType List<double> values=parser.ParseSFFloatOrMFFloatValue(); if(values.Count!=0) Transparency=values[0]; } else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="children") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DChildNode child=node as X3DChildNode; if(child==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Children.Add(child); } } else if(id=="clipBoundary") { if(wasClipBoundary) ClipBoundary.AddRange(parser.ParseSFFloatOrMFFloatValue()); else ClipBoundary=parser.ParseSFFloatOrMFFloatValue(); wasClipBoundary=true; } else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue(); else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue(); 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); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="align") Align=parser.ParseSFStringOrMFStringValue(); else if(id=="offset") Offset=parser.ParseSFFloatOrMFFloatValue(); else if(id=="offsetUnits") OffsetUnits=parser.ParseSFStringOrMFStringValue(); else if(id=="scaleMode") ScaleMode=parser.ParseSFStringOrMFStringValue(); else if(id=="size") Size=parser.ParseSFFloatOrMFFloatValue(); else if(id=="sizeUnits") SizeUnits=parser.ParseSFStringOrMFStringValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="controlPoint") ControlPoint.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); else if(id=="weight") Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="uDimension") UDimension=parser.ParseIntValue(); else if(id=="uKnot") UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="uOrder") UOrder=parser.ParseIntValue(); else if(id=="vDimension") VDimension=parser.ParseIntValue(); else if(id=="vKnot") VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="vOrder") VOrder=parser.ParseIntValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "closed") { Closed = parser.ParseBoolValue(); } else if (id == "key") { Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "keyValue") { KeyValue.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); } else if (id == "keyVelocity") { KeyVelocity.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); } else if (id == "normalizeVelocity") { NormalizeVelocity = parser.ParseBoolValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="easeInEaseOut") EaseInEaseOut.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); else if(id=="key") Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="centerOfMass") CenterOfMass=parser.ParseSFVec3fValue(); else if(id=="children") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DChildNode child=node as X3DChildNode; if(child==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Children.Add(child); } } else if(id=="coord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Coord=node as X3DCoordinateNode; if(Coord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="displacers") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { IX3DHAnimDisplacerNode displacer=node as IX3DHAnimDisplacerNode; if(displacer==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Displacers.Add(displacer); } } else if(id=="mass") Mass=parser.ParseDoubleValue(); else if(id=="momentsOfInertia") { if(wasMomentsOfInertia) MomentsOfInertia.AddRange(parser.ParseSFFloatOrMFFloatValue()); else MomentsOfInertia=parser.ParseSFFloatOrMFFloatValue(); wasMomentsOfInertia=true; } else if(id=="name") Name=parser.ParseStringValue(); else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue(); else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue(); 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=="texCoord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TexCoord=node as IX3DNurbsSurfaceGeometryNodeTexCoord; if(TexCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="trimmingContour") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { IX3DContour2DNode contour=node as IX3DContour2DNode; if(contour==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else TrimmingContour.Add(contour); } } else if(id=="uTessellation") UTessellation=parser.ParseIntValue(); else if(id=="vTessellation") VTessellation=parser.ParseIntValue(); else if(id=="weight") Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="solid") Solid=parser.ParseBoolValue(); else if(id=="uClosed") UClosed=parser.ParseBoolValue(); else if(id=="uDimension") UDimension=parser.ParseIntValue(); else if(id=="uKnot") UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="uOrder") UOrder=parser.ParseIntValue(); else if(id=="vClosed") VClosed=parser.ParseBoolValue(); else if(id=="vDimension") VDimension=parser.ParseIntValue(); else if(id=="vKnot") VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="vOrder") VOrder=parser.ParseIntValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="centerOfRotation") CenterOfRotation=parser.ParseSFVec3fValue(); else if(id=="description") Description=parser.ParseStringValue(); else if(id=="fieldOfView") { if(wasFieldOfView) FieldOfView.AddRange(parser.ParseSFFloatOrMFFloatValue()); else FieldOfView=parser.ParseSFFloatOrMFFloatValue(); wasFieldOfView=true; } else if(id=="jump") Jump=parser.ParseBoolValue(); else if(id=="orientation") Orientation=parser.ParseSFRotationValue(); else if(id=="position") Position=parser.ParseSFVec3fValue(); else if(id=="retainUserOffsets") RetainUserOffsets=parser.ParseBoolValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "children") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode child = node as X3DChildNode; if (child == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Children.Add(child); } } } else if (id == "clipBoundary") { if (wasClipBoundary) { ClipBoundary.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { ClipBoundary = parser.ParseSFFloatOrMFFloatValue(); } wasClipBoundary = true; } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="name") Name=parser.ParseStringValue(); else if(id=="reference") Reference=parser.ParseStringValue(); else if(id=="value") Value.AddRange(parser.ParseSFFloatOrMFFloatValue()); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "centerOfRotation") { CenterOfRotation = parser.ParseSFVec3fValue(); } else if (id == "description") { Description = parser.ParseStringValue(); } else if (id == "fieldOfView") { if (wasFieldOfView) { FieldOfView.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { FieldOfView = parser.ParseSFFloatOrMFFloatValue(); } wasFieldOfView = true; } else if (id == "jump") { Jump = parser.ParseBoolValue(); } else if (id == "orientation") { Orientation = parser.ParseSFRotationValue(); } else if (id == "position") { Position = parser.ParseSFVec3fValue(); } else if (id == "retainUserOffsets") { RetainUserOffsets = parser.ParseBoolValue(); } 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) { if (id == "key") { Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "keyValue") { List <double> values = parser.ParseSFFloatOrMFFloatValue(); foreach (double value in values) { KeyValue.Add(new SFFloat(value)); } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "depth") { Depth.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "controlPoint") { ControlPoint.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); } else if (id == "weight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "uDimension") { UDimension = parser.ParseIntValue(); } else if (id == "uKnot") { UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "uOrder") { UOrder = parser.ParseIntValue(); } else if (id == "vDimension") { VDimension = parser.ParseIntValue(); } else if (id == "vKnot") { VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "vOrder") { VOrder = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "easeInEaseOut") { EaseInEaseOut.AddRange(parser.ParseSFVec2fOrMFVec2fValue()); } else if (id == "key") { Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "key") { Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "keyValue") { KeyValue.AddRange(parser.ParseSFColorOrMFColorValue()); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "mode") { Mode = parser.ParseStringValue(); } else if (id == "Parameter") { Parameter = parser.ParseSFFloatOrMFFloatValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "children" || id == "level" || id == "levels") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode child = node as X3DChildNode; if (child == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Children.Add(child); } } } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else if (id == "center") { Center = parser.ParseSFVec3fValue(); } else if (id == "forceTransitions") { ForceTransitions = parser.ParseBoolValue(); } else if (id == "range") { Range = parser.ParseSFFloatOrMFFloatValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "key") { Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "keyValue") { KeyValue.AddRange(parser.ParseSFVec3fStringOrMFVec3fStringsValue()); } else if (id == "geoOrigin") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { GeoOrigin = node as IX3DGeoOriginNode; if (GeoOrigin == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "geoSystem") { if (wasGeoSystem) { GeoSystem.AddRange(parser.ParseSFStringOrMFStringValue()); } else { GeoSystem = parser.ParseSFStringOrMFStringValue(); } wasGeoSystem = true; } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "key") { Key.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "keyValue") { object token = parser.PeekNextToken(); if (token is VRMLTokenString) { string values = parser.ParseStringValue(); string[] parts = values.Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); foreach (string part in parts) { string l = part.ToLower(); if (l == "true") { KeyValue.Add(new SFBool(true)); } else { KeyValue.Add(new SFBool(false)); } } } else { List <bool> values = parser.ParseSFBoolOrMFBoolValue(); foreach (bool value in values) { KeyValue.Add(new SFBool(value)); } } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "value") { Value.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "name") { Name = parser.ParseStringValue(); } else if (id == "numComponents") { NumComponents = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="children"||id=="level"||id=="levels") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DChildNode child=node as X3DChildNode; if(child==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Children.Add(child); } } else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue(); else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue(); else if(id=="center") Center=parser.ParseSFVec3fValue(); else if(id=="forceTransitions") ForceTransitions=parser.ParseBoolValue(); else if(id=="range") Range=parser.ParseSFFloatOrMFFloatValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "fontStyle") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { FontStyle = node as X3DFontStyleNode; if (FontStyle == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "length") { Length.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "maxExtent") { MaxExtent = parser.ParseDoubleValue(); } else if (id == "string") { String.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "solid") { Solid = parser.ParseBoolValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="color") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Color=node as X3DColorNode; if(Color==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="normal") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Normal=node as X3DNormalNode; if(Normal==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="texCoord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TexCoord=node as X3DTextureCoordinateNode; if(TexCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="yScale") YScale=parser.ParseDoubleValue(); else if(id=="ccw") CCW=parser.ParseBoolValue(); else if(id=="colorPerVertex") ColorPerVertex=parser.ParseBoolValue(); else if(id=="creaseAngle") CreaseAngle=parser.ParseDoubleValue(); else if(id=="geoGridOrigin") GeoGridOrigin=parser.ParseSFVec3fStringValue(); else if(id=="geoOrigin") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { GeoOrigin=node as IX3DGeoOriginNode; if(GeoOrigin==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="geoSystem") { if(wasGeoSystem) GeoSystem.AddRange(parser.ParseSFStringOrMFStringValue()); else GeoSystem=parser.ParseSFStringOrMFStringValue(); wasGeoSystem=true; } else if(id=="height") { if(wasHeight) Height.AddRange(parser.ParseSFFloatOrMFFloatValue()); else Height=parser.ParseSFFloatOrMFFloatValue(); wasHeight=true; } else if(id=="normalPerVertex") NormalPerVertex=parser.ParseBoolValue(); else if(id=="solid") Solid=parser.ParseBoolValue(); else if(id=="xDimension") XDimension=parser.ParseIntValue(); else if(id=="xSpacing") XSpacing=parser.ParseDoubleStringValue(); else if(id=="zDimension") ZDimension=parser.ParseIntValue(); else if(id=="zSpacing") ZSpacing=parser.ParseDoubleStringValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "center") { Center = parser.ParseSFVec3fValue(); } else if (id == "children") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode child = node as IX3DHAnimJointChildren; if (child == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Children.Add(child); } } } else if (id == "displacers") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { IX3DHAnimDisplacerNode displacer = node as IX3DHAnimDisplacerNode; if (displacer == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Displacers.Add(displacer); } } } else if (id == "limitOrientation") { LimitOrientation = parser.ParseSFRotationValue(); } else if (id == "llimit") { Llimit.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "name") { Name = parser.ParseStringValue(); } else if (id == "rotation") { Rotation = parser.ParseSFRotationValue(); } else if (id == "scale") { Scale = parser.ParseSFVec3fValue(); } else if (id == "scaleOrientation") { ScaleOrientation = parser.ParseSFRotationValue(); } else if (id == "skinCoordIndex") { SkinCoordIndex.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "skinCoordWeight") { SkinCoordWeight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "stiffness") { if (wasStiffness) { Stiffness.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { Stiffness = parser.ParseSFFloatOrMFFloatValue(); } wasStiffness = true; } else if (id == "translation") { Translation = parser.ParseSFVec3fValue(); } else if (id == "ulimit") { Ulimit.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "attrib") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DVertexAttributeNode attr = node as X3DVertexAttributeNode; if (attr == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Attrib.Add(attr); } } } else if (id == "color") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Color = node as X3DColorNode; if (Color == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "fogCoord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { FogCoord = node as IX3DFogCoordinateNode; if (FogCoord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "normal") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Normal = node as X3DNormalNode; if (Normal == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "texCoord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TexCoord = node as X3DTextureCoordinateNode; if (TexCoord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "ccw") { CCW = parser.ParseBoolValue(); } else if (id == "colorPerVertex") { ColorPerVertex = parser.ParseBoolValue(); } else if (id == "creaseAngle") { CreaseAngle = parser.ParseDoubleValue(); } else if (id == "height") { Height.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "normalPerVertex") { NormalPerVertex = parser.ParseBoolValue(); } else if (id == "solid") { Solid = parser.ParseBoolValue(); } else if (id == "xDimension") { XDimension = parser.ParseIntValue(); } else if (id == "xSpacing") { XSpacing = parser.ParseDoubleValue(); } else if (id == "zDimension") { ZDimension = parser.ParseIntValue(); } else if (id == "zSpacing") { ZSpacing = parser.ParseDoubleValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="children") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DChildNode child=node as X3DShapeNode; if(child==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Children.Add(child); } } else if(id=="controlPoint") { object token=parser.PeekNextToken(); if(token is VRMLTokenIdKeywordOrFieldType) { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { ControlPoint=node as X3DCoordinateNode; if(ControlPoint==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else { x3dCoordinate coords=new x3dCoordinate(); coords.Point=parser.ParseSFVec3fOrMFVec3fValue(); ControlPoint=coords; } } else if(id=="inputCoord") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DCoordinateNode coord=node as X3DCoordinateNode; if(coord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else InputCoord.Add(coord); } } else if(id=="inputTransform") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { IX3DCoordinateDeformerInputTransform transf=node as IX3DCoordinateDeformerInputTransform; if(transf==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else InputTransform.Add(transf); } } else if(id=="outputCoord") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DCoordinateNode coord=node as X3DCoordinateNode; if(coord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else OutputCoord.Add(coord); } } else if(id=="weight") Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue(); else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue(); else if(id=="uDimension") UDimension=parser.ParseIntValue(); else if(id=="uKnot") UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="uOrder") UOrder=parser.ParseIntValue(); else if(id=="vDimension") VDimension=parser.ParseIntValue(); else if(id=="vKnot") VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="vOrder") VOrder=parser.ParseIntValue(); else if(id=="wDimension") WDimension=parser.ParseIntValue(); else if(id=="wKnot") WKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="wOrder") WOrder=parser.ParseIntValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "children") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode child = node as X3DShapeNode; if (child == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Children.Add(child); } } } else if (id == "controlPoint") { object token = parser.PeekNextToken(); if (token is VRMLTokenIdKeywordOrFieldType) { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { ControlPoint = node as X3DCoordinateNode; if (ControlPoint == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else { x3dCoordinate coords = new x3dCoordinate(); coords.Point = parser.ParseSFVec3fOrMFVec3fValue(); ControlPoint = coords; } } else if (id == "inputCoord") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DCoordinateNode coord = node as X3DCoordinateNode; if (coord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { InputCoord.Add(coord); } } } else if (id == "inputTransform") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { IX3DCoordinateDeformerInputTransform transf = node as IX3DCoordinateDeformerInputTransform; if (transf == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { InputTransform.Add(transf); } } } else if (id == "outputCoord") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DCoordinateNode coord = node as X3DCoordinateNode; if (coord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { OutputCoord.Add(coord); } } } else if (id == "weight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else if (id == "uDimension") { UDimension = parser.ParseIntValue(); } else if (id == "uKnot") { UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "uOrder") { UOrder = parser.ParseIntValue(); } else if (id == "vDimension") { VDimension = parser.ParseIntValue(); } else if (id == "vKnot") { VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "vOrder") { VOrder = parser.ParseIntValue(); } else if (id == "wDimension") { WDimension = parser.ParseIntValue(); } else if (id == "wKnot") { WKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "wOrder") { WOrder = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "address") { Address = parser.ParseStringValue(); } else if (id == "applicationID") { ApplicationID = parser.ParseIntValue(); } else if (id == "articulationParameterCount") { ArticulationParameterCount = parser.ParseIntValue(); } else if (id == "articulationParameterDesignatorArray") { ArticulationParameterDesignatorArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "articulationParameterChangeIndicatorArray") { ArticulationParameterChangeIndicatorArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "articulationParameterIdPartAttachedToArray") { ArticulationParameterIdPartAttachedToArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "articulationParameterTypeArray") { ArticulationParameterTypeArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "articulationParameterArray") { ArticulationParameterArray.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "center") { Center = parser.ParseSFVec3fValue(); } else if (id == "children") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode child = node as X3DChildNode; if (child == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Children.Add(child); } } } else if (id == "collisionType") { CollisionType = parser.ParseIntValue(); } else if (id == "deadReckoning") { DeadReckoning = parser.ParseIntValue(); } else if (id == "detonationLocation") { DetonationLocation = parser.ParseSFVec3fValue(); } else if (id == "detonationRelativeLocation") { DetonationRelativeLocation = parser.ParseSFVec3fValue(); } else if (id == "detonationResult") { DetonationResult = parser.ParseIntValue(); } else if (id == "enabled") { Enabled = parser.ParseBoolValue(); } else if (id == "entityCategory") { EntityCategory = parser.ParseIntValue(); } else if (id == "entityCountry") { EntityCountry = parser.ParseIntValue(); } else if (id == "entityDomain") { EntityDomain = parser.ParseIntValue(); } else if (id == "entityExtra") { EntityExtra = parser.ParseIntValue(); } else if (id == "entityID") { EntityID = parser.ParseIntValue(); } else if (id == "entityKind") { EntityKind = parser.ParseIntValue(); } else if (id == "entitySpecific") { EntitySpecific = parser.ParseIntValue(); } else if (id == "entitySubCategory") { EntitySubCategory = parser.ParseIntValue(); } else if (id == "eventApplicationID") { EventApplicationID = parser.ParseIntValue(); } else if (id == "eventEntityID") { EventEntityID = parser.ParseIntValue(); } else if (id == "eventNumber") { EventNumber = parser.ParseIntValue(); } else if (id == "eventSiteID") { EventSiteID = parser.ParseIntValue(); } else if (id == "fired1") { Fired1 = parser.ParseBoolValue(); } else if (id == "fired2") { Fired2 = parser.ParseBoolValue(); } else if (id == "fireMissionIndex") { FireMissionIndex = parser.ParseIntValue(); } else if (id == "firingRange") { FiringRange = parser.ParseDoubleValue(); } else if (id == "firingRate") { FiringRate = parser.ParseIntValue(); } else if (id == "forceID") { ForceID = parser.ParseIntValue(); } else if (id == "fuse") { Fuse = parser.ParseIntValue(); } else if (id == "linearVelocity") { LinearVelocity = parser.ParseSFVec3fValue(); } else if (id == "linearAcceleration") { LinearAcceleration = parser.ParseSFVec3fValue(); } else if (id == "marking") { Marking = parser.ParseStringValue(); } else if (id == "multicastRelayHost") { MulticastRelayHost = parser.ParseStringValue(); } else if (id == "multicastRelayPort") { MulticastRelayPort = parser.ParseIntValue(); } else if (id == "munitionApplicationID") { MunitionApplicationID = parser.ParseIntValue(); } else if (id == "munitionEndPoint") { MunitionEndPoint = parser.ParseSFVec3fValue(); } else if (id == "munitionEntityID") { MunitionEntityID = parser.ParseIntValue(); } else if (id == "munitionQuantity") { MunitionQuantity = parser.ParseIntValue(); } else if (id == "munitionSiteID") { MunitionSiteID = parser.ParseIntValue(); } else if (id == "munitionStartPoint") { MunitionStartPoint = parser.ParseSFVec3fValue(); } else if (id == "networkMode") { NetworkMode = parser.ParseStringValue(); } else if (id == "port") { Port = parser.ParseIntValue(); } else if (id == "readInterval") { ReadInterval = parser.ParseDoubleValue(); } else if (id == "rotation") { Rotation = parser.ParseSFRotationValue(); } else if (id == "scale") { Scale = parser.ParseSFVec3fValue(); } else if (id == "scaleOrientation") { ScaleOrientation = parser.ParseSFRotationValue(); } else if (id == "siteID") { SiteID = parser.ParseIntValue(); } else if (id == "translation") { Translation = parser.ParseSFVec3fValue(); } else if (id == "warhead") { Warhead = parser.ParseIntValue(); } else if (id == "writeInterval") { WriteInterval = parser.ParseDoubleValue(); } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else if (id == "rtpHeaderExpected") { RtpHeaderExpected = parser.ParseBoolValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="groundAngle") GroundAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="groundColor") GroundColor.AddRange(parser.ParseSFColorOrMFColorValue()); else if(id=="backTexture") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { BackTexture=node as X3DTextureNode; if(BackTexture==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="bottomTexture") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { BottomTexture=node as X3DTextureNode; if(BottomTexture==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="frontTexture") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { FrontTexture=node as X3DTextureNode; if(FrontTexture==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="leftTexture") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { LeftTexture=node as X3DTextureNode; if(LeftTexture==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="rightTexture") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { RightTexture=node as X3DTextureNode; if(RightTexture==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="topTexture") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TopTexture=node as X3DTextureNode; if(TopTexture==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="skyAngle") SkyAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="skyColor") { if(wasSkyColor) SkyColor.AddRange(parser.ParseSFColorOrMFColorValue()); else SkyColor=parser.ParseSFColorOrMFColorValue(); wasSkyColor=true; } else if(id=="transparency") { // since X3D Node Spec and VRML Classic Coding Spec disagree on the fieldType List<double> values=parser.ParseSFFloatOrMFFloatValue(); if(values.Count!=0) Transparency=values[0]; } else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "appearance") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Appearance = node as X3DAppearanceNode; if (Appearance == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "createParticles") { CreateParticles = parser.ParseBoolValue(); } else if (id == "geometry") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Geometry = node as X3DGeometryNode; if (Geometry == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "enabled") { Enabled = parser.ParseBoolValue(); } else if (id == "lifetimeVariation") { LifetimeVariation = parser.ParseDoubleValue(); } else if (id == "maxParticles") { MaxParticles = parser.ParseIntValue(); } else if (id == "particleLifetime") { ParticleLifetime = parser.ParseDoubleValue(); } else if (id == "particleSize") { ParticleSize = parser.ParseSFVec2fValue(); } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else if (id == "colorRamp") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { ColorRamp = node as X3DColorNode; if (ColorRamp == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "colorKey") { ColorKey.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "emitter") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Emitter = node as X3DParticleEmitterNode; if (Emitter == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "geometryType") { GeometryType = parser.ParseStringValue(); } else if (id == "physics") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DParticlePhysicsModelNode ppmn = node as X3DParticlePhysicsModelNode; if (ppmn == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Physics.Add(ppmn); } } } else if (id == "texCoordRamp") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TexCoordRamp = node as X3DTextureCoordinateNode; if (TexCoordRamp == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "texCoordKey") { TexCoordKey.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 == "texCoord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TexCoord = node as IX3DNurbsSurfaceGeometryNodeTexCoord; if (TexCoord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "trimmingContour") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { IX3DContour2DNode contour = node as IX3DContour2DNode; if (contour == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { TrimmingContour.Add(contour); } } } else if (id == "uTessellation") { UTessellation = parser.ParseIntValue(); } else if (id == "vTessellation") { VTessellation = parser.ParseIntValue(); } else if (id == "weight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "solid") { Solid = parser.ParseBoolValue(); } else if (id == "uClosed") { UClosed = parser.ParseBoolValue(); } else if (id == "uDimension") { UDimension = parser.ParseIntValue(); } else if (id == "uKnot") { UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "uOrder") { UOrder = parser.ParseIntValue(); } else if (id == "vClosed") { VClosed = parser.ParseBoolValue(); } else if (id == "vDimension") { VDimension = parser.ParseIntValue(); } else if (id == "vKnot") { VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "vOrder") { VOrder = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="address") Address=parser.ParseStringValue(); else if(id=="applicationID") ApplicationID=parser.ParseIntValue(); else if(id=="articulationParameterCount") ArticulationParameterCount=parser.ParseIntValue(); else if(id=="articulationParameterDesignatorArray") ArticulationParameterDesignatorArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="articulationParameterChangeIndicatorArray") ArticulationParameterChangeIndicatorArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="articulationParameterIdPartAttachedToArray") ArticulationParameterIdPartAttachedToArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="articulationParameterTypeArray") ArticulationParameterTypeArray.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="articulationParameterArray") ArticulationParameterArray.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="center") Center=parser.ParseSFVec3fValue(); else if(id=="children") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DChildNode child=node as X3DChildNode; if(child==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Children.Add(child); } } else if(id=="collisionType") CollisionType=parser.ParseIntValue(); else if(id=="deadReckoning") DeadReckoning=parser.ParseIntValue(); else if(id=="detonationLocation") DetonationLocation=parser.ParseSFVec3fValue(); else if(id=="detonationRelativeLocation") DetonationRelativeLocation=parser.ParseSFVec3fValue(); else if(id=="detonationResult") DetonationResult=parser.ParseIntValue(); else if(id=="enabled") Enabled=parser.ParseBoolValue(); else if(id=="entityCategory") EntityCategory=parser.ParseIntValue(); else if(id=="entityCountry") EntityCountry=parser.ParseIntValue(); else if(id=="entityDomain") EntityDomain=parser.ParseIntValue(); else if(id=="entityExtra") EntityExtra=parser.ParseIntValue(); else if(id=="entityID") EntityID=parser.ParseIntValue(); else if(id=="entityKind") EntityKind=parser.ParseIntValue(); else if(id=="entitySpecific") EntitySpecific=parser.ParseIntValue(); else if(id=="entitySubCategory") EntitySubCategory=parser.ParseIntValue(); else if(id=="eventApplicationID") EventApplicationID=parser.ParseIntValue(); else if(id=="eventEntityID") EventEntityID=parser.ParseIntValue(); else if(id=="eventNumber") EventNumber=parser.ParseIntValue(); else if(id=="eventSiteID") EventSiteID=parser.ParseIntValue(); else if(id=="fired1") Fired1=parser.ParseBoolValue(); else if(id=="fired2") Fired2=parser.ParseBoolValue(); else if(id=="fireMissionIndex") FireMissionIndex=parser.ParseIntValue(); else if(id=="firingRange") FiringRange=parser.ParseDoubleValue(); else if(id=="firingRate") FiringRate=parser.ParseIntValue(); else if(id=="forceID") ForceID=parser.ParseIntValue(); else if(id=="fuse") Fuse=parser.ParseIntValue(); else if(id=="linearVelocity") LinearVelocity=parser.ParseSFVec3fValue(); else if(id=="linearAcceleration") LinearAcceleration=parser.ParseSFVec3fValue(); else if(id=="marking") Marking=parser.ParseStringValue(); else if(id=="multicastRelayHost") MulticastRelayHost=parser.ParseStringValue(); else if(id=="multicastRelayPort") MulticastRelayPort=parser.ParseIntValue(); else if(id=="munitionApplicationID") MunitionApplicationID=parser.ParseIntValue(); else if(id=="munitionEndPoint") MunitionEndPoint=parser.ParseSFVec3fValue(); else if(id=="munitionEntityID") MunitionEntityID=parser.ParseIntValue(); else if(id=="munitionQuantity") MunitionQuantity=parser.ParseIntValue(); else if(id=="munitionSiteID") MunitionSiteID=parser.ParseIntValue(); else if(id=="munitionStartPoint") MunitionStartPoint=parser.ParseSFVec3fValue(); else if(id=="networkMode") NetworkMode=parser.ParseStringValue(); else if(id=="port") Port=parser.ParseIntValue(); else if(id=="readInterval") ReadInterval=parser.ParseDoubleValue(); else if(id=="rotation") Rotation=parser.ParseSFRotationValue(); else if(id=="scale") Scale=parser.ParseSFVec3fValue(); else if(id=="scaleOrientation") ScaleOrientation=parser.ParseSFRotationValue(); else if(id=="siteID") SiteID=parser.ParseIntValue(); else if(id=="translation") Translation=parser.ParseSFVec3fValue(); else if(id=="warhead") Warhead=parser.ParseIntValue(); else if(id=="writeInterval") WriteInterval=parser.ParseDoubleValue(); else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue(); else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue(); else if(id=="rtpHeaderExpected") RtpHeaderExpected=parser.ParseBoolValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="appearance") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Appearance=node as X3DAppearanceNode; if(Appearance==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="createParticles") CreateParticles=parser.ParseBoolValue(); else if(id=="geometry") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Geometry=node as X3DGeometryNode; if(Geometry==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="enabled") Enabled=parser.ParseBoolValue(); else if(id=="lifetimeVariation") LifetimeVariation=parser.ParseDoubleValue(); else if(id=="maxParticles") MaxParticles=parser.ParseIntValue(); else if(id=="particleLifetime") ParticleLifetime=parser.ParseDoubleValue(); else if(id=="particleSize") ParticleSize=parser.ParseSFVec2fValue(); else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue(); else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue(); else if(id=="colorRamp") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { ColorRamp=node as X3DColorNode; if(ColorRamp==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="colorKey") ColorKey.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="emitter") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Emitter=node as X3DParticleEmitterNode; if(Emitter==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="geometryType") GeometryType=parser.ParseStringValue(); else if(id=="physics") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DParticlePhysicsModelNode ppmn=node as X3DParticlePhysicsModelNode; if(ppmn==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Physics.Add(ppmn); } } else if(id=="texCoordRamp") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TexCoordRamp=node as X3DTextureCoordinateNode; if(TexCoordRamp==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="texCoordKey") TexCoordKey.AddRange(parser.ParseSFFloatOrMFFloatValue()); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "groundAngle") { GroundAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "groundColor") { GroundColor.AddRange(parser.ParseSFColorOrMFColorValue()); } else if (id == "backTexture") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { BackTexture = node as X3DTextureNode; if (BackTexture == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "bottomTexture") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { BottomTexture = node as X3DTextureNode; if (BottomTexture == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "frontTexture") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { FrontTexture = node as X3DTextureNode; if (FrontTexture == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "leftTexture") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { LeftTexture = node as X3DTextureNode; if (LeftTexture == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "rightTexture") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { RightTexture = node as X3DTextureNode; if (RightTexture == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "topTexture") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TopTexture = node as X3DTextureNode; if (TopTexture == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "skyAngle") { SkyAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "skyColor") { if (wasSkyColor) { SkyColor.AddRange(parser.ParseSFColorOrMFColorValue()); } else { SkyColor = parser.ParseSFColorOrMFColorValue(); } wasSkyColor = true; } else if (id == "transparency") { // since X3D Node Spec and VRML Classic Coding Spec disagree on the fieldType List <double> values = parser.ParseSFFloatOrMFFloatValue(); if (values.Count != 0) { Transparency = values[0]; } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "centerOfMass") { CenterOfMass = parser.ParseSFVec3fValue(); } else if (id == "children") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode child = node as X3DChildNode; if (child == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Children.Add(child); } } } else if (id == "coord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Coord = node as X3DCoordinateNode; if (Coord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "displacers") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { IX3DHAnimDisplacerNode displacer = node as IX3DHAnimDisplacerNode; if (displacer == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Displacers.Add(displacer); } } } else if (id == "mass") { Mass = parser.ParseDoubleValue(); } else if (id == "momentsOfInertia") { if (wasMomentsOfInertia) { MomentsOfInertia.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { MomentsOfInertia = parser.ParseSFFloatOrMFFloatValue(); } wasMomentsOfInertia = true; } else if (id == "name") { Name = parser.ParseStringValue(); } else if (id == "bboxCenter") { BBoxCenter = parser.ParseSFVec3fValue(); } else if (id == "bboxSize") { BBoxSize = parser.ParseSFVec3fValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="attrib") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DVertexAttributeNode attr=node as X3DVertexAttributeNode; if(attr==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Attrib.Add(attr); } } else if(id=="color") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Color=node as X3DColorNode; if(Color==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="fogCoord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { FogCoord=node as IX3DFogCoordinateNode; if(FogCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="normal") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Normal=node as X3DNormalNode; if(Normal==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="texCoord") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TexCoord=node as X3DTextureCoordinateNode; if(TexCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="ccw") CCW=parser.ParseBoolValue(); else if(id=="colorPerVertex") ColorPerVertex=parser.ParseBoolValue(); else if(id=="creaseAngle") CreaseAngle=parser.ParseDoubleValue(); else if(id=="height") Height.AddRange(parser.ParseSFFloatOrMFFloatValue()); else if(id=="normalPerVertex") NormalPerVertex=parser.ParseBoolValue(); else if(id=="solid") Solid=parser.ParseBoolValue(); else if(id=="xDimension") XDimension=parser.ParseIntValue(); else if(id=="xSpacing") XSpacing=parser.ParseDoubleValue(); else if(id=="zDimension") ZDimension=parser.ParseIntValue(); else if(id=="zSpacing") ZSpacing=parser.ParseDoubleValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "color") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Color = node as X3DColorNode; if (Color == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "normal") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Normal = node as X3DNormalNode; if (Normal == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "texCoord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TexCoord = node as X3DTextureCoordinateNode; if (TexCoord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "yScale") { YScale = parser.ParseDoubleValue(); } else if (id == "ccw") { CCW = parser.ParseBoolValue(); } else if (id == "colorPerVertex") { ColorPerVertex = parser.ParseBoolValue(); } else if (id == "creaseAngle") { CreaseAngle = parser.ParseDoubleValue(); } else if (id == "geoGridOrigin") { GeoGridOrigin = parser.ParseSFVec3fStringValue(); } else if (id == "geoOrigin") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { GeoOrigin = node as IX3DGeoOriginNode; if (GeoOrigin == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "geoSystem") { if (wasGeoSystem) { GeoSystem.AddRange(parser.ParseSFStringOrMFStringValue()); } else { GeoSystem = parser.ParseSFStringOrMFStringValue(); } wasGeoSystem = true; } else if (id == "height") { if (wasHeight) { Height.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else { Height = parser.ParseSFFloatOrMFFloatValue(); } wasHeight = true; } else if (id == "normalPerVertex") { NormalPerVertex = parser.ParseBoolValue(); } else if (id == "solid") { Solid = parser.ParseBoolValue(); } else if (id == "xDimension") { XDimension = parser.ParseIntValue(); } else if (id == "xSpacing") { XSpacing = parser.ParseDoubleStringValue(); } else if (id == "zDimension") { ZDimension = parser.ParseIntValue(); } else if (id == "zSpacing") { ZSpacing = parser.ParseDoubleStringValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "groundAngle") { GroundAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "groundColor") { GroundColor.AddRange(parser.ParseSFColorOrMFColorValue()); } else if (id == "backUrl") { BackUrl.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "bottomUrl") { BottomUrl.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "frontUrl") { FrontUrl.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "leftUrl") { LeftUrl.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "rightUrl") { RightUrl.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "topUrl") { TopUrl.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "skyAngle") { SkyAngle.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "skyColor") { if (wasSkyColor) { SkyColor.AddRange(parser.ParseSFColorOrMFColorValue()); } else { SkyColor = parser.ParseSFColorOrMFColorValue(); } wasSkyColor = true; } else if (id == "transparency") { // since X3D Node Spec and VRML Classic Coding Spec disagree on the fieldType List <double> values = parser.ParseSFFloatOrMFFloatValue(); if (values.Count != 0) { Transparency = values[0]; } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="depth") Depth.AddRange(parser.ParseSFFloatOrMFFloatValue()); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "controlPoint") { object token = parser.PeekNextToken(); if (token is VRMLTokenIdKeywordOrFieldType) { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { ControlPoint = node as X3DCoordinateNode; if (ControlPoint == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else { x3dCoordinate coords = new x3dCoordinate(); coords.Point = parser.ParseSFVec3fOrMFVec3fValue(); ControlPoint = coords; } } else if (id == "texCoord") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TexCoord = node as IX3DNurbsSurfaceGeometryNodeTexCoord; if (TexCoord == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "uTessellation") { UTessellation = parser.ParseIntValue(); } else if (id == "vTessellation") { VTessellation = parser.ParseIntValue(); } else if (id == "weight") { Weight.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "ccw") { CCW = parser.ParseBoolValue(); } else if (id == "solid") { Solid = parser.ParseBoolValue(); } else if (id == "uClosed") { UClosed = parser.ParseBoolValue(); } else if (id == "uDimension") { UDimension = parser.ParseIntValue(); } else if (id == "uKnot") { UKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "uOrder") { UOrder = parser.ParseIntValue(); } else if (id == "vClosed") { VClosed = parser.ParseBoolValue(); } else if (id == "vDimension") { VDimension = parser.ParseIntValue(); } else if (id == "vKnot") { VKnot.AddRange(parser.ParseSFFloatOrMFFloatValue()); } else if (id == "vOrder") { VOrder = parser.ParseIntValue(); } else { return(false); } return(true); }