Sets the rectangle's origin vertex, extent X vector and extent Y vector.
Namespace: Cognex.VisionPro3DAssembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 75.0.0.0
Syntax
Parameters
- originVertex
- Type: Cognex.VisionPro3D Cog3DVect3
The origin vertex of the rectangle.
- xVector
- Type: Cognex.VisionPro3D Cog3DVect3
The extent X vector of the rectangle.
- yVector
- Type: Cognex.VisionPro3D Cog3DVect3
The extent Y vector of the rectangle.
Events
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed | Fires when some properties change. The following state flags may be affected:
|
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | If xVector or yVector is (0,0,0), or xVector and yVector are parallel. |
Remarks
- If yVector is not perpendicular to
xVector
internally a new yVector is generated as follows and used instead:
- Create a plane with normal direction of xVector;
- Project yVector to this plane, and get the projected vector yVectorInternal;
- Scale yVectorInternal to have the same length as yVector.
- Size.X will be xVector.Length, and Size().Y will be yVector.Length.
- Center will be originVertex + (xVector + yVectorInternal)/2
See Also