コード例 #1
0
 ///<summary>
 /// Constructs a new entity.
 ///</summary>
 ///<param name="shape">Shape to use with the entity.</param>
 ///<param name="mass">Mass of the entity. If positive, the entity will be dynamic. Otherwise, it will be kinematic.</param>
 /// <param name="inertiaTensor">Inertia tensor of the entity. Only used for a dynamic entity.</param>
 public Entity(EntityShape shape, float mass, Matrix3x3 inertiaTensor)
     : this()
 {
     Initialize(shape.GetCollidableInstance(), mass, inertiaTensor);
 }
コード例 #2
0
 ///<summary>
 /// Constructs a new entity.
 ///</summary>
 ///<param name="shape">Shape to use with the entity.</param>
 ///<param name="mass">Mass of the entity. If positive, the entity will be dynamic. Otherwise, it will be kinematic.</param>
 public Entity(EntityShape shape, float mass)
     : this()
 {
     Initialize(shape.GetCollidableInstance(), mass);
 }
コード例 #3
0
 ///<summary>
 /// Constructs a new kinematic entity.
 ///</summary>
 ///<param name="shape">Shape to use with the entity.</param>
 public Entity(EntityShape shape)
     : this()
 {
     Initialize(shape.GetCollidableInstance());
 }
コード例 #4
0
 protected EntityCollidable(EntityShape shape)
 {
     base.Shape = shape;
 }
コード例 #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="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, float weight)
 {
     LocalTransform = RigidTransform.Identity;
     Shape          = shape;
     Weight         = weight;
 }
コード例 #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.Volume;
 }