PickContext
ReferencesUtility for determining if objects are picked
Constructors
public PickContext()
Finalizer
~PickContext
#~PickContext()
Properties
True if GroupObjects should be added to the pick list
pick chord starts on near clipping plane and ends on far clipping plane.
True if the user had activated sub-object selection
This view can be a model view or a page view. When view is a page view, then you need to distinguish between the viewports MainViewport() and ActiveViewport(). When m_view is a model view, both MainViewport() and ActiveViewport() return the world view's viewport.
Methods
public void Dispose()
public bool PickFrustumTest(BezierCurve bezier, out double t, out double depth, out double distance)
Parameters:
| bezier (BezierCurve) | |
| t (out double) | |
| depth (out double) | |
| distance (out double) |
Fast test to check if a bounding box intersects a pick frustum.
Parameters:
| box (BoundingBox) | |
| boxCompletelyInFrustum (out bool) | Set to true if the box is completely contained in the pick frustum. When doing a window or crossing pick, you can immediately return a hit if the object's bounding box is completely inside of the pick frustum. |
Returns: False if bounding box is invalid or box does not intersect the pick frustum
public bool PickFrustumTest(Mesh mesh, MeshPickStyle pickStyle, out Point3d hitPoint, out double depth, out double distance, out MeshHitFlag hitFlag, out int hitIndex)
Utility for picking meshes
Parameters:
| mesh (Mesh) | mesh to test |
| pickStyle (PickContext.MeshPickStyle) | mode used for pick test |
| hitPoint (out Point3d) | location returned here for point picks |
| depth (out double) | depth returned here for point picks LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera. |
| distance (out double) | planar distance returned here for point picks. SMALLER values are CLOSER to the pick point |
| hitFlag (out PickContext.MeshHitFlag) | For point picks, How to interpret the hitIndex (vertex hit, edge hit, or face hit) |
| hitIndex (out int) | index of vertex/edge/face that was hit. Use hitFlag to determine what this index corresponds to |
public bool PickFrustumTest(Mesh mesh, MeshPickStyle pickStyle, out Point3d hitPoint, out Point2d hitSurfaceUV, out Point2d hitTextureCoordinate, out double depth, out double distance, out MeshHitFlag hitFlag, out int hitIndex)
Utility for picking meshes
Parameters:
| mesh (Mesh) | mesh to test |
| pickStyle (PickContext.MeshPickStyle) | mode used for pick test |
| hitPoint (out Point3d) | location returned here for point picks |
| hitSurfaceUV (out Point2d) | If the mesh has surface parameters, set to the surface parameters of the hit point |
| hitTextureCoordinate (out Point2d) | If the mesh has texture coordinates, set to the texture coordinate of the hit point. Note that the texture coordinates can be set in many different ways and this information is useless unless you know how the texture coordinates are set on this particular mesh. |
| depth (out double) | depth returned here for point picks LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera. |
| distance (out double) | planar distance returned here for point picks. SMALLER values are CLOSER to the pick point |
| hitFlag (out PickContext.MeshHitFlag) | For point picks, How to interpret the hitIndex (vertex hit, edge hit, or face hit) |
| hitIndex (out int) | index of vertex/edge/face that was hit. Use hitFlag to determine what this index corresponds to |
Parameters:
| curve (NurbsCurve) | |
| t (out double) | |
| depth (out double) | |
| distance (out double) |
Utility for picking 3d point
Parameters:
| point (Point3d) | |
| depth (out double) | depth returned here for point picks. LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera. |
| distance (out double) | planar distance returned here for point picks. SMALLER values are CLOSER to the pick point |
Returns: true if there is a hit
public bool PickFrustumTest(PointCloud cloud, out int pointIndex, out double depth, out double distance)
Parameters:
| cloud (PointCloud) | |
| pointIndex (out int) | |
| depth (out double) | |
| distance (out double) |
Utility for picking mesh vertices
Parameters:
| mesh (Mesh) |
Returns: indices of mesh topology vertices that were picked
Parameters:
| transform (Transform) |
public void UpdateClippingPlanes()
Updates the clipping plane information in pick region. The SetClippingPlanes and View fields must be called before calling UpdateClippingPlanes().