class DefaultEllipsoid extends AbstractShape3D implements Ellipsoid {

    @Override
    public Vector3d getIntersection(Ray3d ray)
    {
        Vector3d dir = getInverseTransform().mult(ray.getDirection().subtract(myCenter));
        Vector3d pos = getInverseTransform().mult(ray.getPosition().subtract(myCenter));

        Vector3d unitSphInter = new DefaultSphere(Vector3d.ORIGIN, 1d).getIntersection(new Ray3d(pos, dir));
        if (unitSphInter != null)
        {
            return myTransform.mult(unitSphInter).add(myCenter);
        }
        return null;
    }

    public  DefaultEllipsoid();
    public  DefaultEllipsoid(double radius, double radius2, double radius3);
    public  DefaultEllipsoid(Vector3d center, double radius, double radius2, double radius3);
    public  DefaultEllipsoid(Vector3d center, Vector3d xAxis, Vector3d yAxis, Vector3d zAxis);

}