Inheritance: IfcSurfaceStyleShading
Exemple #1
0
		internal static void parseFields(IfcSurfaceStyleRendering s, List<string> arrFields, ref int ipos)
		{
			IfcSurfaceStyleShading.parseFields(s, arrFields, ref ipos);
			s.mTransparency = ParserSTEP.ParseDouble(arrFields[ipos++]);
			string str = arrFields[ipos++];
			if (str != "$")
				s.mDiffuseColour = ParserIfc.parseColourOrFactor(str);
			str = arrFields[ipos++];
			if (str != "$")
				s.mTransmissionColour = ParserIfc.parseColourOrFactor(str);
			str = arrFields[ipos++];
			if (str != "$")
				s.mDiffuseTransmissionColour = ParserIfc.parseColourOrFactor(str);
			str = arrFields[ipos++];
			if (str != "$")
				s.mReflectionColour = ParserIfc.parseColourOrFactor(str);
			str = arrFields[ipos++];
			if (str != "$")
				s.mSpecularColour = ParserIfc.parseColourOrFactor(str);
			str = arrFields[ipos++];
			if (str != "$")
			{
				if (str.StartsWith("IFCSPECULARROUGHNESS"))
					s.mSpecularHighlight = new IfcSpecularRoughness(double.Parse(str.Substring(21, str.Length - 22)));
				else
					s.mSpecularHighlight = new IfcSpecularExponent(double.Parse(str.Substring(20, str.Length - 21)));
			}
			str = arrFields[ipos++];
			if (str != "$")
				s.mReflectanceMethod = (IfcReflectanceMethodEnum)Enum.Parse(typeof(IfcReflectanceMethodEnum), str.Replace(".", ""));
		}
Exemple #2
0
		internal new static IfcSurfaceStyleRendering Parse(string strDef) { IfcSurfaceStyleRendering s = new IfcSurfaceStyleRendering(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return s; }
Exemple #3
0
		internal IfcSurfaceStyleRendering(IfcSurfaceStyleRendering r) : base(r)
		{
			mTransparency = r.mTransparency;
			mDiffuseColour = r.mDiffuseColour;
			mTransmissionColour = r.mTransmissionColour;
			mDiffuseTransmissionColour = r.mDiffuseTransmissionColour;
			mReflectionColour = r.mReflectionColour;
			mSpecularColour = r.mSpecularColour;
			mSpecularHighlight = r.mSpecularHighlight;
			mReflectanceMethod = r.mReflectanceMethod;
		}