+–com.sun.j3d.utils.picking.PickTool | +–com.sun.j3d.utils.picking.PickCanvas (Sri lanka web server) PickCanvas, a subclass of PickTool,

+–com.sun.j3d.utils.picking.PickTool | +–com.sun.j3d.utils.picking.PickCanvas PickCanvas, a subclass of PickTool, simplifies picking using mouse events from an AWT Canvas. This class allows picking using Canvasx,y locations by generating the appropriate pick shape. The pick tolerance specifies the distance from the pick center to include in the pick shape. A tolerance of 0.0 may slightly speed up picking, but also makes it very difficult to pick points and lines. The pick canvas can be used to make a series of picks; for example, to initialize the pick canvas, do the following: PickCanvas pickCanvas = new PickCanvas(canvas, scene); pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO); pickCanvas.setTolerance(4.0f); Then for each mouse event: pickCanvas.setShapeLocation(mouseEvent); PickResult[] results = pickCanvas.pickAll(); For the pickAllSortedor pickClosestmethods, the picks will be sorted by the distance from the ViewPlatformto the intersection point. 16.5 PickIntersection java.lang.Object | +–com.sun.j3d.utils.picking.PickIntersection PickIntersectionholds information about an intersection of a PickShapewith a Nodeas part of a PickResult. Information about the intersected geometry, intersected primitive, intersection point, and closest vertex can be queryed. The intersected geometry is indicated by an index into the list of geometry arrays on the PickResult. It can also be queryed from this object. The intersected primitive indicates which primitive out of the GeometryArraywas intersected (where the primitive is a point, line, triangle, or quad, not a com.sun.j3d.utils.geometry.Primitive). For example, the intersection would indicate which triangle out of a triangle strip was intersected. The methods which return primitive data will have one value if the primitive is a point, two values if the primitive is a line, three values if the primitive is a triangle, and four values if the primitive is quad. The primitive s VWorldcoordinates are saved when the intersection is calculated. The local coordinates, normal color, and texture coordinates for the primitive can also be queryed if they are present and readable. The intersection point is the location on the primitive which intersects the pick shape closest to the center of the pick shape. The intersection point s location in VWorldcoordinates is saved when the intersection is calculated. The local coordinates, and the normal, color, and texture coordinates of the intersection can be interpolated if they are present and readable. The closest vertex is the vertex of the primitive closest to the intersection point. The vertex index, VWorld coordinates, and local coordinates of the closest vertex can be queryed. The normal, color, and texture coordinate of the closest vertex can be queryed from the geometry array: 269
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Leave a Reply