public virtual SceneObject BuildPolyCurveSO(FScene scene, TypedAttribSet attributes) { PolyCurveSO so = new PolyCurveSO(); so.Create(scene.DefaultSOMaterial); RestorePolyCurveSOType(scene, attributes, so); return(so); }
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); }
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)); }
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); }