PickContext

References
public class PickContext : IDisposable
Utility for determining if objects are picked

Constructors

PickContext

#Since v5.0
public PickContext()

Finalizer

~PickContext

#
~PickContext()

Properties

GetObjectUsed

#Since v5.0
public GetObject GetObjectUsed { get; }

PickGroupsEnabled

#Since v5.0
True if GroupObjects should be added to the pick list
public bool PickGroupsEnabled { get; set; }

PickLine

#Since v5.0
pick chord starts on near clipping plane and ends on far clipping plane.
public Line PickLine { get; set; }

PickMode

#Since v5.0
public PickMode PickMode { get; set; }

PickStyle

#Since v5.0
public PickStyle PickStyle { get; set; }

SubObjectSelectionEnabled

#Since v5.0
True if the user had activated sub-object selection
public bool SubObjectSelectionEnabled { get; set; }

View

#Since v5.0
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.
public RhinoView View { get; set; }

Methods

Dispose

#Since v5.0
public void Dispose()

Dispose

#
protected virtual void Dispose(
disposing
)

PickFrustumTest

#Since v5.0
public bool PickFrustumTest(
bezier,
out double
t,
out double
depth,
out double
distance
)

PickFrustumTest

#Since v5.0
Fast test to check if a bounding box intersects a pick frustum.
public bool PickFrustumTest(
box,
out bool
boxCompletelyInFrustum
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.
)
False if bounding box is invalid or box does not intersect the pick frustum

PickFrustumTest

#Since v5.0
public bool PickFrustumTest(
line,
out double
t,
out double
depth,
out double
distance
)

PickFrustumTest

#Since v5.0
Utility for picking meshes
public bool PickFrustumTest(
Mesh
mesh,
mesh to test
pickStyle,
mode used for pick test
out Point3d
hitPoint,
location returned here for point picks
out double
depth,
depth returned here for point picks LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera.
out double
distance,
planar distance returned here for point picks. SMALLER values are CLOSER to the pick point
hitFlag,
For point picks, How to interpret the hitIndex (vertex hit, edge hit, or face hit)
out int
hitIndex
index of vertex/edge/face that was hit. Use hitFlag to determine what this index corresponds to
)

PickFrustumTest

#Since v5.0
Utility for picking meshes
public bool PickFrustumTest(
Mesh
mesh,
mesh to test
pickStyle,
mode used for pick test
out Point3d
hitPoint,
location returned here for point picks
out Point2d
hitSurfaceUV,
If the mesh has surface parameters, set to the surface parameters of the hit point
out Point2d
hitTextureCoordinate,
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.
out double
depth,
depth returned here for point picks LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera.
out double
distance,
planar distance returned here for point picks. SMALLER values are CLOSER to the pick point
hitFlag,
For point picks, How to interpret the hitIndex (vertex hit, edge hit, or face hit)
out int
hitIndex
index of vertex/edge/face that was hit. Use hitFlag to determine what this index corresponds to
)

PickFrustumTest

#Since v5.0
public bool PickFrustumTest(
curve,
out double
t,
out double
depth,
out double
distance
)

PickFrustumTest

#Since v5.0
Utility for picking 3d point
public bool PickFrustumTest(
point,
out double
depth,
depth returned here for point picks. LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera.
out double
distance
planar distance returned here for point picks. SMALLER values are CLOSER to the pick point
)
true if there is a hit

PickFrustumTest

#Since v5.0
public bool PickFrustumTest(
points,
out int
pointIndex,
out double
depth,
out double
distance
)

PickFrustumTest

#Since v5.0
public bool PickFrustumTest(
cloud,
out int
pointIndex,
out double
depth,
out double
distance
)

PickMeshTopologyVertices

#Since v5.0
Utility for picking mesh vertices
public int[] PickMeshTopologyVertices(
Mesh
mesh
)
indices of mesh topology vertices that were picked

SetPickTransform

#Since v5.0
public void SetPickTransform(
transform
)

UpdateClippingPlanes

#Since v5.0
Updates the clipping plane information in pick region. The SetClippingPlanes and View fields must be called before calling UpdateClippingPlanes().
public void UpdateClippingPlanes()