
11.3 SelectVolumeCantextl Plug-in
673
The current view is retrieved.
M3dView view = M3dView::active3dView();
The world space position and direction of the initial position and current position
are calculated by using the vi ewT0W0rl d function.
view.viewToWorld( pressX, pressY, pressW, pressWV );
view.viewToWorld( dragX, dragY, dragW, dragWV );
The
i ntersectGround
function is called to calculate where the given world space rays
(origin and direction) hit the ground plane.
MPoint sphereCentre = intersectGround( pressW, pressWV );
MPoint sphereExtent = intersectGround( dragW, dragWV );
The distance, in world ...