protected virtual void OnShapeChanged(CollisionShape collisionShape) { }
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(); } } }
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(); } } }
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(); } } }
protected override void OnShapeChanged(CollisionShape collisionShape) { if (!IgnoreShapeChanges) { mesh = new TriangleMesh(Shape.TriangleMeshData); UpdateBoundingBox(); } }
protected override void OnShapeChanged(CollisionShape collisionShape) { UpdateBoundingBox(); }