BEPUphysics.Entities.Entity.OnShapeChanged C# (CSharp) Method

OnShapeChanged() protected method

protected OnShapeChanged ( BEPUphysics.CollisionShapes.CollisionShape shape ) : void
shape BEPUphysics.CollisionShapes.CollisionShape
return void
        protected void OnShapeChanged(CollisionShape shape)
        {
            if (!IgnoreShapeChanges)
            {
                //When the shape changes, force the entity awake so that it performs any necessary updates.
                activityInformation.Activate();
                ShapeDistributionInformation shapeInfo;
                collisionInformation.Shape.ComputeDistributionInformation(out shapeInfo);
                volume = shapeInfo.Volume;
                if (isDynamic)
                {
                    Matrix3x3.Multiply(ref shapeInfo.VolumeDistribution, InertiaHelper.InertiaTensorScale * mass, out shapeInfo.VolumeDistribution);
                    LocalInertiaTensor = shapeInfo.VolumeDistribution;
                }
                else
                {
                    LocalInertiaTensorInverse = new Matrix3x3();
                }
            }
        }