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


#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...
#import(rgeos)
#Note: as of 0.7-2 it is also used for mirage correciton.



#--------------------------------------------------------------------------------------
# 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
 


#--------------------------------------------------------------------------------------
# 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)



