public class SoPickedPoint extends Inventor
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
.
See also:
SoRayPickAction
, SoPickStyle
, SoDetail
, SoPath
, SoEventCallback
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoPickedPoint()
Default constructor.
|
SoPickedPoint(SoPickedPoint pp)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
SoPickedPoint |
copy() |
SoDetail |
getDetail()
Calls getDetail((com.openinventor.inventor.nodes.SoNode)null).
|
SoDetail |
getDetail(SoNode node)
Returns the detail that corresponds to the specified node in the path returned by
getPath() . |
SbMatrix |
getImageToObject()
Calls getImageToObject((com.openinventor.inventor.nodes.SoNode)null).
|
SbMatrix |
getImageToObject(SoNode node)
Returns the texture transformation matrix between image space and the object space corresponding to the given node in the path.
|
int |
getMaterialIndex()
Returns the index into the current set of materials of the material active at the intersection point.
|
SbVec3f |
getNormal()
Returns the surface normal in world space.
|
SbVec3f |
getObjectNormal()
Calls getObjectNormal((com.openinventor.inventor.nodes.SoNode)null).
|
SbVec3f |
getObjectNormal(SoNode node)
Returns the surface normal in the object space corresponding to the given node in the path.
|
SbVec3f |
getObjectPoint()
Calls getObjectPoint((com.openinventor.inventor.nodes.SoNode)null).
|
SbVec3f |
getObjectPoint(SoNode node)
Returns the intersection point in the object space corresponding to the given node in the path.
|
SbVec4f |
getObjectTextureCoords()
Calls getObjectTextureCoords((com.openinventor.inventor.nodes.SoNode)null).
|
SbVec4f |
getObjectTextureCoords(SoNode node)
Returns the texture coordinates in the object space corresponding to the given node in the path.
|
SbMatrix |
getObjectToImage()
Calls getObjectToImage((com.openinventor.inventor.nodes.SoNode)null).
|
SbMatrix |
getObjectToImage(SoNode node)
Returns the texture transformation matrix between the object space and image space corresponding to the given node in the path.
|
SbMatrix |
getObjectToWorld()
Calls getObjectToWorld((com.openinventor.inventor.nodes.SoNode)null).
|
SbMatrix |
getObjectToWorld(SoNode node)
Returns the transformation matrix between the object space and world space corresponding to the given node in the path.
|
SoPath |
getPath()
Returns the path to the object that was intersected.
|
SbVec3f |
getPoint()
Returns the intersection point in world space.
|
SbVec4f |
getTextureCoords()
Returns the texture coordinates in image space.
|
SbMatrix |
getWorldToObject()
Calls getWorldToObject((com.openinventor.inventor.nodes.SoNode)null).
|
SbMatrix |
getWorldToObject(SoNode node)
Returns the transformation matrix between world space and the object space corresponding to the given node in the path.
|
boolean |
isOnGeometry()
Returns whether the intersection is actually on the geometry of the character that was hit, as opposed to being on the bounding box.
|
void |
setDetail(SoDetail detail,
SoNode node) |
void |
setMaterialIndex(int index) |
void |
setObjectNormal(SbVec3f normal) |
void |
setObjectTextureCoords(SbVec4f texCoords) |
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public SoPickedPoint()
public SoPickedPoint(SoPickedPoint pp)
public SoDetail getDetail()
public SbMatrix getObjectToWorld()
public SbVec3f getObjectPoint()
public SbMatrix getImageToObject()
public SbVec4f getObjectTextureCoords()
public SbVec3f getObjectNormal()
public SbMatrix getObjectToImage()
public SbMatrix getWorldToObject()
public SbVec3f getPoint()
public SbVec3f getObjectNormal(SoNode node)
public SoPickedPoint copy()
public void setObjectNormal(SbVec3f normal)
public SbMatrix getWorldToObject(SoNode node)
public void setObjectTextureCoords(SbVec4f texCoords)
public SbMatrix getObjectToWorld(SoNode node)
public SbMatrix getImageToObject(SoNode node)
public SbVec3f getObjectPoint(SoNode node)
public SbVec4f getObjectTextureCoords(SoNode node)
public SbMatrix getObjectToImage(SoNode node)
public int getMaterialIndex()
public SoPath getPath()
public SbVec3f getNormal()
SoRayPickAction
. If normal vectors are disabled, this method returns 0,0,0.public SbVec4f getTextureCoords()
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.public void setMaterialIndex(int index)
public SoDetail getDetail(SoNode node)
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.
public boolean isOnGeometry()
SoPickStyle
) affects this decision.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com