Example #1
0
        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);
        }
Example #2
0
        internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
        {
            int line = parser.Line;

            if (id == "url")
            {
                URL.AddRange(parser.ParseSFStringOrMFStringValue());
            }
            else if (id == "repeatS")
            {
                RepeatS = 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=="url") URL=parser.ParseSFStringOrMFStringValue();
			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=="image") Image=parser.ParseSFInt32OrMFInt32Value();
			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;
		}