public x3dSignalPdu()
		{
			Address="localhost";
			ApplicationID=1;
			Data=new List<int>();
			DataLength=0;
			Enabled=true;
			EncodingScheme=0;
			EntityID=0;
			MulticastRelayHost="";
			MulticastRelayPort=0;
			NetworkMode="standAlone";
			Port=0;
			RadioID=0;
			ReadInterval=0.1;
			RtpHeaderExpected=false;
			SampleRate=0;
			Samples=0;
			SiteID=0;
			TdlType=0;
			WhichGeometry=1;
			WriteInterval=1.0;
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dRigidBody()
		{
			AngularDampingFactor=0.001;
			AngularVelocity=new SFVec3f(0, 0, 0);
			AutoDamp=false;
			AutoDisable=false;
			CenterOfMass=new SFVec3f(0, 0, 0);
			DisableAngularSpeed=0;
			DisableLinearSpeed=0;
			DisableTime=0;
			Enabled=true;
			FiniteRotationAxis=new SFVec3f(0, 0, 0);
			Fixed=false;
			Forces=new List<SFVec3f>();
			Geometry=new List<X3DNBodyCollidableNode>();
			Inertia=new SFMatrix3f(new List<double>(new double[] { 1, 0, 0, 0, 1, 0, 0, 0, 1 }));
			LinearDampingFactor=0.001;
			LinearVelocity=new SFVec3f(0, 0, 0);
			Mass=1;
			Orientation=new SFRotation(0, 0, 1, 0);
			Position=new SFVec3f(0, 0, 0);
			Torques=new List<SFVec3f>();
			UseFiniteRotation=false;
			UseGlobalGravity=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=="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=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			else return false;
			return true;
		}
		public x3dCollision()
		{
			Children=new List<X3DChildNode>();
			Collide=true;
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		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=="clipBoundary")
			{
				if(wasClipBoundary) ClipBoundary.AddRange(parser.ParseSFFloatOrMFFloatValue());
				else ClipBoundary=parser.ParseSFFloatOrMFFloatValue();
				wasClipBoundary=true;
			}
			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 X3DChildNode;
					if(child==null) parser.ErrorParsingNode(VRMLReaderError.UnexpectedNodeType, this, id, node, line);
					else Children.Add(child);
				}
			}
			else if(id=="geoCoords") GeoCoords=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=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			else return false;
			return true;
		}
		public x3dBillboard()
		{
			AxisOfRotation=new SFVec3f(0, 1, 0);
			Children=new List<X3DChildNode>();
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dTextureTransform3D()
		{
			Center=new SFVec3f(0, 0, 0);
			Rotation=new SFRotation(0, 0, 1, 0);
			Scale=new SFVec3f(1, 1, 1);
			Translation=new SFVec3f(0, 0, 0);
		}
		internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
		{
			if(id=="enabled") Enabled=parser.ParseBoolValue();
			else if(id=="force") Force=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;
		}
		public x3dNurbsSet()
		{
			Geometry=new List<X3DNurbsSurfaceGeometryNode>();
			TessellationScale=0;
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dInline()
		{
			Load=true;
			URL=new List<string>();
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		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=="objectType")
			{
				if(wasObjectType) ObjectType.AddRange(parser.ParseSFStringOrMFStringValue());
				else ObjectType=parser.ParseSFStringOrMFStringValue();
				wasObjectType=true;
			}
			else if(id=="pickable") Pickable=parser.ParseBoolValue();
			else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			else return false;
			return true;
		}
		public x3dSwitch()
		{
			Children=new List<X3DChildNode>();
			WhichChoice=-1;
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dCADAssembly()
		{
			Children=new List<X3DChildNode>();
			Name="";
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dWindPhysicsModel()
		{
			Direction=new SFVec3f(0, 0, 0);
			Enabled=true;
			Gustiness=0.1;
			Speed=0.1;
			Turbulence=0;
		}
		public x3dCollidableShape()
		{
			Enabled=true;
			Rotation=new SFRotation(0, 0, 1, 0);
			Translation=new SFVec3f(0, 0, 0);
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dGeoOrigin()
		{
			GeoCoords=new SFVec3f(0, 0, 0);
			GeoSystem=new List<string>();
			GeoSystem.Add("GD");
			GeoSystem.Add("WE");
			RotateYUp=false;
		}
		public x3dCADLayer()
		{
			Children=new List<X3DChildNode>();
			Name="";
			Visible=new List<bool>();
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dCollisionSpace()
		{
			Collidables=new List<X3DNode>();
			Enabled=true;
			UseGeometry=false;
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dExplosionEmitter()
		{
			Position=new SFVec3f(0, 0, 0);
			Speed=0;
			Variation=0.25;
			Mass=0;
			SurfaceArea=0;
		}
		public x3dAnchor()
		{
			Children=new List<X3DChildNode>();
			Description="";
			Parameter=new List<string>();
			URL=new List<string>();
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		public x3dGeoProximitySensor()
		{
			Enabled=true;
			GeoCenter=new SFVec3f(0, 0, 0);
			Size=new SFVec3f(0, 0, 0);
			GeoSystem=new List<string>();
			GeoSystem.Add("GD");
			GeoSystem.Add("WE");
		}
		public x3dPickableGroup()
		{
			Children=new List<X3DChildNode>();
			ObjectType=new List<string>();
			ObjectType.Add("ALL");
			Pickable=true;
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
		}
		internal override bool ParseNodeBodyElement(string id, VRMLParser parser)
		{
			if(id=="load") Load=parser.ParseBoolValue();
			else if(id=="url") URL.AddRange(parser.ParseSFStringOrMFStringValue());
			else if(id=="bboxCenter") BBoxCenter=parser.ParseSFVec3fValue();
			else if(id=="bboxSize") BBoxSize=parser.ParseSFVec3fValue();
			else return false;
			return true;
		}
Esempio n. 26
0
		public x3dLOD()
		{
			Children=new List<X3DChildNode>();
			BBoxCenter=new SFVec3f(0, 0, 0);
			BBoxSize=new SFVec3f(-1, -1, -1);
			Center=new SFVec3f(0, 0, 0);
			ForceTransitions=false;
			Range=new List<double>();
		}
		public x3dViewpointGroup()
		{
			Center=new SFVec3f(0, 0, 0);
			Children=new List<IX3DViewpointgroupChildren>();
			Description="";
			Displayed=true;
			RetainUserOffsets=false;
			Size=new SFVec3f(0, 0, 0);
		}
		public x3dDirectionalLight()
		{
			AmbientIntensity=0;
			Color=new SFColor(1, 1, 1);
			Direction=new SFVec3f(0, 0, -1);
			Global=false;
			Intensity=1;
			On=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;
		}
		public x3dVolumeEmitter()
		{
			Direction=new SFVec3f(0, 1, 0);
			Speed=0;
			Variation=0.25;
			CoordIndex=new List<int>();
			Internal=true;
			Mass=0;
			SurfaceArea=0;
		}