SoPickedPoint(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’– SoPickedPoint β€” the manual page, but make it make sense πŸ’–

okay bestie, gather round, because this is the SoPickedPoint(3) page from the Library Functions Manual and it's genuinely kind of a big deal. It's the little object that holds everything anyone could ever want to know about a point that got picked. Let's get into it 🫢


✨ NAME ✨

SoPickedPoint β€” the class used for specifying picked points. That's it, that's the whole name section. Short king behavior πŸ‘‘


🌸 SYNOPSIS 🌸

First things first, you gotta bring it in:

#include <Inventor/SoPickedPoint.h>

πŸ’… Public Member Functions

Here's the full roster, no skips, no cuts:

SoPickedPoint (const SoPickedPoint &pp)
SoPickedPoint (const SoPath *const path, SoState *const state, const SbVec3f &objSpacePoint)
~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 *const node=NULL) const
const SbMatrix & getObjectToWorld (const SoNode *const node=NULL) const
const SbMatrix & getWorldToObject (const SoNode *const node=NULL) const
const SbMatrix & getObjectToImage (const SoNode *const node=NULL) const
const SbMatrix & getImageToObject (const SoNode *const node=NULL) const
SbVec3f getObjectPoint (const SoNode *const node=NULL) const
SbVec3f getObjectNormal (const SoNode *const node=NULL) const
SbVec4f getObjectTextureCoords (const SoNode *const node=NULL) const
void setObjectNormal (const SbVec3f &normal)
void setObjectTextureCoords (const SbVec4f &texCoords)
void setMaterialIndex (const int index)
void setDetail (SoDetail *detail, SoNode *node)

πŸ¦‹ Detailed Description πŸ¦‹

The SoPickedPoint class is used for specifying picked points. (<- yes, they said it twice, it's a whole thing)

It holds miscellaneous information about the picked point, like position, normal, texture coordinate and material index in the current material. It might also hold detail information (an SoDetail subclass) for every node in the picked path. Basically it's the full receipts for a pick πŸ“

πŸ‘€ See also

  • SoRayPickAction

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

🌈 SoPickedPoint::SoPickedPoint (const SoPickedPoint & pp)

Copy constructor. Makes a twin, no cap πŸ‘―

References SoDetailList::copy(), SbPList::getLength(), SoBase::ref(), and SoPickedPoint().

Referenced by copy(), and SoPickedPoint().

🌈 SoPickedPoint::SoPickedPoint (const SoPath *const pathptr, SoState *const stateptr, const SbVec3f & objSpacePoint)

Constructor. Uses the state to convert between world and object space for the data. Very "the state is doing the heavy lifting here" energy ✨

References SoPath::copy(), and SoBase::ref().

🌈 SoPickedPoint::~SoPickedPoint ()

Destructor. Bye bestie πŸ‘‹


πŸ’œ Member Function Documentation πŸ’œ

⭐ SoPickedPoint * SoPickedPoint::copy () const

Returns a copy of this picked point. Dupe it, queen πŸ’…

⚠️ Important caveat, do NOT skip this one: note that if the Coin library has been built as a DLL under Microsoft Windows and you use this method from application code, you must make sure that both the Coin DLL and the application executable is using the same instance of a C Run-Time (CRT) library. Otherwise, you will get memory heap corruption upon deallocating the returned instances, eventually leading to mysterious crashes. Mysterious crashes!! Not the vibe!! 😭

References SoPickedPoint().

⭐ const SbVec3f & SoPickedPoint::getPoint () const

Returns the world space point.

Referenced by SoVRMLDragSensor::handleEvent(), SoVRMLTouchSensor::handleEvent(), and SoDragger::setStartingPoint().

⭐ const SbVec3f & SoPickedPoint::getNormal () const

Returns the world space normal.

Referenced by SoVRMLTouchSensor::handleEvent().

⭐ const SbVec4f & SoPickedPoint::getTextureCoords () const

Returns the image space texture coordinates.

Referenced by SoVRMLTouchSensor::handleEvent().

⭐ int SoPickedPoint::getMaterialIndex () const

Returns the material index. That's the whole thing, bestie.

⭐ SoPath * SoPickedPoint::getPath () const

Returns the path to the picked object. The scenic route, literally 🌈

Referenced by SoDragger::handleEvent(), SoEventCallback::handleEvent(), SoLocateHighlight::handleEvent(), SoSelection::handleEvent(), SoVRMLDragSensor::handleEvent(), SoVRMLTouchSensor::handleEvent(), and SoBaseKit::rayPick().

⭐ SbBool SoPickedPoint::isOnGeometry () const

Returns TRUE if this picked point is on the actual geometry of the picked object, or FALSE if not β€” it might for instance be on the bounding box if picking was done on bounding boxes. So like, sometimes it's the real thing and sometimes it's just the vibe check box 🫣

⭐ const SoDetail * SoPickedPoint::getDetail (const SoNode *const node = NULL) const

Returns detail for node. If node equals NULL, the detail for the picked object is returned.

Referenced by SoBaseKit::rayPick().

⭐ const SbMatrix & SoPickedPoint::getObjectToWorld (const SoNode *const node = NULL) const

Returns the matrix which converts from object (specified by node) to world space. If node equals NULL, the object space of the picked object will used.

Referenced by SoVRMLDragSensor::handleEvent().

⭐ const SbMatrix & SoPickedPoint::getWorldToObject (const SoNode *const node = NULL) const

Returns the matrix which converts from world to object (specified by node) space. If node equals NULL, the object space of the picked object will used.

Referenced by getObjectNormal(), getObjectPoint(), and SoVRMLTouchSensor::handleEvent().

⭐ const SbMatrix & SoPickedPoint::getObjectToImage (const SoNode *const node = NULL) const

Returns the matrix which converts from object (specified by node) to image space. If node equals NULL, the object space of the picked object will used.

⭐ const SbMatrix & SoPickedPoint::getImageToObject (const SoNode *const node = NULL) const

Returns the matrix which converts from image to object (specified by node) space. If node equals NULL, the object space of the picked object will used.

Referenced by getObjectTextureCoords(), and SoVRMLTouchSensor::handleEvent().

⭐ SbVec3f SoPickedPoint::getObjectPoint (const SoNode *const node = NULL) const

Returns the object space point, in the object space specified by node. If node equals NULL, the object space of the node where the point was actually picked will be used β€” and honestly, that's the one you'd usually be interested in. Main character space, iykyk πŸ‘‘

node can be any node in the scenegraph. Any of them. No gatekeeping πŸšͺ

References getWorldToObject(), and SbMatrix::multVecMatrix().

Referenced by SoWWWAnchor::handleEvent().

⭐ SbVec3f SoPickedPoint::getObjectNormal (const SoNode *const node = NULL) const

Returns the object space (specified by node) normal. If node equals NULL, the picked point object space will be used.

References getWorldToObject(), and SbMatrix::multDirMatrix().

⭐ SbVec4f SoPickedPoint::getObjectTextureCoords (const SoNode *const node = NULL) const

Returns the object space (specified by node) texture coordinates. If node equals NULL, the picked point object space will be used.

References getImageToObject(), and SbMatrix::multVecMatrix().

⭐ void SoPickedPoint::setObjectNormal (const SbVec3f & normalref)

Sets the picked point objects space normal vector.

Referenced by SoShape::invokeLineSegmentCallbacks(), SoShape::invokePointCallbacks(), SoShape::invokeTriangleCallbacks(), and SoText2::rayPick().

⭐ void SoPickedPoint::setObjectTextureCoords (const SbVec4f & texCoordsref)

Sets the picked point object space texture coordinates.

Referenced by SoShape::invokeLineSegmentCallbacks(), SoShape::invokePointCallbacks(), and SoShape::invokeTriangleCallbacks().

⭐ void SoPickedPoint::setMaterialIndex (const int index)

Sets the material index.

Referenced by SoShape::invokeLineSegmentCallbacks(), SoShape::invokePointCallbacks(), SoShape::invokeTriangleCallbacks(), and SoText2::rayPick().

⭐ void SoPickedPoint::setDetail (SoDetail * detail, SoNode * node)

Sets the detail for node. node must be in the picked path, of course. Set to NULL if you want to remove a detail for a node. Cleanup era 🧹✨

Referenced by SoShape::invokeLineSegmentCallbacks(), SoShape::invokePointCallbacks(), SoShape::invokeTriangleCallbacks(), and SoText2::rayPick().


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. (Not a human, just a very diligent robot 🫑)


okay that's the whole page, you ate it, you understood it, periodt πŸ’–

sign-off: this was Coin, Version 2.5.0, and yes the manual page really is called SoPickedPoint(3). stay picked, bestie πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from