public PmxMaterialMorph(BinaryStream bs, byte materialIdxSize) { Index = bs.ReadIndex(materialIdxSize); Offset = (OffsetEnum)bs.ReadByte(); Diffuse = bs.Color3(); Alpha = bs.ReadSingle(); Specular = bs.Color3(); Specularity = bs.ReadSingle(); Ambient = bs.Color3(); EdgeColor = bs.Color4(); EdgeSize = bs.ReadSingle(); NormalTexturity = bs.Vector4(); SphereTexturity = bs.Vector4(); ToonTexturity = bs.Vector4(); }
public static dynamic GetTSObject(OffsetEnum dynEnum) { var tsType = TSActivator.CreateInstance("Tekla.Structures.Model.RebarSpacing.OffsetEnum").GetType(); switch (dynEnum) { case OffsetEnum.EXACT: return(System.Enum.Parse(tsType, "EXACT")); case OffsetEnum.MINIMUM: return(System.Enum.Parse(tsType, "MINIMUM")); default: throw new DynamicAPIException(dynEnum.ToString() + "- enum value is not implemented"); } }