05/07/09 18:50:47
Java3Dって確かノード(プリミティブやShape3D)単位でのピッキングの機能があったけど、一歩進んでポリゴン単位のピッキングってできないのかな。
URLリンク(javadesktop.org)
の
PickTool.GEOMETRY_INTERSECT_INFO -is the same as GEOMETRY, but the the PickResult will also include information on each intersection of the pick shape with the geometry.
The intersection information includes the sub-primitive picked (that is, the point, line, triangle or quad), the closest vertex to the center of the pick shape,
and the intersection's coordinate, normal, color and texture coordinates.
To allow this information to be generated, Shape3D and Morph nodes must have the ALLOW_GEOMETRY_READ capability set and GeometryArrays must have the ALLOW_FORMAT_READ,
ALLOW_COUNT_READ, and ALLOW_COORDINATE_READ capabilities set, plus the ALLOW_COORDINATE_INDEX_READ capability for indexed geometry.
To inquire the intersection color, normal or texture coordinates the corresponding READ capability bits must be set on the GeometryArray.
あたりの記述にヒントがありそうなんだが・・・漏れの頭じゃいまいち分からない。
賢者のどなたか教えてくれまいか?