SOPICKEDPOINT(3iv)

πŸŽ€ SoPickedPoint β€” like, the manual page, but make it make sense πŸŽ€

okay bestie, welcome to SoPickedPoint(3IV) β€” yes that's the manual name, section 3IV, we're in the Inventor zone now πŸ’…


✨ NAME ✨

SoPickedPoint β€” represents point on surface of picked object


🌸 INHERITS FROM 🌸

SoPickedPoint

(no cap, it just stands on its own two feet like a main character πŸ‘‘)


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/SoPickedPoint.h>

Methods from class SoPickedPoint:

                     SoPickedPoint(const SoPickedPoint &pp)
                     ~SoPickedPoint()
 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
 const SbMatrix      getObjectToWorld(const SoNode *node = NULL) const
 const SbMatrix      getWorldToObject(const SoNode *node = NULL) const
 const SbMatrix      getObjectToImage(const SoNode *node = NULL) const
 const SbMatrix      getImageToObject(const SoNode *node = NULL) const
 const SbVec3f       getObjectPoint(const SoNode *node = NULL) const
 const SbVec3f       getObjectNormal(const SoNode *node = NULL) const
 const SbVec4f       getObjectTextureCoords(const SoNode *node=NULL) const

πŸ’– DESCRIPTION πŸ’–

so. An SoPickedPoint represents a point on the surface of an object that got picked by applying an SoRayPickAction to a scene. It's basically the receipts from your ray-pick πŸ“‹βœ¨

It contains a path to the picked shape, the point of intersection, the surface normal and texture coordinates at that point, and other information.

Each node in the picked path may have a corresponding instance of a detail subclass. These detail instances are stored in the SoPickedPoint. it's giving very organized, very "I keep everything in labeled bins" energy 🫢


πŸ’… METHODS πŸ’…

  • SoPickedPoint(const SoPickedPoint &pp) β€” Copy constructor. literally just copies it, slay.
  • ~SoPickedPoint() β€” Destructor. bye bestie πŸ‘‹
  • const SbVec3f &getPoint() const
  • const SbVec3f &getNormal() const
  • const SbVec4f &getTextureCoords() const

These return the intersection point and surface normal in world space, and the texture coordinates in image space.

  • int getMaterialIndex() const β€” Returns the index into the current set of materials of the material active at the intersection point. Heads up though: if the materials are interpolated between vertices, the index will correspond to the material at one of the vertices. so like, one of them, not a fancy blend πŸ“
  • SoPath *getPath() const β€” Returns the path to the object that was intersected. your lil map to the crime scene πŸ—ΊοΈ
  • SbBool isOnGeometry() const β€” 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. so it's the difference between actually touching the person vs touching the aura ✨
  • const SoDetail *getDetail(const SoNode *node = NULL) const β€” Returns the detail that corresponds to the given node in the path returned by getPath(). If the node pointer is NULL (the default), the detail corresponding to the tail of the (full) path is returned.
  • const SbMatrix getObjectToWorld(const SoNode *node = NULL) const
  • const SbMatrix getWorldToObject(const SoNode *node = NULL) const

These return the transformation matrices between world space and the object space corresponding to the given node in the path. If the node pointer is NULL (the default), the matrix corresponding to the tail of the (full) path is returned.

  • const SbMatrix getObjectToImage(const SoNode *node = NULL) const
  • const SbMatrix getImageToObject(const SoNode *node = NULL) const

These return the texture transformation matrices between image space and the object space corresponding to the given node in the path. If the node pointer is NULL (the default), the matrix corresponding to the tail of the (full) path is returned.

  • const SbVec3f getObjectPoint(const SoNode *node = NULL) const
  • const SbVec3f getObjectNormal(const SoNode *node = NULL) const
  • const SbVec4f getObjectTextureCoords(const SoNode *node=NULL) const

These return the intersection point, surface normal, and texture coordinates in the object space corresponding to the given node in the path. If the node pointer is NULL (the default), the information corresponding to the tail of the (full) path is returned.

fr fr, notice the pattern? pass a node, get that node's info. pass NULL (or nothing, it's the default), get the tail of the (full) path. iconic behavior, honestly πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘

SoRayPickAction, SoPickStyle, SoDetail, SoPath


and that's the whole page bestie!! πŸ’– go forth and pick points responsibly 🌈

SoPickedPoint(3IV) β€” signing off, mwah πŸŽ€βœ¨