/// <summary> /// /// </summary> /// <param name="geom"></param> /// <param name="bounds"></param> public TreeLoader2D(PagedGeometry geom, TBounds bounds) { //Calculate grid size mGeom = geom; mPageSize = mGeom.PageSize; //Reset height function mHeightFunction = null; mHeightFunctionUserData = null; //Make sure the bounds are aligned with PagedGeometry's grid, so the TreeLoader's grid tiles will have a 1:1 relationship mActualBounds = bounds; mGridBounds = bounds; mGridBounds.Left = (float)(mPageSize * System.Math.Floor((mGridBounds.Left - mGeom.Bounds.Left) / mPageSize) + mGeom.Bounds.Left); mGridBounds.Top = (float)(mPageSize * System.Math.Floor((mGridBounds.Top - mGeom.Bounds.Top) / mPageSize) + mGeom.Bounds.Top); mGridBounds.Right = (float)(mPageSize * System.Math.Ceiling((mGridBounds.Right - mGeom.Bounds.Left) / mPageSize) + mGeom.Bounds.Left); mGridBounds.Bottom = (float)(mPageSize * System.Math.Ceiling((mGridBounds.Bottom - mGeom.Bounds.Top) / mPageSize) + mGeom.Bounds.Top); //Calculate page grid size mPageGridX = (int)(System.Math.Ceiling(mGridBounds.Width / mPageSize) + 1); mPageGridZ = (int)(System.Math.Ceiling(mGridBounds.Height / mPageSize) + 1); //Reset color map mColorMap = null; mColorMapFilter = MapFilter.None; //Default scale range mMaximumScale = 2.0f; mMinimumScale = 0.0f; }
public void SetHeightFunction(IHeightFunction heightFunction, object userData) { mHeightFunction = heightFunction; }
/// <summary> /// /// </summary> /// <param name="heightFunction"></param> public void SetHeightFunction(IHeightFunction heightFunction) { SetHeightFunction(heightFunction, null); }