glePolyCone(3GLE)

πŸ’– glePolyCone β€” GLE manual, section 3GLE πŸ’–

okay bestie, gather round, because we're about to talk about glePolyCone from the GLE library (that's version 3.0, periodt) πŸŽ€


✨ NAME ✨

glePolyCone β€” draw a polycone, specified as a polyline with radii πŸ¦‹


🌸 SYNTAX 🌸

void glePolyCone(int npoints,
                 gleDouble point_array[][3],
                 float color_array[][3],
                 gleDouble radius_array[]);

πŸ’… ARGUMENTS πŸ’…

  • npoints β€” the numpoints in the poly-line, literally the headcount of your little vertex squad πŸ‘‘
  • point_array β€” polyline vertices. the actual points, bestie ✨
  • color_array β€” colors at the polyline verts 🌈
  • radius_array β€” the cone radii at the polyline πŸ“

🫢 DESCRIPTION 🫢

Draw a polycone, and you specify it as a polyline with radii. that's the whole vibe πŸ’œ

⚠️ not me about to tell you the wildest part β€” neither the very first segment, nor the very last segment get drawn. nope, they said "we're just here for the angle." The first and last segments serve only to define the angle of the join at the very ends of the polyline. so the way that math works out: to draw one segment, three must be specified. To draw two segments, four must be specified, etc. it's giving "you gotta give a little extra to get a little extra" 😭

The color array may be NULL. If it's NULL, the current color is used. If it is 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 a whole mood ✨

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, no cap πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

  • glePolyCylinder
  • gleSetNumSides

πŸ‘‘ AUTHOR πŸ‘‘

Linas Vepstas (linas@linas.org) β€” iconic behavior, we stan 🫢


and that's the whole page, bestie!! this was the GLE manual, 3.0, for the glePolyCone(3GLE) page β€” slay, go draw some cones, and remember: the first and last segments are just there for the angles πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ