Sections

History

j3d.org

Arrows

S.P.Nath posted a simple arrow utility class to the java3d-interest list in response to some queries. He's allowed us to re-publish the code here for you to use.

The code is a simple file that draws arrows. The arrow class has a function that will return a TransformGroup node having the arrow below it. This is a 3D arrow and made up of two cones and a cylinder. The input parameters are arrow diameter, start point and end point.

As this uses cone objects, the number of polygons generated can be quite high. If you are populating large number of arrows in the scene, you should opt for a different way to represent the geometry so that it may be shared across branches.

Arrow.java The source file
Zipped The arrow file plus a test file to show it in action