Ejemplo n.º 1
0
        protected virtual void AttributesOfPolygonalElement(IObjWriterState state, PolygonalElement element, StreamWriter writer)
        {
            if (element.SmoothingGroupNumber != state.SmoothingGroupNumber)
            {
                state.SmoothingGroupNumber = element.SmoothingGroupNumber;
                writer.WriteLine(state.SmoothingGroupNumber == 0 ? "s off" : string.Format("s {0}", state.SmoothingGroupNumber));
            }

            if (element.IsBevelInterpolationEnabled != state.IsBevelInterpolationEnabled)
            {
                state.IsBevelInterpolationEnabled = element.IsBevelInterpolationEnabled;
                writer.WriteLine(state.IsBevelInterpolationEnabled ? "bevel on": "bevel off");
            }

            if (element.IsColorInterpolationEnabled != state.IsColorInterpolationEnabled)
            {
                state.IsColorInterpolationEnabled = element.IsColorInterpolationEnabled;
                writer.WriteLine(state.IsColorInterpolationEnabled ? "c_interp on" : "c_interp off");
            }

            if (element.IsDissolveInterpolationEnabled != state.IsDissolveInterpolationEnabled)
            {
                state.IsDissolveInterpolationEnabled = element.IsDissolveInterpolationEnabled;
                writer.WriteLine(state.IsDissolveInterpolationEnabled ? "d_interp on" : "d_interp off");
            }
        }
Ejemplo n.º 2
0
 public virtual void ApplyAttributesToPolygonalElement(PolygonalElement element)
 {
     element.SmoothingGroupNumber           = SmoothingGroupNumber;
     element.IsBevelInterpolationEnabled    = IsBevelInterpolationEnabled;
     element.IsColorInterpolationEnabled    = IsColorInterpolationEnabled;
     element.IsDissolveInterpolationEnabled = IsDissolveInterpolationEnabled;
 }