ComputeVolume() public method

Computes the volume of the shape.
public ComputeVolume ( ) : float
return float
Exemplo 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>
 public CompoundShapeEntry(EntityShape shape, Quaternion orientation)
 {
     orientation.Validate();
     LocalTransform = new RigidTransform(orientation);
     Shape          = shape;
     Weight         = shape.ComputeVolume();
 }
Exemplo 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="localTransform">Local transform of the shape.</param>
 public CompoundShapeEntry(EntityShape shape, RigidTransform localTransform)
 {
     localTransform.Validate();
     LocalTransform = localTransform;
     Shape          = shape;
     Weight         = shape.ComputeVolume();
 }
Exemplo n.º 3
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="position">Local position of the shape.</param>
 public CompoundShapeEntry(EntityShape shape, Vector3 position)
 {
     position.Validate();
     LocalTransform = new RigidTransform(position);
     Shape          = shape;
     Weight         = shape.ComputeVolume();
 }
Exemplo n.º 4
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>
 public CompoundShapeEntry(EntityShape shape)
 {
     LocalTransform = RigidTransform.Identity;
     Shape          = shape;
     Weight         = shape.ComputeVolume();
 }
Exemplo n.º 5
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="localTransform">Local transform of the shape.</param>
 public CompoundShapeEntry(EntityShape shape, RigidTransform localTransform)
 {
     localTransform.Validate();
     LocalTransform = localTransform;
     Shape = shape;
     Weight = shape.ComputeVolume();
 }
Exemplo n.º 6
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>
 public CompoundShapeEntry(EntityShape shape)
 {
     LocalTransform = RigidTransform.Identity;
     Shape = shape;
     Weight = shape.ComputeVolume();
 }
Exemplo n.º 7
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();
 }
Exemplo n.º 8
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="position">Local position of the shape.</param>
 public CompoundShapeEntry(EntityShape shape, Vector3 position)
 {
     position.Validate();
     LocalTransform = new RigidTransform(position);
     Shape = shape;
     Weight = shape.ComputeVolume();
 }