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" || 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) { int line=parser.Line; if(id=="image") { try { Image.Clear(); Image.Add(parser.ParseIntValue()); // Number of Components Image.Add(parser.ParseIntValue()); // Width Image.Add(parser.ParseIntValue()); // Height Image.Add(parser.ParseIntValue()); // Depth } catch(UserCancellationException) { throw; } catch(Exception ex) { parser.ErrorParsingNode(VRMLReaderError.SFImageInvalid, ex, this, id, null, line); } if(Image[1]<0||Image[2]<0||Image[3]<0||Image[0]<0||Image[0]>4) parser.ErrorParsingNode(VRMLReaderError.SFImageInvalid, this, id, null, line); if(!(Image[0]==0||Image[1]==0||Image[2]==0||Image[3]==0)) { int count=Image[1]*Image[2]*Image[3]; try { for(int i=0; i<count; i++) Image.Add(parser.ParseIntValue()); } catch(UserCancellationException) { throw; } catch(Exception ex) { parser.ErrorParsingNode(VRMLReaderError.SFImageInvalid, ex, this, id, null, parser.Line); } } } else if(id=="repeatS") RepeatS=parser.ParseBoolValue(); else if(id=="repeatR") RepeatR=parser.ParseBoolValue(); else if(id=="repeatT") RepeatT=parser.ParseBoolValue(); else if(id=="textureProperties") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TextureProperties=node as IX3DTexturePropertiesNode; if(TextureProperties==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "anisotropicDegree") { AnisotropicDegree = parser.ParseDoubleValue(); } else if (id == "borderColor") { BorderColor = parser.ParseSFColorRGBAValue(); } else if (id == "borderWidth") { BorderWidth = parser.ParseIntValue(); } else if (id == "boundaryModeS") { BoundaryModeS = parser.ParseStringValue(); } else if (id == "boundaryModeT") { BoundaryModeT = parser.ParseStringValue(); } else if (id == "boundaryModeR") { BoundaryModeR = parser.ParseStringValue(); } else if (id == "magnificationFilter") { MagnificationFilter = parser.ParseStringValue(); } else if (id == "minificationFilter") { MinificationFilter = parser.ParseStringValue(); } else if (id == "textureCompression") { TextureCompression = parser.ParseStringValue(); } else if (id == "texturePriority") { TexturePriority = parser.ParseIntValue(); } else if (id == "generateMipMaps") { GenerateMipMaps = parser.ParseBoolValue(); } 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) { 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 == "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) { int line = parser.Line; if (id == "update") { Update = parser.ParseStringValue(); } else if (id == "size") { Size = parser.ParseIntValue(); } else if (id == "textureProperties") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TextureProperties = node as IX3DTexturePropertiesNode; if (TextureProperties == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "tau") { Tau = parser.ParseDoubleValue(); } else if (id == "tolerance") { Tolerance = parser.ParseDoubleValue(); } else if (id == "initialDestination") { InitialDestination = parser.ParseSFVec2fValue(); } else if (id == "initialValue") { InitialValue = parser.ParseSFVec2fValue(); } else if (id == "order") { Order = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="anisotropicDegree") AnisotropicDegree=parser.ParseDoubleValue(); else if(id=="borderColor") BorderColor=parser.ParseSFColorRGBAValue(); else if(id=="borderWidth") BorderWidth=parser.ParseIntValue(); else if(id=="boundaryModeS") BoundaryModeS=parser.ParseStringValue(); else if(id=="boundaryModeT") BoundaryModeT=parser.ParseStringValue(); else if(id=="boundaryModeR") BoundaryModeR=parser.ParseStringValue(); else if(id=="magnificationFilter") MagnificationFilter=parser.ParseStringValue(); else if(id=="minificationFilter") MinificationFilter=parser.ParseStringValue(); else if(id=="textureCompression") TextureCompression=parser.ParseStringValue(); else if(id=="texturePriority") TexturePriority=parser.ParseIntValue(); else if(id=="generateMipMaps") GenerateMipMaps=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=="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=="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) { if(id=="filled") Filled=parser.ParseBoolValue(); else if(id=="hatchColor") HatchColor=parser.ParseSFColorValue(); else if(id=="hatched") Hatched=parser.ParseBoolValue(); else if(id=="hatchStyle") HatchStyle=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 == "mapping") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { IX3DDISEntityTypeMappingNode disetm = node as IX3DDISEntityTypeMappingNode; if (disetm == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Mapping.Add(disetm); } } } else if (id == "port") { Port = parser.ParseIntValue(); } else if (id == "siteID") { SiteID = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "integerKey") { IntegerKey = 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=="mapping") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { IX3DDISEntityTypeMappingNode disetm=node as IX3DDISEntityTypeMappingNode; if(disetm==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Mapping.Add(disetm); } } else if(id=="port") Port=parser.ParseIntValue(); else if(id=="siteID") SiteID=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=="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 == "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=="url") URL.AddRange(parser.ParseSFStringOrMFStringValue()); else if(id=="category") Category=parser.ParseIntValue(); else if(id=="country") Country=parser.ParseIntValue(); else if(id=="domain") Domain=parser.ParseIntValue(); else if(id=="extra") Extra=parser.ParseIntValue(); else if(id=="kind") Kind=parser.ParseIntValue(); else if(id=="specific") Specific=parser.ParseIntValue(); else if(id=="subcategory") Subcategory=parser.ParseIntValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="axis1Angle") Axis1Angle=parser.ParseDoubleValue(); else if(id=="axis1Torque") Axis1Torque=parser.ParseDoubleValue(); else if(id=="axis2Angle") Axis2Angle=parser.ParseDoubleValue(); else if(id=="axis2Torque") Axis2Torque=parser.ParseDoubleValue(); else if(id=="axis3Angle") Axis3Angle=parser.ParseDoubleValue(); else if(id=="axis3Torque") Axis3Torque=parser.ParseDoubleValue(); else if(id=="body1") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Body1=node as IX3DRigidBodyNode; if(Body1==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="body2") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Body2=node as IX3DRigidBodyNode; if(Body2==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else if(id=="enabledAxes") EnabledAxes=parser.ParseIntValue(); else if(id=="forceOutput") { if(wasForceOutput) ForceOutput.AddRange(parser.ParseSFStringOrMFStringValue()); else ForceOutput=parser.ParseSFStringOrMFStringValue(); wasForceOutput=true; } else if(id=="motor1Axis") Motor1Axis=parser.ParseSFVec3fValue(); else if(id=="motor2Axis") Motor2Axis=parser.ParseSFVec3fValue(); else if(id=="motor3Axis") Motor3Axis=parser.ParseSFVec3fValue(); else if(id=="stop1Bounce") Stop1Bounce=parser.ParseDoubleValue(); else if(id=="stop1ErrorCorrection") Stop1ErrorCorrection=parser.ParseDoubleValue(); else if(id=="stop2Bounce") Stop2Bounce=parser.ParseDoubleValue(); else if(id=="stop2ErrorCorrection") Stop2ErrorCorrection=parser.ParseDoubleValue(); else if(id=="stop3Bounce") Stop3Bounce=parser.ParseDoubleValue(); else if(id=="stop3ErrorCorrection") Stop3ErrorCorrection=parser.ParseDoubleValue(); else if(id=="autoCalc") AutoCalc=parser.ParseBoolValue(); else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="autoDisable") AutoDisable=parser.ParseBoolValue(); else if(id=="bodies") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { IX3DRigidBodyNode rb=node as IX3DRigidBodyNode; if(rb==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Bodies.Add(rb); } } else if(id=="constantForceMix") ConstantForceMix=parser.ParseDoubleValue(); else if(id=="contactSurfaceThickness") ContactSurfaceThickness=parser.ParseDoubleValue(); else if(id=="disableAngularSpeed") DisableAngularSpeed=parser.ParseDoubleValue(); else if(id=="disableLinearSpeed") DisableLinearSpeed=parser.ParseDoubleValue(); else if(id=="disableTime") DisableTime=parser.ParseDoubleValue(); else if(id=="enabled") Enabled=parser.ParseBoolValue(); else if(id=="errorCorrection") ErrorCorrection=parser.ParseDoubleValue(); else if(id=="gravity") Gravity=parser.ParseSFVec3fValue(); else if(id=="iterations") Iterations=parser.ParseIntValue(); else if(id=="joints") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DRigidJointNode rj=node as X3DRigidJointNode; if(rj==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Joints.Add(rj); } } else if(id=="maxCorrectionSpeed") MaxCorrectionSpeed=parser.ParseDoubleValue(); else if(id=="preferAccuracy") PreferAccuracy=parser.ParseBoolValue(); else if(id=="collider") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { Collider=node as IX3DCollisionCollectionNode; if(Collider==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="update") Update=parser.ParseStringValue(); else if(id=="size") Size=parser.ParseIntValue(); else if(id=="textureProperties") { X3DNode node=parser.ParseSFNodeValue(); if(node!=null) { TextureProperties=node as IX3DTexturePropertiesNode; if(TextureProperties==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } else return false; return true; }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "tau") { Tau = parser.ParseDoubleValue(); } else if (id == "tolerance") { Tolerance = parser.ParseDoubleValue(); } else if (id == "order") { Order = parser.ParseIntValue(); } else if (id == "initialDestination") { if (wasInitialDestination) { InitialDestination.Values.AddRange(parser.ParseSFVec3fOrMFVec3fValue()); } else { InitialDestination = parser.ParseMFVec3fValue(); } wasInitialDestination = true; } else if (id == "initialValue") { if (wasInitialValue) { InitialValue.Values.AddRange(parser.ParseSFVec3fOrMFVec3fValue()); } else { InitialValue = parser.ParseMFVec3fValue(); } wasInitialValue = true; } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "activeLayer") { ActiveLayer = parser.ParseIntValue(); } else if (id == "layers") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DLayerNode ln = node as X3DLayerNode; if (ln == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Layers.Add(ln); } } } else if (id == "order") { if (wasOrder) { Order.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else { Order = parser.ParseSFInt32OrMFInt32Value(); } wasOrder = true; } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line=parser.Line; if(id=="choice"||id=="children") { List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue(); foreach(X3DNode node in nodes) { X3DChildNode choice=node as X3DChildNode; if(choice==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); else Choice.Add(choice); } } else if(id=="whichChoice") WhichChoice=parser.ParseIntValue(); 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 == "applied") { Applied = parser.ParseBoolValue(); } else if (id == "linetype") { Linetype = parser.ParseIntValue(); } else if (id == "linewidthScaleFactor") { LinewidthScaleFactor = parser.ParseDoubleValue(); } 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 == "choice" || id == "children") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DChildNode choice = node as X3DChildNode; if (choice == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Choice.Add(choice); } } } else if (id == "whichChoice") { WhichChoice = parser.ParseIntValue(); } 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 == "url") { URL.AddRange(parser.ParseSFStringOrMFStringValue()); } else if (id == "category") { Category = parser.ParseIntValue(); } else if (id == "country") { Country = parser.ParseIntValue(); } else if (id == "domain") { Domain = parser.ParseIntValue(); } else if (id == "extra") { Extra = parser.ParseIntValue(); } else if (id == "kind") { Kind = parser.ParseIntValue(); } else if (id == "specific") { Specific = parser.ParseIntValue(); } else if (id == "subcategory") { Subcategory = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if (id == "filled") { Filled = parser.ParseBoolValue(); } else if (id == "hatchColor") { HatchColor = parser.ParseSFColorValue(); } else if (id == "hatched") { Hatched = parser.ParseBoolValue(); } else if (id == "hatchStyle") { HatchStyle = parser.ParseIntValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "image") { try { Image.Clear(); Image.Add(parser.ParseIntValue()); // Number of Components Image.Add(parser.ParseIntValue()); // Width Image.Add(parser.ParseIntValue()); // Height Image.Add(parser.ParseIntValue()); // Depth } catch (UserCancellationException) { throw; } catch (Exception ex) { parser.ErrorParsingNode(VRMLReaderError.SFImageInvalid, ex, this, id, null, line); } if (Image[1] < 0 || Image[2] < 0 || Image[3] < 0 || Image[0] < 0 || Image[0] > 4) { parser.ErrorParsingNode(VRMLReaderError.SFImageInvalid, this, id, null, line); } if (!(Image[0] == 0 || Image[1] == 0 || Image[2] == 0 || Image[3] == 0)) { int count = Image[1] * Image[2] * Image[3]; try { for (int i = 0; i < count; i++) { Image.Add(parser.ParseIntValue()); } } catch (UserCancellationException) { throw; } catch (Exception ex) { parser.ErrorParsingNode(VRMLReaderError.SFImageInvalid, ex, this, id, null, parser.Line); } } } else if (id == "repeatS") { RepeatS = parser.ParseBoolValue(); } else if (id == "repeatR") { RepeatR = parser.ParseBoolValue(); } else if (id == "repeatT") { RepeatT = parser.ParseBoolValue(); } else if (id == "textureProperties") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { TextureProperties = node as IX3DTexturePropertiesNode; if (TextureProperties == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { int line = parser.Line; if (id == "autoDisable") { AutoDisable = parser.ParseBoolValue(); } else if (id == "bodies") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { IX3DRigidBodyNode rb = node as IX3DRigidBodyNode; if (rb == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Bodies.Add(rb); } } } else if (id == "constantForceMix") { ConstantForceMix = parser.ParseDoubleValue(); } else if (id == "contactSurfaceThickness") { ContactSurfaceThickness = parser.ParseDoubleValue(); } else if (id == "disableAngularSpeed") { DisableAngularSpeed = parser.ParseDoubleValue(); } else if (id == "disableLinearSpeed") { DisableLinearSpeed = parser.ParseDoubleValue(); } else if (id == "disableTime") { DisableTime = parser.ParseDoubleValue(); } else if (id == "enabled") { Enabled = parser.ParseBoolValue(); } else if (id == "errorCorrection") { ErrorCorrection = parser.ParseDoubleValue(); } else if (id == "gravity") { Gravity = parser.ParseSFVec3fValue(); } else if (id == "iterations") { Iterations = parser.ParseIntValue(); } else if (id == "joints") { List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue(); foreach (X3DNode node in nodes) { X3DRigidJointNode rj = node as X3DRigidJointNode; if (rj == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } else { Joints.Add(rj); } } } else if (id == "maxCorrectionSpeed") { MaxCorrectionSpeed = parser.ParseDoubleValue(); } else if (id == "preferAccuracy") { PreferAccuracy = parser.ParseBoolValue(); } else if (id == "collider") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Collider = node as IX3DCollisionCollectionNode; if (Collider == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="address") Address=parser.ParseStringValue(); else if(id=="antennaLocation") AntennaLocation=parser.ParseSFVec3fValue(); else if(id=="antennaPatternLength") AntennaPatternLength=parser.ParseIntValue(); else if(id=="antennaPatternType") AntennaPatternType=parser.ParseIntValue(); else if(id=="applicationID") ApplicationID=parser.ParseIntValue(); else if(id=="cryptoKeyID") CryptoKeyID=parser.ParseIntValue(); else if(id=="cryptoSystem") CryptoSystem=parser.ParseIntValue(); else if(id=="enabled") Enabled=parser.ParseBoolValue(); else if(id=="entityID") EntityID=parser.ParseIntValue(); else if(id=="frequency") Frequency=parser.ParseIntValue(); else if(id=="inputSource") InputSource=parser.ParseIntValue(); else if(id=="lengthOfModulationParameters") LengthOfModulationParameters=parser.ParseIntValue(); else if(id=="modulationTypeDetail") ModulationTypeDetail=parser.ParseIntValue(); else if(id=="modulationTypeMajor") ModulationTypeMajor=parser.ParseIntValue(); else if(id=="modulationTypeSpreadSpectrum") ModulationTypeSpreadSpectrum=parser.ParseIntValue(); else if(id=="modulationTypeSystem") ModulationTypeSystem=parser.ParseIntValue(); else if(id=="multicastRelayHost") MulticastRelayHost=parser.ParseStringValue(); else if(id=="multicastRelayPort") MulticastRelayPort=parser.ParseIntValue(); else if(id=="networkMode") NetworkMode=parser.ParseStringValue(); else if(id=="port") Port=parser.ParseIntValue(); else if(id=="power") Power=parser.ParseDoubleValue(); else if(id=="radioEntityTypeCategory") RadioEntityTypeCategory=parser.ParseIntValue(); else if(id=="radioEntityTypeCountry") RadioEntityTypeCountry=parser.ParseIntValue(); else if(id=="radioEntityTypeDomain") RadioEntityTypeDomain=parser.ParseIntValue(); else if(id=="radioEntityTypeKind") RadioEntityTypeKind=parser.ParseIntValue(); else if(id=="radioEntityTypeNomenclature") RadioEntityTypeNomenclature=parser.ParseIntValue(); else if(id=="radioEntityTypeNomenclatureVersion") RadioEntityTypeNomenclatureVersion=parser.ParseIntValue(); else if(id=="radioID") RadioID=parser.ParseIntValue(); else if(id=="readInterval") ReadInterval=parser.ParseDoubleValue(); else if(id=="relativeAntennaLocation") RelativeAntennaLocation=parser.ParseSFVec3fValue(); else if(id=="rtpHeaderExpected") RtpHeaderExpected=parser.ParseBoolValue(); else if(id=="siteID") SiteID=parser.ParseIntValue(); else if(id=="transmitFrequencyBandwidth") TransmitFrequencyBandwidth=parser.ParseDoubleValue(); else if(id=="transmitState") TransmitState=parser.ParseIntValue(); else if(id=="whichGeometry") WhichGeometry=parser.ParseIntValue(); else if(id=="writeInterval") WriteInterval=parser.ParseDoubleValue(); 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") { 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); }
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) { if (id == "address") { Address = parser.ParseStringValue(); } else if (id == "applicationID") { ApplicationID = parser.ParseIntValue(); } else if (id == "data") { Data.AddRange(parser.ParseSFInt32OrMFInt32Value()); } else if (id == "dataLength") { DataLength = parser.ParseIntValue(); } else if (id == "enabled") { Enabled = parser.ParseBoolValue(); } else if (id == "encodingScheme") { EncodingScheme = parser.ParseIntValue(); } else if (id == "entityID") { EntityID = parser.ParseIntValue(); } else if (id == "multicastRelayHost") { MulticastRelayHost = parser.ParseStringValue(); } else if (id == "multicastRelayPort") { MulticastRelayPort = parser.ParseIntValue(); } else if (id == "networkMode") { NetworkMode = parser.ParseStringValue(); } else if (id == "port") { Port = parser.ParseIntValue(); } else if (id == "radioID") { RadioID = parser.ParseIntValue(); } else if (id == "readInterval") { ReadInterval = parser.ParseDoubleValue(); } else if (id == "rtpHeaderExpected") { RtpHeaderExpected = parser.ParseBoolValue(); } else if (id == "sampleRate") { SampleRate = parser.ParseIntValue(); } else if (id == "samples") { Samples = parser.ParseIntValue(); } else if (id == "siteID") { SiteID = parser.ParseIntValue(); } else if (id == "tdlType") { TdlType = parser.ParseIntValue(); } else if (id == "whichGeometry") { WhichGeometry = parser.ParseIntValue(); } else if (id == "writeInterval") { WriteInterval = parser.ParseDoubleValue(); } 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=="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 == "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) { if (id == "address") { Address = parser.ParseStringValue(); } else if (id == "antennaLocation") { AntennaLocation = parser.ParseSFVec3fValue(); } else if (id == "antennaPatternLength") { AntennaPatternLength = parser.ParseIntValue(); } else if (id == "antennaPatternType") { AntennaPatternType = parser.ParseIntValue(); } else if (id == "applicationID") { ApplicationID = parser.ParseIntValue(); } else if (id == "cryptoKeyID") { CryptoKeyID = parser.ParseIntValue(); } else if (id == "cryptoSystem") { CryptoSystem = parser.ParseIntValue(); } else if (id == "enabled") { Enabled = parser.ParseBoolValue(); } else if (id == "entityID") { EntityID = parser.ParseIntValue(); } else if (id == "frequency") { Frequency = parser.ParseIntValue(); } else if (id == "inputSource") { InputSource = parser.ParseIntValue(); } else if (id == "lengthOfModulationParameters") { LengthOfModulationParameters = parser.ParseIntValue(); } else if (id == "modulationTypeDetail") { ModulationTypeDetail = parser.ParseIntValue(); } else if (id == "modulationTypeMajor") { ModulationTypeMajor = parser.ParseIntValue(); } else if (id == "modulationTypeSpreadSpectrum") { ModulationTypeSpreadSpectrum = parser.ParseIntValue(); } else if (id == "modulationTypeSystem") { ModulationTypeSystem = parser.ParseIntValue(); } else if (id == "multicastRelayHost") { MulticastRelayHost = parser.ParseStringValue(); } else if (id == "multicastRelayPort") { MulticastRelayPort = parser.ParseIntValue(); } else if (id == "networkMode") { NetworkMode = parser.ParseStringValue(); } else if (id == "port") { Port = parser.ParseIntValue(); } else if (id == "power") { Power = parser.ParseDoubleValue(); } else if (id == "radioEntityTypeCategory") { RadioEntityTypeCategory = parser.ParseIntValue(); } else if (id == "radioEntityTypeCountry") { RadioEntityTypeCountry = parser.ParseIntValue(); } else if (id == "radioEntityTypeDomain") { RadioEntityTypeDomain = parser.ParseIntValue(); } else if (id == "radioEntityTypeKind") { RadioEntityTypeKind = parser.ParseIntValue(); } else if (id == "radioEntityTypeNomenclature") { RadioEntityTypeNomenclature = parser.ParseIntValue(); } else if (id == "radioEntityTypeNomenclatureVersion") { RadioEntityTypeNomenclatureVersion = parser.ParseIntValue(); } else if (id == "radioID") { RadioID = parser.ParseIntValue(); } else if (id == "readInterval") { ReadInterval = parser.ParseDoubleValue(); } else if (id == "relativeAntennaLocation") { RelativeAntennaLocation = parser.ParseSFVec3fValue(); } else if (id == "rtpHeaderExpected") { RtpHeaderExpected = parser.ParseBoolValue(); } else if (id == "siteID") { SiteID = parser.ParseIntValue(); } else if (id == "transmitFrequencyBandwidth") { TransmitFrequencyBandwidth = parser.ParseDoubleValue(); } else if (id == "transmitState") { TransmitState = parser.ParseIntValue(); } else if (id == "whichGeometry") { WhichGeometry = parser.ParseIntValue(); } else if (id == "writeInterval") { WriteInterval = parser.ParseDoubleValue(); } 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=="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) { if(id=="address") Address=parser.ParseStringValue(); else if(id=="applicationID") ApplicationID=parser.ParseIntValue(); else if(id=="data") Data.AddRange(parser.ParseSFInt32OrMFInt32Value()); else if(id=="dataLength") DataLength=parser.ParseIntValue(); else if(id=="enabled") Enabled=parser.ParseBoolValue(); else if(id=="encodingScheme") EncodingScheme=parser.ParseIntValue(); else if(id=="entityID") EntityID=parser.ParseIntValue(); else if(id=="multicastRelayHost") MulticastRelayHost=parser.ParseStringValue(); else if(id=="multicastRelayPort") MulticastRelayPort=parser.ParseIntValue(); else if(id=="networkMode") NetworkMode=parser.ParseStringValue(); else if(id=="port") Port=parser.ParseIntValue(); else if(id=="radioID") RadioID=parser.ParseIntValue(); else if(id=="readInterval") ReadInterval=parser.ParseDoubleValue(); else if(id=="rtpHeaderExpected") RtpHeaderExpected=parser.ParseBoolValue(); else if(id=="sampleRate") SampleRate=parser.ParseIntValue(); else if(id=="samples") Samples=parser.ParseIntValue(); else if(id=="siteID") SiteID=parser.ParseIntValue(); else if(id=="tdlType") TdlType=parser.ParseIntValue(); else if(id=="whichGeometry") WhichGeometry=parser.ParseIntValue(); else if(id=="writeInterval") WriteInterval=parser.ParseDoubleValue(); 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 == "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 == "axis1Angle") { Axis1Angle = parser.ParseDoubleValue(); } else if (id == "axis1Torque") { Axis1Torque = parser.ParseDoubleValue(); } else if (id == "axis2Angle") { Axis2Angle = parser.ParseDoubleValue(); } else if (id == "axis2Torque") { Axis2Torque = parser.ParseDoubleValue(); } else if (id == "axis3Angle") { Axis3Angle = parser.ParseDoubleValue(); } else if (id == "axis3Torque") { Axis3Torque = parser.ParseDoubleValue(); } else if (id == "body1") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Body1 = node as IX3DRigidBodyNode; if (Body1 == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "body2") { X3DNode node = parser.ParseSFNodeValue(); if (node != null) { Body2 = node as IX3DRigidBodyNode; if (Body2 == null) { parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line); } } } else if (id == "enabledAxes") { EnabledAxes = parser.ParseIntValue(); } else if (id == "forceOutput") { if (wasForceOutput) { ForceOutput.AddRange(parser.ParseSFStringOrMFStringValue()); } else { ForceOutput = parser.ParseSFStringOrMFStringValue(); } wasForceOutput = true; } else if (id == "motor1Axis") { Motor1Axis = parser.ParseSFVec3fValue(); } else if (id == "motor2Axis") { Motor2Axis = parser.ParseSFVec3fValue(); } else if (id == "motor3Axis") { Motor3Axis = parser.ParseSFVec3fValue(); } else if (id == "stop1Bounce") { Stop1Bounce = parser.ParseDoubleValue(); } else if (id == "stop1ErrorCorrection") { Stop1ErrorCorrection = parser.ParseDoubleValue(); } else if (id == "stop2Bounce") { Stop2Bounce = parser.ParseDoubleValue(); } else if (id == "stop2ErrorCorrection") { Stop2ErrorCorrection = parser.ParseDoubleValue(); } else if (id == "stop3Bounce") { Stop3Bounce = parser.ParseDoubleValue(); } else if (id == "stop3ErrorCorrection") { Stop3ErrorCorrection = parser.ParseDoubleValue(); } else if (id == "autoCalc") { AutoCalc = parser.ParseBoolValue(); } else { return(false); } return(true); }
internal override bool ParseNodeBodyElement(string id, VRMLParser parser) { if(id=="integerKey") IntegerKey=parser.ParseIntValue(); 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=="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=="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 == "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 == "address") { Address = parser.ParseStringValue(); } else if (id == "applicationID") { ApplicationID = parser.ParseIntValue(); } else if (id == "enabled") { Enabled = parser.ParseBoolValue(); } else if (id == "entityID") { EntityID = parser.ParseIntValue(); } else if (id == "multicastRelayHost") { MulticastRelayHost = parser.ParseStringValue(); } else if (id == "multicastRelayPort") { MulticastRelayPort = parser.ParseIntValue(); } else if (id == "networkMode") { NetworkMode = parser.ParseStringValue(); } else if (id == "port") { Port = parser.ParseIntValue(); } else if (id == "radioID") { RadioID = parser.ParseIntValue(); } else if (id == "readInterval") { ReadInterval = parser.ParseDoubleValue(); } else if (id == "receivedPower") { ReceivedPower = parser.ParseDoubleValue(); } else if (id == "receiverState") { ReceiverState = parser.ParseIntValue(); } else if (id == "rtpHeaderExpected") { RtpHeaderExpected = parser.ParseBoolValue(); } else if (id == "siteID") { SiteID = parser.ParseIntValue(); } else if (id == "transmitterApplicationID") { TransmitterApplicationID = parser.ParseIntValue(); } else if (id == "transmitterEntityID") { TransmitterEntityID = parser.ParseIntValue(); } else if (id == "transmitterRadioID") { TransmitterRadioID = parser.ParseIntValue(); } else if (id == "transmitterSiteID") { TransmitterSiteID = parser.ParseIntValue(); } else if (id == "whichGeometry") { WhichGeometry = parser.ParseIntValue(); } else if (id == "writeInterval") { WriteInterval = parser.ParseDoubleValue(); } 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 == "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=="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; }