Example #1
0
        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);
        }