///<summary> /// Constructs a new compound shape entry using the volume of the shape as a weight. ///</summary> ///<param name="shape">Shape to use.</param> ///<param name="localTransform">Local transform of the shape.</param> ///<param name="weight">Weight of the entry. This defines how much the entry contributes to its owner /// for the purposes of center of rotation computation.</param> public CompoundShapeEntry(EntityShape shape, RigidTransform localTransform, float weight) { localTransform.Validate(); LocalTransform = localTransform; Shape = shape; Weight = weight; }
///<summary> /// Constructs a new compound shape entry using the volume of the shape as a weight. ///</summary> ///<param name="shape">Shape to use.</param> ///<param name="localTransform">Local transform of the shape.</param> public CompoundShapeEntry(EntityShape shape, RigidTransform localTransform) { localTransform.Validate(); LocalTransform = localTransform; Shape = shape; Weight = shape.Volume; }