RhinoCommon API
PickContextPickFrustumTest Method (Mesh, PickContextMeshPickStyle, Point3d, Point2d, Point2d, Double, Double, PickContextMeshHitFlag, Int32) |
Utility for picking meshes
Namespace: Rhino.Input.Custom
Assembly: RhinoCommon (in RhinoCommon.dll)

public bool PickFrustumTest( Mesh mesh, PickContextMeshPickStyle pickStyle, out Point3d hitPoint, out Point2d hitSurfaceUV, out Point2d hitTextureCoordinate, out double depth, out double distance, out PickContextMeshHitFlag hitFlag, out int hitIndex )
Public Function PickFrustumTest ( mesh As Mesh, pickStyle As PickContextMeshPickStyle, <OutAttribute> ByRef hitPoint As Point3d, <OutAttribute> ByRef hitSurfaceUV As Point2d, <OutAttribute> ByRef hitTextureCoordinate As Point2d, <OutAttribute> ByRef depth As Double, <OutAttribute> ByRef distance As Double, <OutAttribute> ByRef hitFlag As PickContextMeshHitFlag, <OutAttribute> ByRef hitIndex As Integer ) As Boolean
Parameters
- mesh
- Type: Rhino.GeometryMesh
mesh to test - pickStyle
- Type: Rhino.Input.CustomPickContextMeshPickStyle
mode used for pick test - hitPoint
- Type: Rhino.GeometryPoint3d
location returned here for point picks - hitSurfaceUV
- Type: Rhino.GeometryPoint2d
If the mesh has surface parameters, set to the surface parameters of the hit point - hitTextureCoordinate
- Type: Rhino.GeometryPoint2d
If the mesh has texture coordinates, set to the texture coordinate of the hit point. Note that the texture coodinates 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
- Type: SystemDouble
depth returned here for point picks LARGER values are NEARER to the camera. SMALLER values are FARTHER from the camera. - distance
- Type: SystemDouble
planar distance returned here for point picks. SMALLER values are CLOSER to the pick point - hitFlag
- Type: Rhino.Input.CustomPickContextMeshHitFlag
For point picks, How to interpret the hitIndex (vertex hit, edge hit, or face hit) - hitIndex
- Type: SystemInt32
index of vertex/edge/face that was hit. Use hitFlag to determine what this index corresponds to
Return Value
Type: Boolean[Missing <returns> documentation for "M:Rhino.Input.Custom.PickContext.PickFrustumTest(Rhino.Geometry.Mesh,Rhino.Input.Custom.PickContext.MeshPickStyle,Rhino.Geometry.Point3d@,Rhino.Geometry.Point2d@,Rhino.Geometry.Point2d@,System.Double@,System.Double@,Rhino.Input.Custom.PickContext.MeshHitFlag@,System.Int32@)"]

Rhino for Mac
Supported in: 5.4Rhino for Windows
Supported in: 6.14