CogTransform2DLinear MapVector Method Cognex VisionPro 9.21 SR1
Maps the given x,y vector through this transform, filling in the mapped x,y vector components.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 85.1.0.0
Syntax

public void MapVector(
	double x,
	double y,
	out double mappedX,
	out double mappedY
)

Parameters

x
Type: System Double

The x-component of the vector to map.

y
Type: System Double

The y-component of the vector to map.

mappedX
Type: System Double 

The x-component of the mapped vector.

mappedY
Type: System Double 

The y-component of the mapped vector

Remarks

Maps the given (x, y) vector through this transformation, returning the mapped (x,y) vector components as given by:

Points and vectors are treated differently when transformed between coordinate spaces. A point represents a specific position in a coordinate space. A vector represents a length and direction in the same space but has no fixed location. The following figure shows the coordinates of P and the components of the vector v in two different coordinate spaces.

In Space 1, the components of the vector and the coordinates of the point are the same: the vector's tail is at the origin and the tip is at point P. In Space 2, the vector components and the point coordinates are different. The point P has a fixed position in space, and the vector has a fixed length and direction.

You use MapPoint(Double, Double, Double , Double ) and MapVector(Double, Double, Double , Double ) to map point coordinates and vector components from one coordinate space to another. In the preceding figure, you would use MapPoint(Double, Double, Double , Double ) to map (xP1, yP1) to (xP2, yP2). MapVector(Double, Double, Double , Double ) would map (xv1, yv1) to (xv2, yv2).

See Also