摘要 |
PURPOSE:To specify part of a three-dimensional shape by obtaining a Z coordinate from picked X and Y coordinates and then searching for a segment where a polygon which contains the pick point belongs by a specific method, and thus selecting the picked segment. CONSTITUTION:The three-dimensional coordinate values of the pick point are obtained from a Z coordinate value left in an area of a Z buffer 103 corresponding to X and Y coordinate values at the time of display processing by implicit- surface elimination based upon the X and Y coordinate of the picking on a screen. Then, sign bits obtained by subtracting the X-Z coordinate values of the pick point from the X-Z coordinate values of the vertexes of respective polygons in a primitive set and sign bits obtained by subtracting the coordinate values of the vertexes from the pick point coordinate values are stored in specific bits of flags consisting of 6-bit areas, and the flags as to all vertexes of the individual polygons are ANDed. Then a pane system for a plane containing a polygon whose AND result is zero is found to check whether the pick point is contained or not in detail.
|