Pixel.HitProps Interface

Describes a subset of HitDetailProps computed from a Pixel.Data, suitable for constructing a HitDetail. For example, the following function creates a HitDetail from a Pixel.Data and other hit information:

 function makeHitDetail(pixel: Pixel.Data, viewport: ScreenViewport, testPoint: Point3d, hitSource: HitSource, hitPoint: Point3d, distXY: number): HitDetail {
   return new HitDetail({
     ...pixel.toHitProps(viewport),
     viewport, testPoint, hitSource, hitPoint, distXY,
   };
 }

@see toHitProps to convert a Pixel.Data to a HitProps.

Properties

Name Type Description
distFraction number The distance in view coordinates between the hit and the near plane.  
geometryClass GeometryClass | undefined The class of the hit geometry.  
modelId string | undefined The Id of the ModelState from which the hit originated.  
priority HitPriority The hit geometry priority/classification.  
sourceId string The source of the geometry.  
subCategoryId string | undefined The SubCategory to which the hit geometry belongs.  
viewAttachment ViewAttachmentHitInfo | undefined Information about the ViewAttachment within which the hit geometry resides, if any.  

Defined in

Last Updated: 13 May, 2024