Curve Thickness

Hello all,



I have been able to create some curves by extending the Curve Class and all is well. However, I would like to change the thickness of the curve by passing a parameter – something like the linewidth in Line.



Can someone give me any tips on that?



thanks a lot

Cheers!

Abheek

hey there. a curve is not a geometry, however it can be drawn (internally uses a Line  ;)) width of lines are restricted by the graphics card … i have a GF 7900 and it can only draw lines with 10 pixels MAX …



If you want to draw a line along a curve, take a look at the two classes TrailMesh and Ribbon



search the forum.

Hi



Thanks for the info… I the following and it works!


   public void draw(Renderer r) {
      GL11.glLineWidth(linewidth); // linewidth = 2.0f
      super.draw(r);
      GL11.glEnd();
   }



basically override the draw function and set the linewidth in GL...

It could be a hack but i since Line also does it the same way we can make some changes to the Renderer implementations to include this functionality!

Thanks dhdd --
Cheers!

Also be aware that those points and lines are always the same size, they do not take perspective into account when rendering.

The Line will always be x Pixel wide, no matter how far away from the line you are.