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.ParseSFRotationValue();
     }
     else if (id == "initialValue")
     {
         InitialValue = parser.ParseSFRotationValue();
     }
     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=="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=="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=="translation") Translation=parser.ParseSFVec3fValue();
			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 == "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 == "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 == "translation")
            {
                Translation = parser.ParseSFVec3fValue();
            }
            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=="center") Center=parser.ParseSFVec3fValue();
			else if(id=="rotation") Rotation=parser.ParseSFRotationValue();
			else if(id=="scale") Scale=parser.ParseSFVec3fValue();
			else if(id=="translation") Translation=parser.ParseSFVec3fValue();
			else return false;
			return true;
		}
		internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
		{
			if(id=="autoOffset") AutoOffset=parser.ParseBoolValue();
			else if(id=="description") Description=parser.ParseStringValue();
			else if(id=="enabled") Enabled=parser.ParseBoolValue();
			else if(id=="offset") Offset=parser.ParseSFRotationValue();
			else return false;
			return true;
		}
 internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
 {
     if (id == "duration")
     {
         Duration = parser.ParseDoubleValue();
     }
     else if (id == "initialDestination")
     {
         InitialDestination = parser.ParseSFRotationValue();
     }
     else if (id == "initialValue")
     {
         InitialValue = parser.ParseSFRotationValue();
     }
     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") FieldOfView=parser.ParseDoubleValue();
			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=="geoCenter") GeoCenter=parser.ParseSFVec3fValue();
			else if(id=="rotation") Rotation=parser.ParseSFRotationValue();
			else if(id=="scale") Scale=parser.ParseSFVec3fValue();
			else if(id=="scaleOrientation") ScaleOrientation=parser.ParseSFRotationValue();
			else if(id=="translation") Translation=parser.ParseSFVec3fValue();
			else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			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;
		}
Beispiel #9
0
 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 == "enabled")
            {
                Enabled = parser.ParseBoolValue();
            }
            else if (id == "rotation")
            {
                Rotation = parser.ParseSFRotationValue();
            }
            else if (id == "translation")
            {
                Translation = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxCenter")
            {
                BBoxCenter = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxSize")
            {
                BBoxSize = parser.ParseSFVec3fValue();
            }
            else if (id == "collidable")
            {
                X3DNode node = parser.ParseSFNodeValue();
                if (node != null)
                {
                    Collidable = node as X3DNBodyCollidableNode;
                    if (Collidable == 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=="enabled") Enabled=parser.ParseBoolValue();
			else if(id=="rotation") Rotation=parser.ParseSFRotationValue();
			else if(id=="translation") Translation=parser.ParseSFVec3fValue();
			else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			else if(id=="shape")
			{
				X3DNode node=parser.ParseSFNodeValue();
				if(node!=null)
				{
					Shape=node as X3DShapeNode;
					if(Shape==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
				}
			}
			else return false;
			return true;
		}
 internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
 {
     if (id == "autoOffset")
     {
         AutoOffset = parser.ParseBoolValue();
     }
     else if (id == "axisRotation")
     {
         AxisRotation = parser.ParseSFRotationValue();
     }
     else if (id == "description")
     {
         Description = parser.ParseStringValue();
     }
     else if (id == "diskAngle")
     {
         DiskAngle = parser.ParseDoubleValue();
     }
     else if (id == "enabled")
     {
         Enabled = parser.ParseBoolValue();
     }
     else if (id == "maxAngle")
     {
         MaxAngle = parser.ParseDoubleValue();
     }
     else if (id == "minAngle")
     {
         MinAngle = parser.ParseDoubleValue();
     }
     else if (id == "offset")
     {
         Offset = parser.ParseDoubleValue();
     }
     else
     {
         return(false);
     }
     return(true);
 }
Beispiel #13
0
 internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
 {
     if (id == "center")
     {
         Center = parser.ParseSFVec3fValue();
     }
     else if (id == "rotation")
     {
         Rotation = parser.ParseSFRotationValue();
     }
     else if (id == "scale")
     {
         Scale = parser.ParseSFVec3fValue();
     }
     else if (id == "translation")
     {
         Translation = 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;
		}
Beispiel #15
0
        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 == "geoCenter")
            {
                GeoCenter = parser.ParseSFVec3fValue();
            }
            else if (id == "rotation")
            {
                Rotation = parser.ParseSFRotationValue();
            }
            else if (id == "scale")
            {
                Scale = parser.ParseSFVec3fValue();
            }
            else if (id == "scaleOrientation")
            {
                ScaleOrientation = parser.ParseSFRotationValue();
            }
            else if (id == "translation")
            {
                Translation = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxCenter")
            {
                BBoxCenter = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxSize")
            {
                BBoxSize = parser.ParseSFVec3fValue();
            }
            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)
        {
            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=="center") Center=parser.ParseSFVec3fValue();
			else if(id=="info") Info.AddRange(parser.ParseSFStringOrMFStringValue());
			else if(id=="joints")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					IX3DHAnimJointNode joint=node as IX3DHAnimJointNode;
					if(joint==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Joints.Add(joint);
				}
			}
			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=="segments")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					IX3DHAnimeSegmentNode segment=node as IX3DHAnimeSegmentNode;
					if(segment==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Segments.Add(segment);
				}
			}
			else if(id=="sites")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					IX3DHAnimSiteNode site=node as IX3DHAnimSiteNode;
					if(site==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Sites.Add(site);
				}
			}
			else if(id=="skeleton")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					IX3DHAnimHumanoidSkeleton skeleton=node as IX3DHAnimHumanoidSkeleton;
					if(skeleton==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Skeleton.Add(skeleton);
				}
			}
			else if(id=="skin")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					X3DChildNode skin=node as X3DChildNode;
					if(skin==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Skin.Add(skin);
				}
			}
			else if(id=="skinCoord")
			{
				X3DNode node=parser.ParseSFNodeValue();
				if(node!=null)
				{
					SkinCoord=node as X3DCoordinateNode;
					if(SkinCoord==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
				}
			}
			else if(id=="skinNormal")
			{
				X3DNode node=parser.ParseSFNodeValue();
				if(node!=null)
				{
					SkinNormal=node as X3DNormalNode;
					if(SkinNormal==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
				}
			}
			else if(id=="translation") Translation=parser.ParseSFVec3fValue();
			else if(id=="version") Version=parser.ParseStringValue();
			else if(id=="viewpoints")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					X3DViewpointNode vp=node as X3DViewpointNode; // x3d-Spec specs. x3dHAnimSite change to interface if neccessary
					if(vp==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Viewpoints.Add(vp);
				}
			}
			else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			else return false;
			return true;
		}
Beispiel #18
0
        internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
        {
            int line = parser.Line;

            if (id == "center")
            {
                Center = parser.ParseSFVec3fValue();
            }
            else if (id == "info")
            {
                Info.AddRange(parser.ParseSFStringOrMFStringValue());
            }
            else if (id == "joints")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    IX3DHAnimJointNode joint = node as IX3DHAnimJointNode;
                    if (joint == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Joints.Add(joint);
                    }
                }
            }
            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 == "segments")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    IX3DHAnimeSegmentNode segment = node as IX3DHAnimeSegmentNode;
                    if (segment == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Segments.Add(segment);
                    }
                }
            }
            else if (id == "sites")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    IX3DHAnimSiteNode site = node as IX3DHAnimSiteNode;
                    if (site == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Sites.Add(site);
                    }
                }
            }
            else if (id == "skeleton")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    IX3DHAnimHumanoidSkeleton skeleton = node as IX3DHAnimHumanoidSkeleton;
                    if (skeleton == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Skeleton.Add(skeleton);
                    }
                }
            }
            else if (id == "skin")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    X3DChildNode skin = node as X3DChildNode;
                    if (skin == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Skin.Add(skin);
                    }
                }
            }
            else if (id == "skinCoord")
            {
                X3DNode node = parser.ParseSFNodeValue();
                if (node != null)
                {
                    SkinCoord = node as X3DCoordinateNode;
                    if (SkinCoord == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                }
            }
            else if (id == "skinNormal")
            {
                X3DNode node = parser.ParseSFNodeValue();
                if (node != null)
                {
                    SkinNormal = node as X3DNormalNode;
                    if (SkinNormal == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                }
            }
            else if (id == "translation")
            {
                Translation = parser.ParseSFVec3fValue();
            }
            else if (id == "version")
            {
                Version = parser.ParseStringValue();
            }
            else if (id == "viewpoints")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    X3DViewpointNode vp = node as X3DViewpointNode;                   // x3d-Spec specs. x3dHAnimSite change to interface if neccessary
                    if (vp == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Viewpoints.Add(vp);
                    }
                }
            }
            else if (id == "bboxCenter")
            {
                BBoxCenter = parser.ParseSFVec3fValue();
            }
            else if (id == "bboxSize")
            {
                BBoxSize = parser.ParseSFVec3fValue();
            }
            else
            {
                return(false);
            }
            return(true);
        }
Beispiel #19
0
        internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
        {
            int line = parser.Line;

            if (id == "centerOfRotation")
            {
                CenterOfRotation = parser.ParseSFVec3fStringValue();
            }
            else if (id == "description")
            {
                Description = parser.ParseStringValue();
            }
            else if (id == "fieldOfView")
            {
                FieldOfView = parser.ParseDoubleValue();
            }
            else if (id == "headlight")
            {
                Headlight = parser.ParseBoolValue();
            }
            else if (id == "jump")
            {
                Jump = parser.ParseBoolValue();
            }
            else if (id == "navType")
            {
                if (wasNavType)
                {
                    NavType.AddRange(parser.ParseSFStringOrMFStringValue());
                }
                else
                {
                    NavType = parser.ParseSFStringOrMFStringValue();
                }
                wasNavType = true;
            }
            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 == "orientation")
            {
                Orientation = parser.ParseSFRotationValue();
            }
            else if (id == "position")
            {
                Position = parser.ParseSFVec3fStringValue();
            }
            else if (id == "retainUserOffsets")
            {
                RetainUserOffsets = parser.ParseBoolValue();
            }
            else if (id == "speedFactor")
            {
                SpeedFactor = parser.ParseDoubleValue();
            }
            else
            {
                return(false);
            }
            return(true);
        }
		internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
		{
			int line=parser.Line;

			if(id=="angularDampingFactor") AngularDampingFactor=parser.ParseDoubleValue();
			else if(id=="angularVelocity") AngularVelocity=parser.ParseSFVec3fValue();
			else if(id=="autoDamp") AutoDamp=parser.ParseBoolValue();
			else if(id=="autoDisable") AutoDisable=parser.ParseBoolValue();
			else if(id=="centerOfMass") CenterOfMass=parser.ParseSFVec3fValue();
			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=="finiteRotationAxis") FiniteRotationAxis=parser.ParseSFVec3fValue();
			else if(id=="fixed") Fixed=parser.ParseBoolValue();
			else if(id=="forces") Forces.AddRange(parser.ParseSFVec3fOrMFVec3fValue());
			else if(id=="geometry")
			{
				List<X3DNode> nodes=parser.ParseSFNodeOrMFNodeValue();
				foreach(X3DNode node in nodes)
				{
					X3DNBodyCollidableNode nbcn=node as X3DNBodyCollidableNode;
					if(nbcn==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Geometry.Add(nbcn);
				}
			}
			else if(id=="inertia") Inertia=parser.ParseSFMatrix3fValue();
			else if(id=="linearDampingFactor") LinearDampingFactor=parser.ParseDoubleValue();
			else if(id=="linearVelocity") LinearVelocity=parser.ParseSFVec3fValue();
			else if(id=="mass") Mass=parser.ParseDoubleValue();
			else if(id=="massDensityModel")
			{
				X3DNode node=parser.ParseSFNodeValue();
				if(node!=null)
				{
					MassDensityModel=node as X3DGeometryNode;
					if(MassDensityModel==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
				}
			}
			else if(id=="orientation") Orientation=parser.ParseSFRotationValue();
			else if(id=="position") Position=parser.ParseSFVec3fValue();
			else if(id=="torques") Torques.AddRange(parser.ParseSFVec3fOrMFVec3fValue());
			else if(id=="useFiniteRotation") UseFiniteRotation=parser.ParseBoolValue();
			else if(id=="useGlobalGravity") UseGlobalGravity=parser.ParseBoolValue();
			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 == "angularDampingFactor")
            {
                AngularDampingFactor = parser.ParseDoubleValue();
            }
            else if (id == "angularVelocity")
            {
                AngularVelocity = parser.ParseSFVec3fValue();
            }
            else if (id == "autoDamp")
            {
                AutoDamp = parser.ParseBoolValue();
            }
            else if (id == "autoDisable")
            {
                AutoDisable = parser.ParseBoolValue();
            }
            else if (id == "centerOfMass")
            {
                CenterOfMass = parser.ParseSFVec3fValue();
            }
            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 == "finiteRotationAxis")
            {
                FiniteRotationAxis = parser.ParseSFVec3fValue();
            }
            else if (id == "fixed")
            {
                Fixed = parser.ParseBoolValue();
            }
            else if (id == "forces")
            {
                Forces.AddRange(parser.ParseSFVec3fOrMFVec3fValue());
            }
            else if (id == "geometry")
            {
                List <X3DNode> nodes = parser.ParseSFNodeOrMFNodeValue();
                foreach (X3DNode node in nodes)
                {
                    X3DNBodyCollidableNode nbcn = node as X3DNBodyCollidableNode;
                    if (nbcn == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                    else
                    {
                        Geometry.Add(nbcn);
                    }
                }
            }
            else if (id == "inertia")
            {
                Inertia = parser.ParseSFMatrix3fValue();
            }
            else if (id == "linearDampingFactor")
            {
                LinearDampingFactor = parser.ParseDoubleValue();
            }
            else if (id == "linearVelocity")
            {
                LinearVelocity = parser.ParseSFVec3fValue();
            }
            else if (id == "mass")
            {
                Mass = parser.ParseDoubleValue();
            }
            else if (id == "massDensityModel")
            {
                X3DNode node = parser.ParseSFNodeValue();
                if (node != null)
                {
                    MassDensityModel = node as X3DGeometryNode;
                    if (MassDensityModel == null)
                    {
                        parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
                    }
                }
            }
            else if (id == "orientation")
            {
                Orientation = parser.ParseSFRotationValue();
            }
            else if (id == "position")
            {
                Position = parser.ParseSFVec3fValue();
            }
            else if (id == "torques")
            {
                Torques.AddRange(parser.ParseSFVec3fOrMFVec3fValue());
            }
            else if (id == "useFiniteRotation")
            {
                UseFiniteRotation = parser.ParseBoolValue();
            }
            else if (id == "useGlobalGravity")
            {
                UseGlobalGravity = parser.ParseBoolValue();
            }
            else
            {
                return(false);
            }
            return(true);
        }