glePolyCylinder(3GLE)

✨ glePolyCylinder ✨

okay bestie, so this is a page from the GLE manual (that's the manual name, iykyk) and it's all about glePolyCylinder β€” drawing polycylinders, specified as a polyline. sit down, grab a strawberry drink πŸ“, we're doing graphics.


🌸 SYNTAX 🌸

void glePolyCylinder(int npoints,
                     gleDouble point_array[][3],
                     float color_array[][3],
                     gleDouble radius);

πŸ’… ARGUMENTS πŸ’…

  • npoints β€” numpoints in poly-line. literally just how many points are in your polyline, no cap.
  • point_array β€” polyline vertices. the actual points, in 3D, [][3] style.
  • color_array β€” colors at polyline verts. the color for each vertex. πŸŽ€
  • radius β€” cylinder radius. how thicc the tube is. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

Draw polycylinder, specified as a polyline. that's the whole vibe. 🫢

not me about to deliver the most important plot twist: neither the very first segment, nor the very last segment are drawn. 😭

The first and last segments serve only to define the angle of the join at the very ends of the polyline. so they're not there for looks, they're there for geometry. Thus, to draw one segment, three must be specified. To draw two segments, four must be specified, etc. the math is mathing, bestie. ✨

The color array may be NULL. If NULL, the current color is used. If not NULL, the glColor3f() routine is used to set the color; therefore, specifying the glColorMaterial() subroutine before this primitive can be used to set diffuse, specular, ambient, etc. colors. highkey flexible. πŸ”₯

By default, the cross-section of the cylinder is drawn as a 20-sided polygon. This number can be changed using the gleSetNumSides() routine. twenty sides is the default, periodt. πŸ‘‘


🌈 SEE ALSO 🌈

  • glePolyCone
  • gleSetNumSides

πŸ‘‘ AUTHOR πŸ‘‘

Linas Vepstas (linas@linas.org) β€” the icon, the moment, the main character who wrote this. πŸ’œ


k that's the whole page, bestie, you're so ready. this was GLE version 3.0 of glePolyCylinder(3GLE) β€” slay, bye πŸ’…πŸ§šβœ¨