Ejemplo n.º 1
0
 internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
 {
     if (id == "beginCap")
     {
         BeginCap = parser.ParseBoolValue();
     }
     else if (id == "ccw")
     {
         CCW = parser.ParseBoolValue();
     }
     else if (id == "convex")
     {
         Convex = parser.ParseBoolValue();
     }
     else if (id == "creaseAngle")
     {
         CreaseAngle = parser.ParseDoubleValue();
     }
     else if (id == "crossSection")
     {
         if (wasCrossSection)
         {
             CrossSection.AddRange(parser.ParseSFVec2fOrMFVec2fValue());
         }
         else
         {
             CrossSection = parser.ParseSFVec2fOrMFVec2fValue();
         }
         wasCrossSection = true;
     }
     else if (id == "endCap")
     {
         EndCap = parser.ParseBoolValue();
     }
     else if (id == "orientation")
     {
         if (wasOrientation)
         {
             Orientation.AddRange(parser.ParseSFRotationOrMFRotationValue());
         }
         else
         {
             Orientation = parser.ParseSFRotationOrMFRotationValue();
         }
         wasOrientation = true;
     }
     else if (id == "scale")
     {
         if (wasScale)
         {
             Scale.AddRange(parser.ParseSFVec2fOrMFVec2fValue());
         }
         else
         {
             Scale = parser.ParseSFVec2fOrMFVec2fValue();
         }
         wasScale = true;
     }
     else if (id == "solid")
     {
         Solid = parser.ParseBoolValue();
     }
     else if (id == "spine")
     {
         if (wasSpine)
         {
             Spine.AddRange(parser.ParseSFVec3fOrMFVec3fValue());
         }
         else
         {
             Spine = parser.ParseSFVec3fOrMFVec3fValue();
         }
         wasSpine = true;
     }
     else
     {
         return(false);
     }
     return(true);
 }