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

Sets a world-space ray along which to pick.

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

Parameters

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.

The ray-picking is orthogonal. This means the pick volume is a rectangular prism with a square base having edges of length OIV.Inventor.Actions.SoRayPickAction.SetRadius(System.Single) * 2 or else a cylinder having 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