SoPickedPoint(3)
π SoPickedPoint π
okay so bestie, welcome to a page straight out of the Library Functions Manual β¨ this one's about SoPickedPoint, and no cap, it's the lil guy that holds everything you ever wanted to know about a point somebody picked in your 3D scene. point, normal, texture coords, material index, all of it. let's get into it π
β¨ NAME β¨
SoPickedPoint β the SoPickedPoint class is used for specifying picked points.
π¦ SYNOPSIS π¦
#include <Inventor/SoPickedPoint.h>
π Public Member Functions π
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. π
She's the keeper of miscellaneous information about the picked point β think position, normal, texture coordinate, and the material index in the current material. Lowkey a whole info hub. She might also hold detail information (an SoDetail subclass) for every single node in the picked path, which is giving organized queen energy π.
π See also
SoRayPickAction
π Constructor & Destructor Documentation π
π SoPickedPoint::SoPickedPoint (const SoPickedPoint & pp)
Copy constructor. literally just clones the vibe π
π SoPickedPoint::SoPickedPoint (const SoPath *const pathptr, SoState *const stateptr, const SbVec3f & objSpacePoint)
Constructor. It uses the state to convert between world and object space for the data β so it's doing the math so you don't have to π§
π SoPickedPoint::~SoPickedPoint ()
Destructor. say bye bestie π«Ά
π Member Function Documentation π
β SoPickedPoint * SoPickedPoint::copy () const
Returns a copy of this picked point. β¨
β οΈ bestie, read this one fr fr: 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. π not a drill, this is the scary part.
β const SbVec3f & SoPickedPoint::getPoint () const
Returns the world space point. π
β const SbVec3f & SoPickedPoint::getNormal () const
Returns the world space normal.
β const SbVec4f & SoPickedPoint::getTextureCoords () const
Returns the image space texture coordinates. π
β int SoPickedPoint::getMaterialIndex () const
Returns the material index.
β SoPath * SoPickedPoint::getPath () const
Returns the path to the picked object. the receipts, basically π§Ύ
β 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, real surface or just the box outline? this tells you π₯
β 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.
β 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.
β 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.
β 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.
β 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 (this is what one would usually be interested in). π
node can be any node in the scenegraph. any of them. main character of your choosing π
β 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.
β 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.
β void SoPickedPoint::setObjectNormal (const SbVec3f & normalref)
Sets the picked point objects space normal vector. π
β void SoPickedPoint::setObjectTextureCoords (const SbVec4f & texCoordsref)
Sets the picked point object space texture coordinates. π¨
β void SoPickedPoint::setMaterialIndex (const int index)
Sets the material index.
β void SoPickedPoint::setDetail (SoDetail * detail, SoNode * node)
Sets the detail for node. node must be in the picked path, of course β no random nodes invited to this party π«. Set to NULL if you want to remove a detail for a node.
π Author π
Generated automatically by Doxygen for Coin from the source code. (yes bestie, the docs wrote themselves, we just added the sparkle β¨)
and that's the whole page, mwah π this was Coin, Version 3.1.3, page SoPickedPoint(3) from the Library Functions Manual β go pick some points, you absolute icon π¦π
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms