Example #1
0
 protected virtual void OnShapeChanged(CollisionShape collisionShape)
 {
 }
Example #2
0
 protected override void OnShapeChanged(CollisionShape collisionShape)
 {
     if (!IgnoreShapeChanges)
         UpdateBoundingBox();
 }
 protected void OnShapeChanged(CollisionShape shape)
 {
     if (!IgnoreShapeChanges)
     {
         //When the shape changes, force the entity awake so that it performs any necessary updates.
         activityInformation.Activate();
         if (isDynamic)
         {
             LocalInertiaTensor = collisionInformation.Shape.VolumeDistribution * (InertiaHelper.InertiaTensorScale * mass);
         }
         else
         {
             LocalInertiaTensorInverse = new Matrix3x3();
         }
     }
 }
Example #4
0
 protected void OnShapeChanged(CollisionShape shape)
 {
     if (!IgnoreShapeChanges)
     {
         //When the shape changes, force the entity awake so that it performs any necessary updates.
         activityInformation.Activate();
         ShapeDistributionInformation shapeInfo;
         collisionInformation.Shape.ComputeDistributionInformation(out shapeInfo);
         volume = shapeInfo.Volume;
         if (isDynamic)
         {
             Matrix3x3.Multiply(ref shapeInfo.VolumeDistribution, InertiaHelper.InertiaTensorScale * mass, out shapeInfo.VolumeDistribution);
             LocalInertiaTensor = shapeInfo.VolumeDistribution;
         }
         else
         {
             LocalInertiaTensorInverse = new Matrix3x3();
         }
     }
 }
Example #5
0
 protected void OnShapeChanged(CollisionShape shape)
 {
     if (!IgnoreShapeChanges)
     {
         ShapeDistributionInformation shapeInfo;
         collisionInformation.Shape.ComputeDistributionInformation(out shapeInfo);
         volume = shapeInfo.Volume;
         if (isDynamic)
         {
             Matrix3X3.Multiply(ref shapeInfo.VolumeDistribution, InertiaHelper.InertiaTensorScale * mass, out shapeInfo.VolumeDistribution);
             LocalInertiaTensor = shapeInfo.VolumeDistribution;
         }
         else
         {
             LocalInertiaTensorInverse = new Matrix3X3();
         }
     }
 }
Example #6
0
 protected override void OnShapeChanged(CollisionShape collisionShape)
 {
     if (!IgnoreShapeChanges)
     {
         mesh = new TriangleMesh(Shape.TriangleMeshData);
         UpdateBoundingBox();
     }
 }
Example #7
0
 protected override void OnShapeChanged(CollisionShape collisionShape)
 {
     UpdateBoundingBox();
 }