Universe.Physics.BulletSPlugin.BSPrim.ForceBodyShapeRebuild C# (CSharp) Method

ForceBodyShapeRebuild() public method

public ForceBodyShapeRebuild ( bool inTaintTime ) : bool
inTaintTime bool
return bool
        public override bool ForceBodyShapeRebuild(bool inTaintTime)
        {
            if (inTaintTime)
            {
                _mass = CalculateMass(); // changing the shape changes the mass
                CreateGeomAndObject(true);
            }
            else
            {
                lock (this)
                {
                    // If a rebuild is not already in the queue
                    if (!ShapeRebuildScheduled)
                    {
                        // Remember that a rebuild is queued -- this is used to flag an imcomplete object
                        ShapeRebuildScheduled = true;
                        PhysicsScene.TaintedObject(LocalID, "BSPrim.ForceBodyShapeRebuild", delegate()
                        {
                            _mass = CalculateMass(); // changing the shape changes the mass
                            CreateGeomAndObject(true);
                            ShapeRebuildScheduled = false;
                        });
                    }
                }
            }

            return true;
        }