formZ SDK | 5.0 API Reference | Project | Modeling | Selection (Pick)

# fz_model_pick_get_pnts_world

Description

Retrieves world space coordinate of click locations for an item in the modeling Pick Buffer. This is the 3D point on the selected entity at the click point. For example, when a segment is selected, the value will be the 3D coordinate of the clicked location on the segment. These values are sensitive to grid and direction snaps. For example, when a segment is selected near the midpoint of the segment, and the midpoint snap is enabled, the point returned will be the midpoint of the segment.
If the selection was made using a non graphical pick, then an error is returned. Examples of non graphic picking are the Objects Palette, The Select By dialog, Select All, a plugin function call or an area pick.
If the pick method uses a single point, then wpt2 will be {0.0,0.0,0.0}. Otherwise it will be a valid 3D point. To determine if wpt2 is a valid pick point, use to get the screen coordiantes of the pick point. If they are valid (i.e. not {-1,-1}), then wpt2 is also valid.

Plugin Prototype

fzrt_error_td fz_model_pick_get_pnts_world(

fzrt_int | windex,
fzrt_int | pick_indx,
fz_xyz_td * | wpt1,
fz_xyz_td * | wpt2 )

Parameters

windex [Input]

project window index

pick_indx [Input]

index of item in pick buffer.

Range: pick_indx >= 0

Range: pick_indx < ()

wpt1 [Result, Optional]

world point for first click point or {0.0,0.0,0.0} if none

wpt2 [Result, Optional]

world point for second click point or {0.0,0.0,0.0} if none

Returns

MODEL_ERR_PICK_INVALID if non graphical pick.

Availability

5.0.0.0

See Also

Function Set

fz_model_fset

Defined in

fz_objt_api.h