[General]

Represents point on surface of picked object. More...

`#include <Inventor/SoPickedPoint.h>`

## Public Member Functions | |

SoPickedPoint () | |

SoPickedPoint (const SoPickedPoint &pp) | |

~SoPickedPoint () | |

SoPickedPoint * | copy () const |

const SbVec3f & | getPoint () const |

const SbVec3f & | getNormal () const |

const SbVec4f & | getTextureCoords () const |

int | getMaterialIndex () const |

SoPath * | getPath () const |

SbBool | isOnGeometry () const |

const SoDetail * | getDetail (const SoNode *node=NULL) const |

SbMatrix | getObjectToWorld (const SoNode *node=NULL) const |

SbMatrix | getWorldToObject (const SoNode *node=NULL) const |

SbMatrix | getObjectToImage (const SoNode *node=NULL) const |

SbMatrix | getImageToObject (const SoNode *node=NULL) const |

SbVec3f | getObjectPoint (const SoNode *node=NULL) const |

SbVec3f | getObjectNormal (const SoNode *node=NULL) const |

SbVec4f | getObjectTextureCoords (const SoNode *node=NULL) const |

Represents point on surface of picked object.

An SoPickedPoint represents a point on the surface of an object that was picked by applying an SoRayPickAction to a scene. It contains a path to the picked shape, the point of intersection, the surface normal and texture coordinates at that point, and other information. Note that it is not always necessary to explicitly apply an SoRayPickAction to the scene. The getPickedPoint method may also be called on an SoHandleEventAction or an SoEventCallback node.

Each node in the picked path may have a corresponding instance of an SoDetail subclass. These detail instances are stored in the SoPickedPoint.

SoRayPickAction, SoPickStyle, SoDetail, SoPath, SoEventCallback

**See related examples:**-
DetailSelection, TutorialPicking1, TutorialPicking2, TutorialPicking3, TutorialPicking4, TutorialPicking5, TutorialPicking6, TutorialPicking7, TutorialPicking8, TutorialPicking9

SoPickedPoint::SoPickedPoint | ( | ) |

Default constructor.

SoPickedPoint::SoPickedPoint | ( | const SoPickedPoint & | pp |
) |

Copy constructor.

SoPickedPoint::~SoPickedPoint | ( | ) |

Destructor.

SoPickedPoint* SoPickedPoint::copy | ( | ) | const |

Returns the detail that corresponds to the specified node in the path returned by getPath().

If the node is null, the detail corresponding to the tail of the pick path is returned.

Caution: If there is no detail class associated with the node, null is returned.

Returns the texture transformation matrix between image space and the object space corresponding to the given node in the path.

If the node is NULL, the matrix corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

int SoPickedPoint::getMaterialIndex | ( | ) | const` [inline]` |

Returns the index into the current set of materials of the material active at the intersection point.

Note that if the materials are interpolated between vertices, the index will correspond to the material at one of the vertices.

const SbVec3f& SoPickedPoint::getNormal | ( | ) | const` [inline]` |

Returns the surface normal in world space.

NOTE: It is possible to disable computation of normal vectors by calling the enableNormalsGeneration() method on SoRayPickAction. If normal vectors are disabled, this method returns 0,0,0.

Returns the surface normal in the object space corresponding to the given node in the path.

If the node is NULL, the information corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

Returns the intersection point in the object space corresponding to the given node in the path.

If the node is NULL, the information corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

Returns the texture coordinates in the object space corresponding to the given node in the path.

If the node is NULL, the information corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

Returns the texture transformation matrix between the object space and image space corresponding to the given node in the path.

If the node is NULL, the matrix corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

Returns the transformation matrix between the object space and world space corresponding to the given node in the path.

If the node is NULL, the matrix corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

SoPath* SoPickedPoint::getPath | ( | ) | const` [inline]` |

Returns the path to the object that was intersected.

const SbVec3f& SoPickedPoint::getPoint | ( | ) | const` [inline]` |

Returns the intersection point in world space.

const SbVec4f& SoPickedPoint::getTextureCoords | ( | ) | const` [inline]` |

Returns the texture coordinates in image space.

NOTE: By default the SoRayPickAction does not compute texture coordinates and this method returns 0,0,0,0. To enable texture coordinate computation call the enableTexCoordsGeneration() method on the pick action object or set the environment variable OIV_PICK_GENERATE_ALL_PROPERTIES to true.

Returns the transformation matrix between world space and the object space corresponding to the given node in the path.

If the node is NULL, the matrix corresponding to the tail of the (full) path is returned.

By default, the node is NULL.

SbBool SoPickedPoint::isOnGeometry | ( | ) | const` [inline]` |

Returns whether the intersection is actually on the geometry of the character that was hit, as opposed to being on the bounding box.

The pick style (see SoPickStyle) affects this decision.

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

- Inventor/SoPickedPoint.h

Copyright © Thermo Fisher Scientific All rights reserved.