public void Dispose()
 {
     if (obstacleManager != null) {
         obstacleManager.Dispose();
         obstacleManager = null;
     }
 }
        public void Initialize(Behavior b)
        {
            SimpleStayInLaneBehavior sb = (SimpleStayInLaneBehavior)b;

            // store the base path
            basePath = ConvertPath(sb.BasePath);

            // get the lower, upper bound
            leftBound = FindBoundary(sb.LaneWidth/2);
            rightBound = FindBoundary(-sb.LaneWidth/2);

            // convert everything to be vehicle relative
            AbsoluteTransformer absTransform = Services.StateProvider.GetAbsoluteTransformer();
            pathTime = absTransform.Timestamp;

            basePath = basePath.Transform(absTransform);
            leftBound = leftBound.Transform(absTransform);
            rightBound = rightBound.Transform(absTransform);

            // send the left and right bounds
            Services.UIService.PushRelativePath(leftBound, pathTime, "left bound");
            Services.UIService.PushRelativePath(rightBound, pathTime, "right bound");

            maxSpeed = sb.MaxSpeed;

            obstacleManager = new ObstacleManager();	// hik
        }