SoRayPickActionSetRay Method (SbVec3f, SbVec3f, Single, Single) |
Sets a world-space ray along which to pick.
Namespace: OIV.Inventor.Actions
public virtual void SetRay( SbVec3f start, SbVec3f direction, float nearDistance, float farDistance )
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.