예제 #1
0
        public virtual SceneObject BuildPolyCurveSO(FScene scene, TypedAttribSet attributes)
        {
            PolyCurveSO so = new PolyCurveSO();

            so.Create(scene.DefaultSOMaterial);
            RestorePolyCurveSOType(scene, attributes, so);
            return(so);
        }
예제 #2
0
        public override SceneObject Duplicate()
        {
            PolyCurveSO copy = new PolyCurveSO();

            copy.Curve = new DCurve3(this.curve);
            copy.Create(this.GetAssignedSOMaterial());
            copy.SetLocalFrame(
                this.GetLocalFrame(CoordSpace.ObjectCoords), CoordSpace.ObjectCoords);
            copy.SetLocalScale(this.GetLocalScale());
            return(copy);
        }
예제 #3
0
 public virtual PolyCurveSO BuildSO(SOMaterial material, float scale = 1.0f)
 {
     return((PolyCurveSO)BuildSO((curveIn) => {
         PolyCurveSO so = new PolyCurveSO()
         {
             Curve = curveIn
         };
         so.Create(material);
         return so;
     }, material, scale));
 }
예제 #4
0
        public virtual SceneObject BuildPolyCurveSO(FScene scene, TypedAttribSet attributes)
        {
            PolyCurveSO so = new PolyCurveSO();

            so.Create(scene.DefaultSOMaterial);
            safe_set_property_s(attributes, IOStrings.ASOName, (s) => { so.Name = s; });
            RestoreTransform(so, attributes);
            RestoreMaterial(so, attributes);

            if (check_key_or_debug_print(attributes, IOStrings.APolyCurve3))
            {
                VectorArray3d v = attributes[IOStrings.APolyCurve3] as VectorArray3d;
                so.Curve.SetVertices(v);
            }
            if (check_key_or_debug_print(attributes, IOStrings.APolyCurveClosed))
            {
                so.Curve.Closed = (bool)attributes[IOStrings.APolyCurveClosed];
            }

            return(so);
        }