You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » AVL.PointAlongPath

AVL.PointAlongPath

Transforms a point to a coordinate system in which the 'axis' path is vertical or horizontal.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void PointAlongPath
(
	AvlNet.Point2D inPoint,
	AvlNet.Path inAxis,
	AvlNet.Axis inAxisType,
	float inAxisCoordinate,
	bool inInverse,
	out AvlNet.Point2D outPoint
)

Parameters

Name Type Range Default Description
inPointAvlNet.Point2DInput point.
inAxisAvlNet.PathInput axis path.
inAxisTypeAvlNet.AxisYType of axis the input axis path is parallel to. Default value: Y.
inAxisCoordinatefloat0.0fCoordinate of the axis path. Default value: 0.0f.
inInverseboolTrueSwitches to the inverse operation. Default value: True.
outPointAvlNet.Point2DTransformed point.

Description

This operation transforms a point - inPoint - between two coordinate systems: the one linked with 'axis' path inAxis and the original one. Direction of this conversion is based on inInverse value:

  • if it is true, inPoint is converted to original coordinate system
  • if it is false, inPoint is converted from original coordinate system

Coordinate system linked with inAxis is some transformation of the original one, satisfying these conditions:

  • 'axis' path is represented as a straight line
  • 'axis' path is horizontal if inAxisType is set to X or vertical if inAxisType is set to Y
  • if inAxisType is set to X, the Y coordinate of 'axis' path is equal to inAxisCoordinate. If inAxisType is set to Y, the X coordinate of 'axis' path is equal to inAxisCoordinate

Examples

ImageAlongPath performed on the sample image with inAxisType = X, inScanWidth = 50 and path marked with blue. Point marked with blue cross on the output image was calculated by ScanSingleEdge. Original point (marked with orange cross) was calculated using PointAlongPath with inAxisType = X, inAxisCoordinate = 25, inInverse = true and position of detected point. ImageAlongPath and PointAlongPath used the same path for transformations.

Errors

List of possible exceptions:

Error type Description
DomainError Empty path on input in PointAlongPath.

See also