import javax.media.j3d.Appearance;
import javax.media.j3d.PolygonAttributes;
import javax.media.j3d.ColoringAttributes;
import com.sun.j3d.utils.geometry.Cylinder;
import javax.media.j3d.Node;
import javax.media.j3d.Shape3D;

/**
This class creates the circle of a layer
*/
public class CircleCreator
{
/**
Creates a new circle by using the cylinder class from java3d utils.
The circle is cylinder with line poligone attributes and a height ->0

@radius The radius of the circle
@return The circle node which could be put in the Scene3D
*/	

public final float CIRCLE_HEIGHT = 0.001f;
public final  int CIRCLE_POLYGONES = 50;
public final Appearance CIRCLE_APPEARANCE = new Appearance();

public Node getCircle(float radius)
        {
        //make normal cylinder
        Cylinder cyl = new Cylinder(radius, CIRCLE_HEIGHT, Cylinder.BOTTOM, CIRCLE_POLYGONES,1, CIRCLE_APPEARANCE);
        //get only the Body shape of the cylinder
        Shape3D shape = cyl.getShape(Cylinder.BODY);
        Node clone = shape.cloneNode(true);
        return clone;	
        }
}