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
コード例 #1
0
ファイル: CompoundShape.cs プロジェクト: dsmo7206/Lemma
 ///<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);
 }
コード例 #2
0
ファイル: CompoundShape.cs プロジェクト: Hengle/Engine-Nine
 ///<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);
 }