Ejemplo n.º 1
0
 ///<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="orientation">Local orientation 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, Quaternion orientation, float weight)
 {
     orientation.Validate();
     LocalTransform = new RigidTransform(orientation);
     Shape = shape;
     Weight = weight;
 }
Ejemplo n.º 2
0
 ///<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="orientation">Local orientation of the shape.</param>
 public CompoundShapeEntry(EntityShape shape, Quaternion orientation)
 {
     orientation.Validate();
     LocalTransform = new RigidTransform(orientation);
     Shape = shape;
     Weight = shape.ComputeVolume();
 }