ScRayPickAction Class Reference
[Actions]

ScaleViz Defines a distributed ray pick action. More...

#include <ScaleViz/actions/ScRayPickAction.h>

Inheritance diagram for ScRayPickAction:
SoRayPickAction SoPickAction SoAction SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 ScRayPickAction (const SbViewportRegion &viewportRegion, SoAction::DistribMode distribMode=SoAction::LOCAL_ONLY, ScRayPickCallback *callback=NULL, void *userData=NULL)
virtual void apply (SoNode *node)
void setRay (const SbVec3f &rayStart, const SbVec3f &rayDirection, float nearDistance=-1, float farDistance=-1)
void setRay (float fovy, const SbVec3f &rayStart, const SbVec3f &rayDirection, float nearDistance=-1, float farDistance=-1)
void setPoint (const SbVec2s &viewportPoint)
void setPoint (const SbVec2f &viewportPoint)
void setNormalizedPoint (const SbVec2f &normPoint)
SbVec3f getppNormal ()
SbVec3f getppPoint ()
SoPathgetppPath ()
SbBool isValidPp ()

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

ScaleViz Defines a distributed ray pick action.

The ScRayPickAction class provides a simple way to distribute an SoRayPickAction across a cluster.

Several distribution modes are available:

When OIRUs are involved (i.e., in CLUSTER_ONLY and ALL modes), they apply the action on their own part of the scene graph. The application gets back the result via the callback defined by the user.

This class can be used in all compositing modes (flat, tile, depth, and local compositing).

SEE ALSO

SoRayPickAction


Constructor & Destructor Documentation

ScRayPickAction::ScRayPickAction ( const SbViewportRegion viewportRegion,
SoAction::DistribMode  distribMode = SoAction::LOCAL_ONLY,
ScRayPickCallback callback = NULL,
void *  userData = NULL 
)

Constructor.

Parameters:
viewportRegion viewport region to use for picking
distribMode specify the way the action may be distributed
callback pointer to the function used to get the result of the action
userData pointer to user data

Member Function Documentation

virtual void ScRayPickAction::apply ( SoNode node  )  [virtual]

Destructor.

Applies action to the graph rooted by a node.

Reimplemented from SoAction.

static SoType ScRayPickAction::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoRayPickAction.

SbVec3f ScRayPickAction::getppNormal (  )  [inline]

Returns the picked point normal.

SoPath * ScRayPickAction::getppPath (  )  [inline]

Returns the picked point path.

SbVec3f ScRayPickAction::getppPoint (  )  [inline]

Returns the picked point.

virtual SoType ScRayPickAction::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoRayPickAction.

SbBool ScRayPickAction::isValidPp (  )  [inline]

Returns 0 if nothing has been picked.

Otherwise, returns 1.

void ScRayPickAction::setNormalizedPoint ( const SbVec2f normPoint  ) 

Sets the viewport point in normalized coordinates, which range from (0,0) at the lower left to (1,1) at the upper right.

NOTE: You can use this method or the setPoint / setRay methods. Whichever method you call last is the one that takes effect.

Reimplemented from SoRayPickAction.

void ScRayPickAction::setPoint ( const SbVec2f viewportPoint  ) 

Float version of setPoint().

It can be used when a desktop is magnified on a wall of screens when using ScaleViz in correlation with a tracker device calibrated for this wall.

Reimplemented from SoRayPickAction.

void ScRayPickAction::setPoint ( const SbVec2s viewportPoint  ) 

Sets the viewport-space point through which the ray passes, starting at the camera's viewpoint.

Viewport coordinates range from (0,0) at the lower left to (width-1,height-1) at the upper right.

NOTE: You can use this method or the setNormalizedPoint / setRay methods. Whichever method you call last is the one that takes effect.

Reimplemented from SoRayPickAction.

void ScRayPickAction::setRay ( float  fovy,
const SbVec3f rayStart,
const SbVec3f rayDirection,
float  nearDistance = -1,
float  farDistance = -1 
)

Sets a world-space ray along which to pick in the the same way as function defined above, but allows you to set a view angle value.

Alternatively, you can use the setRay method above and then specify the view angle using the environment variable OIV_SET_RAY_PRECISION. See SoPreferences.

Reimplemented from SoRayPickAction.

void ScRayPickAction::setRay ( const SbVec3f rayStart,
const SbVec3f rayDirection,
float  nearDistance = -1,
float  farDistance = -1 
)

Sets a world-space ray along which to pick.

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 SoCamera. A negative distance (such as the default values) means disable clipping to that plane.

NOTE: You can use this method or the setPoint / setNormalizedPoint methods. Whichever method you call last is the one that takes effect.

Reimplemented from SoRayPickAction.


The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/