BEPUphysics.CollisionShapes.EntityShape.ComputeVolumeDistribution C# (CSharp) Method

ComputeVolumeDistribution() public method

Computes the volume distribution of the shape. The volume distribution can be used to compute inertia tensors when paired with mass and other tuning factors.
public ComputeVolumeDistribution ( ) : Matrix3x3
return BEPUutilities.Matrix3x3
        public virtual Matrix3x3 ComputeVolumeDistribution()
        {
            ShapeDistributionInformation shapeInfo;
            ComputeDistributionInformation(out shapeInfo);
            return shapeInfo.VolumeDistribution;
        }
        /// <summary>

Same methods

EntityShape::ComputeVolumeDistribution ( float &volume ) : Matrix3x3

Usage Example

示例#1
0
 ///<summary>
 /// Gets the volume distribution contributed by a single shape.
 ///</summary>
 ///<param name="shape">Shape to use to compute a contribution.</param>
 ///<param name="transform">Transform of the shape.</param>
 ///<param name="center">Center to use when computing the distribution.</param>
 ///<param name="weight">Weighting to apply to the contribution.</param>
 ///<param name="contribution">Volume distribution of the contribution.</param>
 public static void GetContribution(EntityShape shape, ref RigidTransform transform, ref Vector3 center, float weight, out Matrix3x3 contribution)
 {
     contribution = shape.ComputeVolumeDistribution();
     TransformContribution(ref transform, ref center, ref contribution, weight, out contribution);
     //return TransformContribution(ref transform, ref center, ref contribution, weight);
 }
All Usage Examples Of BEPUphysics.CollisionShapes.EntityShape::ComputeVolumeDistribution