当前位置: 首页>>代码示例>>C#>>正文


C# IPath类代码示例

本文整理汇总了C#中IPath的典型用法代码示例。如果您正苦于以下问题:C# IPath类的具体用法?C# IPath怎么用?C# IPath使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPath类属于命名空间,在下文中一共展示了IPath类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetBrotherFileWithName

 internal static IFilePath GetBrotherFileWithName(IPath path, string fileName)
 {
     Debug.Assert(path != null);
     Debug.Assert(fileName != null); // Enforced by contract
     Debug.Assert(fileName.Length > 0); // Enforced by contract
     return path.ParentDirectoryPath.GetChildFileWithName(fileName);
 }
开发者ID:berkeleybross,项目名称:FileSystem,代码行数:7,代码来源:PathHelpers+PathBrowsingHelpers.cs

示例2: ChangeUnitLocation

 private void ChangeUnitLocation(IPath pathToTheTargetPlanet, IUnit unitToTeleport, ILocation targetLocation)
 {
     pathToTheTargetPlanet.TargetLocation.Planet.Units.Add(unitToTeleport);
     unitToTeleport.CurrentLocation.Planet.Units.Remove(unitToTeleport);
     unitToTeleport.PreviousLocation = unitToTeleport.CurrentLocation;
     unitToTeleport.CurrentLocation = targetLocation;
 }
开发者ID:Xristinaaaa,项目名称:Telerik2016,代码行数:7,代码来源:TeleportStation.cs

示例3: GetSisterFilePath

			internal static IFilePath GetSisterFilePath(IPath path, string fileName)
			{
				Argument.IsNotNull(nameof(path), path);
				Argument.IsNotNullOrEmpty(nameof(fileName), fileName);

				return path.ParentDirectoryPath.GetChildFilePath(fileName);
			}
开发者ID:ME3Explorer,项目名称:ME3Explorer,代码行数:7,代码来源:PathHelpers.PathBrowsingHelpers.cs

示例4: Axis

        /// <summary>
        /// Creates a new instance of the axis class
        /// </summary>
        /// <param name="path">That path to use</param>
        public Axis(IPath path)
        {
            _valid = true;
            _path = path;

            SetPath(path);
        }
开发者ID:MDSchechtman,项目名称:Aerotech-Motor-Sizer,代码行数:11,代码来源:Axis.cs

示例5: SelectableObject

 public SelectableObject(Guid owner ,string name, IPath path)
 {
     m_Owner = owner;
     m_Bounds = new Box(20.0, 20.0);
     m_Name = name;
     m_Path = path;
 }
开发者ID:anthony-martin,项目名称:Triangles-in-space,代码行数:7,代码来源:SelectableObject.cs

示例6: SubOperation

 internal SubOperation(MouseArea mc, IPath path)
 {
     this.currentGraph = null;
     this.mouseAreaControl = null;
     this.mouseAreaControl = mc;
     this.CurrentGraph = path;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:7,代码来源:SubOperation.cs

示例7: GetBrotherDirectoryWithName

 internal static IDirectoryPath GetBrotherDirectoryWithName(IPath path, string directoryName)
 {
     Debug.Assert(path != null);
     Debug.Assert(directoryName != null); // Enforced by contract
     Debug.Assert(directoryName.Length > 0); // Enforced by contract
     return path.ParentDirectoryPath.GetChildDirectoryWithName(directoryName);
 }
开发者ID:berkeleybross,项目名称:FileSystem,代码行数:7,代码来源:PathHelpers+PathBrowsingHelpers.cs

示例8: GetSisterDirectoryPath

			internal static IDirectoryPath GetSisterDirectoryPath(IPath path, string directoryName)
			{
				Argument.IsNotNull(nameof(path), path);
				Argument.IsNotNullOrEmpty(nameof(directoryName), directoryName);

				return path.ParentDirectoryPath.GetChildDirectoryPath(directoryName);
			}
开发者ID:ME3Explorer,项目名称:ME3Explorer,代码行数:7,代码来源:PathHelpers.PathBrowsingHelpers.cs

示例9: PruneOperation

        /// <summary>
        /// Initializes a new instance of the <see cref="SelfMediaDatabase.Core.Operations.Prune.PruneOperation"/> class.
        /// </summary>
        /// <param name="directory">Injection wrapper of <see cref="System.IO.Directory"/>.</param>
        /// <param name="file">Injection wrapper of <see cref="System.IO.File"/>.</param>
        /// <param name="path">Injection wrapper of <see cref="System.IO.Path"/>.</param>
        /// <param name="imageComparer">Image comparer.</param>
        /// <param name="fileSystemHelper">Helper to access to files.</param>
        public PruneOperation(
            IDirectory directory, 
            IFile file, 
            IPath path, 
            IImageComparer imageComparer, 
            IFileSystemHelper fileSystemHelper,
            IDialog dialog,
            IRenameOperation renameOperation)
        {
            if (directory == null)
                throw new ArgumentNullException("directory");
            if (file == null)
                throw new ArgumentNullException("file");
            if (imageComparer == null)
                throw new ArgumentNullException("imageComparer");
            if (fileSystemHelper == null)
                throw new ArgumentNullException("fileSystemHelper");
            if (path == null)
                throw new ArgumentNullException("path");
            if (dialog == null)
                throw new ArgumentNullException("dialog");
            if (renameOperation == null)
                throw new ArgumentNullException("renameOperation");

            _directory = directory;
            _file = file;
            _path = path;
            _imageComparer = imageComparer;
            _fileSystemHelper = fileSystemHelper;
            _dialog = dialog;
            _renameOperation = renameOperation;
        }
开发者ID:crabouif,项目名称:Self-Media-Database,代码行数:40,代码来源:PruneOperation.cs

示例10: Record

 public Record(IPath path)
 {
     _time = path.Time;
     _position = path.Position;
     _velocity = path.Velocity;
     _acceleration = path.Acceleration;
 }
开发者ID:MDSchechtman,项目名称:Aerotech-Motor-Sizer,代码行数:7,代码来源:Record.cs

示例11: LinearPath

        public LinearPath(IPath anotherPath, int sampleCount)
        {
            List<Vector3> pointList = new List<Vector3>(1000);

            PathPosition pathPosition = anotherPath.getStartPoint();

            float pathLength = 0f;
            float remaining = 0f;

            while (remaining == 0)
            {
                remaining = anotherPath.move(pathPosition, 0.01f, out pathPosition);
                pathLength += 0.01f;
            }
            pathLength -= remaining;

            distanceBetweenPoints = pathLength / sampleCount;
            pathPosition = anotherPath.getStartPoint();
            remaining = 0;

            while (remaining == 0f)
            {
                pointList.Add(anotherPath.getLocalPosition(pathPosition));
                remaining = anotherPath.move(pathPosition, distanceBetweenPoints, out pathPosition);
            }

            if (remaining < distanceBetweenPoints / 2f)
                pointList[pointList.Count - 1] = anotherPath.getLocalPosition(anotherPath.getEndPoint());
            else
                pointList.Add(anotherPath.getLocalPosition(anotherPath.getEndPoint()));

            points = pointList.ToArray();
        }
开发者ID:btasdoven,项目名称:ScienceWars,代码行数:33,代码来源:LinearPath.cs

示例12: DefaultStayInLaneBehavior

        /// <summary>
        /// Gets a default behavior for a path segment
        /// </summary>
        /// <param name="location"></param>
        /// <param name="vehicleState"></param>
        /// <param name="exit"></param>
        /// <param name="relative"></param>
        /// <param name="stopSpeed"></param>
        /// <param name="aMax"></param>
        /// <param name="dt">timestep in seconds</param>
        /// <returns></returns>
        public static PathFollowingBehavior DefaultStayInLaneBehavior(RndfLocation location, VehicleState vehicleState, 
            RndfWaypointID action, ActionType actionType, bool relative, double stopSpeed, double aMax, double dt,
            double maxSpeed, IPath path)
        {
            // get lane path
            //IPath path = RoadToolkit.LanePath(location.Partition.FinalWaypoint.Lane, vehicleState, relative);

            // check if the action is just a goal (note that exit and stop take precedence)
            if (actionType == ActionType.Goal)
            {
                // get maximum speed
                //double maxSpeed = location.Partition.FinalWaypoint.Lane.Way.Segment.SpeedInformation.MaxSpeed;
                //double maxSpeed = maxV;

                // generate path following behavior
                //return new PathFollowingBehavior(path, new ScalarSpeedCommand(maxSpeed));
                return null;
            }
            else
            {
                // get maximum speed
                //double maxSpeed = location.Partition.FinalWaypoint.Lane.Way.Segment.SpeedInformation.MaxSpeed;

                // get operational required distance to hand over to operational stop
                double distance = RoadToolkit.DistanceUntilOperationalStop(RoadToolkit.DistanceToWaypoint(location, action)-TahoeParams.FL);

                // get desired velocity
                double desiredSpeed = RoadToolkit.InferFinalSpeed(0, stopSpeed, distance, maxSpeed, aMax, dt);

                // generate path following behavior
                //return new PathFollowingBehavior(path, new ScalarSpeedCommand(desiredSpeed));
                return null;
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:45,代码来源:RoadToolkit.cs

示例13: GenerateInstallScriptRequestProcessor

 public GenerateInstallScriptRequestProcessor(
     IPath path,
     IHelpContentManager helpContentManager)
 {
     _path = path;
     _helpContentManager = helpContentManager;
 }
开发者ID:vebin,项目名称:DocMAH,代码行数:7,代码来源:GenerateInstallScriptRequestProcessor.cs

示例14: IPathToPoints

 public static List<Vector2> IPathToPoints(IPath p)
 {
     List<Vector2> pts = new List<Vector2>();
     foreach (IPathSegment lp in p)
         pts.Add(lp.Start);
     pts.Add(p.EndPoint.pt);
     return pts;
 }
开发者ID:iamchucky,项目名称:3DpointCloud,代码行数:8,代码来源:PathUtils.cs

示例15: Matches

        public bool Matches(IRoute route, IPath path)
        {
            var routePath = route.Path;
            if (!routePath.IsLiteral)
                return false;

            return routePath.LiteralPath.Equals(path.LiteralPath);
        }
开发者ID:ReactiveMarkets,项目名称:Styx,代码行数:8,代码来源:LiteralRankedRoutePredicate.cs


注:本文中的IPath类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。