Click or drag to resize
SoRayPickActionSetRay Method (Single, SbVec3f, SbVec3f, Single, Single)

Sets a world-space ray along which to pick in the the same way as the other version of OIV.Inventor.Actions.SoRayPickAction.SetRay(OIV.Inventor.SbVec3f, OIV.Inventor.SbVec3f, System.Single, System.Single), but allows you to set a view angle value.

Namespace: OIV.Inventor.Actions
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public virtual void SetRay(
	float fovy,
	SbVec3f start,
	SbVec3f direction,
	float nearDistance,
	float farDistance
)

Parameters

fovy
Type: SystemSingle
start
Type: OIV.InventorSbVec3f
direction
Type: OIV.InventorSbVec3f
nearDistance
Type: SystemSingle
farDistance
Type: SystemSingle
Remarks

The ray is defined as a world space starting point and direction vector. The direction vector will be normalized automatically. The last two arguments specify optional near and far plane clipping during the pick operation. These values are distances from the start point along the direction vector, similar to nearDistance and farDistance in OIV.Inventor.Nodes.SoCamera. A negative distance (such as the default values) means disable clipping to that plane.

If fovy is non-zero, perspective ray-picking is used. This means the pick volume is a frustum intersecting the plane passing through the point specified as start argument and having normal vector specified by the direction argument and whose base is a square having edges of length OIV.Inventor.Actions.SoRayPickAction.SetRadius(System.Single) * 2 or else a circle of radius OIV.Inventor.Actions.SoRayPickAction.SetRadius(System.Single) if OIV.Inventor.Actions.SoRayPickAction.EnableConicPickVolume(System.Boolean) is set to true.

NOTE: You can use this method or the OIV.Inventor.Actions.SoRayPickAction.SetPoint(OIV.Inventor.SbVec2s) / OIV.Inventor.Actions.SoRayPickAction.SetNormalizedPoint(OIV.Inventor.SbVec2f) Whichever method you call last is the one that takes effect.

See Also