
import(methods)
importFrom(graphics, plot, hist)
import(sp)
#importFrom("sp", bbox, Spatial, SpatialGrid, SpatialGridDataFrame, plot)
import(raster)
#import(rasterVis)
importFrom(rasterVis, plot3D)
import(boot)

#added in 0.7-4 (24-Aug-2017) at the request of R CMD check ./sampSurf
importFrom(grDevices, col2rgb, colors, rgb)
importFrom(graphics, abline, par, points)
importFrom(stats, na.omit, nlminb, qt, runif, sd, spline,
           uniroot, var)
importFrom(utils, getFromNamespace)
importFrom(lattice, xyplot, trellis.par.get)
#also added for smithPlot 0.7-4 (24-Aug-2017)...
importFrom(latticeExtra, ggplot2like, ggplot2like.opts, custom.theme.2,
           theEconomist.opts, theEconomist.theme)



#
#note that gpclib has now been replaced by rgeos...
#
#import(gpclib)
#importFrom("gpclib", intersect)  #this takes care of the plot warning
#
# I've made rgeos a "suggested" package as it is only used for the chainSaw method
# and that is not a commonly used technique. Also, installing the system requirements
# for rgeos may not be what many people want to play with...
#
#Note: because rgeos is suggested, there is no need for importing at all.
#
#importFrom(rgeos, gIntersects, gIntersection)
#import(rgeos)
#
#Note: as of 0.7-2 rgeos is also used for mirage correction.
#



#
#note that in the classes and methods sections below the "lapSurf" components are
#commented out as they are not part of the public release of the package, but something
#I have worked on in the past to enable more information from overlap zones. Please
#feel free to contact the author for more information, including a vignette on its
#use.
#






#--------------------------------------------------------------------------------------
# Environments, misc functions, etc.
#
#exportPattern("^[[:alpha:]]+")


export(.StemEnv)            #for now, eventually hide it <<*******
export(initRandomSeed, transparentColorBase)

export(sampleLogs, boltDimensions, sampleTrees)
export(bboxCheck, bboxToPoly, bboxSum)
export(checkStemDimensions)
export(spCircle)
export(getID)

export(izGridConstruct) #for now, eventually hide it?
export(gridCellEnhance) #ibid

export(getProxy)    #proxy functions for Monte Carlo subsampling

export(smithPlot)   #H. F. Smith-type plots
 


#--------------------------------------------------------------------------------------
# Classes export section...
#

#Stem & StemContainer...
exportClasses(Stem, downLog,   standingTree)
exportClasses(StemContainer, downLogs, standingTrees)
#ArealSampling...
exportClasses(ArealSampling, circularPlot, pointRelascope, perpendicularDistance,
              distanceLimited, angleGauge, lineSegment)
#Tract...
exportClasses(Tract, bufferedTract, mirageTract)
#InclusionZone & izContainer (see also MC subsampling below)...
exportClasses(InclusionZone,
              downLogIZ, standUpIZ, sausageIZ, chainSawIZ, fullChainSawIZ,
              pointRelascopeIZ, perpendicularDistanceIZ, omnibusPDSIZ,
              distanceLimitedMCIZ, distanceLimitedIZ,
              distanceLimitedPDSIZ, omnibusDLPDSIZ, hybridDLPDSIZ)
exportClasses(standingTreeIZ, circularPlotIZ, horizontalPointIZ, horizontalLineIZ, criticalHeightIZ)
exportClasses(importanceCHSIZ, antitheticICHSIZ, pairedAICHSIZ)
exportClasses(izContainer, downLogIZs,  standingTreeIZs)
#InclusionZoneGrid...
exportClasses(InclusionZoneGrid, csFullInclusionZoneGrid, mirageInclusionZoneGrid)
#sampSurf...
exportClasses(sampSurf)
#monte...
exportClasses(montePop, monteSample, monteNTSample, monteBSSample, monte)
#Monte Carlo Methods...
exportClasses(MonteCarloSampling, crudeMonteCarlo, importanceSampling, controlVariate, antitheticSampling)
exportClasses(mcsContainer, antitheticContainer)
#Monte Carlo Subsampling within areal methods...
exportClasses(MonteCarloSamplingIZ)
exportClasses(horizontalPointCMCIZ, horizontalPointISIZ, horizontalPointCVIZ)
#lapSurf...
#exportClasses(lapSurf)



#--------------------------------------------------------------------------------------
# methods export section...
#

#export required for all methods with external generics...
exportMethods(plot, summary, show, hist)
exportMethods(bbox, perimeter, plot3D, area)

#and for all internal methods/generics...
#Stem & StemContainer constructors...
exportMethods(downLog, downLogs,   standingTree, standingTrees)
#ArealSampling constructors...
exportMethods(circularPlot, pointRelascope, perpendicularDistance, distanceLimited,
              angleGauge, lineSegment)
#InclusionZone & izContainer constructors...
exportMethods(standUpIZ, sausageIZ, chainSawIZ, fullChainSawIZ, 
              pointRelascopeIZ, perpendicularDistanceIZ, omnibusPDSIZ,
              distanceLimitedMCIZ, distanceLimitedIZ,
              distanceLimitedPDSIZ, omnibusDLPDSIZ, hybridDLPDSIZ)
exportMethods(circularPlotIZ, horizontalPointIZ, horizontalLineIZ, criticalHeightIZ)
exportMethods(importanceCHSIZ, antitheticICHSIZ, pairedAICHSIZ)
#izContainer constructors...
exportMethods(izContainer, downLogIZs,  standingTreeIZs)
#Tract constructors...
exportMethods(Tract, bufferedTract, mirageTract)
#InclusionZoneGrid constructors...
exportMethods(izGrid, izGridMirage) #30-Sept-2013: removed izGridCSFull
exportMethods(heapIZ)
#sampSurf constructors...
exportMethods(sampSurf)
#exportMethods(Plot)
#monte constructors...
exportMethods(montePop, monte, monteNTSample, monteBSSample)
#Monte Carlo Sampling constructors...
exportMethods(crudeMonteCarlo, importanceSampling, controlVariate, antitheticSampling)
exportMethods(mcsContainer, antitheticContainer)
#Monte Carlo Subsampling within areal methods...
exportMethods(horizontalPointCMCIZ, horizontalPointISIZ, horizontalPointCVIZ)
#Other...
exportMethods(taperInterpolate, segmentVolume, clipStemsToTract)
#lapSurf constructors...
#exportMethods(lapSurf)



