## C lib
useDynLib(unfoldr, .registration = TRUE, .fixes = "C_")

## Exports
export(simSphereSystem,simCylinderSystem,getSphereSystem,setupSphereSystem)
export(planarSection,binning1d,coefficientMatrixSpheres,em.saltykov,binning1d)

export(simSpheroidSystem,getSpheroidSystem,setupSpheroidSystem)
export(verticalSection,coefficientMatrixSpheroids,binning3d)
export(em.spheroids,setbreaks,trivarHist,parameters3d,parameterEstimates)
export(getMaxRadius, sectionProfiles, simModel3d)
export(updateIntersections)

#S3 Methods
S3method("unfold","prolate")
S3method("unfold","oblate")
S3method("unfold","numeric")

# plotting
export(cylinders3d, spheroids3d, drawSpheroidIntersection)

export(unfold)
importFrom("stats", "na.omit")