CogCADToRange ViewingDirection Property Cognex VisionPro 9.10
A Cog3DVect3 that holds the 3D viewing direction specified in CAD3D. The vector points towards the viewer. It provides another way to define the rotation between CAD3D space and Projection3D space. The full rotation is defined as follows:
  • First, construct a plane that passes through the z-axis of CAD3D and the viewing direction.
  • Next, imagine a rotation axis that passes through the origin of CAD3D, perpendicular to the plane.
  • Projection3D space is obtained by rotating CAD3D space - but not the cad-shape itself - around the rotation axis until the original z-axis of CAD3D is coincident with the viewing direction vector.

Namespace: Cognex.VisionPro.CAD
Assembly: Cognex.VisionPro.CAD (in Cognex.VisionPro.CAD.dll) Version: 79.0.0.0
Syntax

public Cog3DVect3 ViewingDirection { get; set; }

Property Value

Type: Cog3DVect3
The 3D viewing direction specified in CAD3D. The default value is (0,0,1) meaning along z-axis from positive to negative infinity.
Events

Event TypeReason
ICogChangedEvent Changed Fires when this property changes. The following state flags may be affected:
Exceptions

ExceptionCondition
ArgumentException If the value.Length is equal to 0.
ObjectDisposedException If the object has been disposed.
Remarks

This property is only used if RotationMode is set to UseViewingDirection
See Also