Function: moveAnnotationToViewPlane()
moveAnnotationToViewPlane(
annotation
,viewport
):Annotation
Moves an annotation to the current view plane by projecting its points onto the plane. For each point in the annotation, calculates the projected distance from the focal point to the point along the view plane normal, then moves the point by that distance in the opposite direction of the normal to place it on the view plane.
Parameters
• annotation: Annotation
The annotation to move to the view plane
• viewport: Viewport
The viewport containing the view plane to move to
Returns
The modified annotation with points projected onto the view plane