Aurora.ScriptEngine.AuroraDotNetEngine.APIs.LSL_Api.SetFlexi C# (CSharp) Method

SetFlexi() protected method

Set flexi parameters of a part. FIXME: Much of this code should probably be within the part itself.
protected SetFlexi ( ISceneChildEntity part, bool flexi, int softness, float gravity, float friction, float wind, float tension, Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Vector3 Force ) : void
part ISceneChildEntity
flexi bool
softness int
gravity float
friction float
wind float
tension float
Force Aurora.ScriptEngine.AuroraDotNetEngine.LSL_Types.Vector3
return void
        protected void SetFlexi(ISceneChildEntity part, bool flexi, int softness, float gravity, float friction,
            float wind, float tension, LSL_Vector Force)
        {
            if (part == null)
                return;

            if (flexi)
            {
                part.Shape.PathCurve |= (byte)Extrusion.Flexible;
                part.Shape.FlexiEntry = true;   // this setting flexi true isn't working, but the below parameters do
                // work once the prim is already flexi
                part.Shape.FlexiSoftness = softness;
                part.Shape.FlexiGravity = gravity;
                part.Shape.FlexiDrag = friction;
                part.Shape.FlexiWind = wind;
                part.Shape.FlexiTension = tension;
                part.Shape.FlexiForceX = (float)Force.x;
                part.Shape.FlexiForceY = (float)Force.y;
                part.Shape.FlexiForceZ = (float)Force.z;
                part.Shape.PathCurve = 0x80;
            }
            else
            {
                int curve = part.Shape.PathCurve;
                curve &= (int)(~(Extrusion.Flexible));
                part.Shape.PathCurve = (byte)curve;
                part.Shape.FlexiEntry = false;
            }


            part.ParentEntity.HasGroupChanged = true;
            part.ScheduleUpdate(PrimUpdateFlags.FullUpdate);
        }
LSL_Api