BEPUphysics.CollisionShapes.ConvexShapes.ConeShape.ComputeVolumeDistribution C# (CSharp) 메소드

ComputeVolumeDistribution() 공개 메소드

Computes the volume distribution of the shape as well as its volume. The volume distribution can be used to compute inertia tensors when paired with mass and other tuning factors.
public ComputeVolumeDistribution ( float &volume ) : Matrix3x3
volume float Volume of the shape.
리턴 Matrix3x3
        public override Matrix3x3 ComputeVolumeDistribution(out float volume)
        {
            volume = ComputeVolume();

            //Calculate inertia tensor.
            var volumeDistribution = new Matrix3x3();
            float diagValue = (.1f * Height * Height + .15f * Radius * Radius);
            volumeDistribution.M11 = diagValue;
            volumeDistribution.M22 = .3f * Radius * Radius;
            volumeDistribution.M33 = diagValue;

            return volumeDistribution;
        }