S3D_PEP_LINE_NORMALS(3)

✨ S3D_PEP_LINE_NORMALS ✨

okay so bestie, welcome to the s3d manual, section 3 πŸŽ€ β€” today's main character is s3d_pep_line_normals, and she's literally the glow-up your lines have been begging for πŸ’…


🌸 NAME 🌸

s3d_pep_line_normals β€” add normals to lines πŸ¦‹


⭐ SYNOPSIS ⭐

#include <s3d.h>

int s3d_pep_line_normals(int object, const float *nbuf, uint16_t n);

πŸ’– DESCRIPTION πŸ’–

So what she does is: she adds normal information to lines, giving every single vertex of a line its own normal info. And like… it makes lines somewhat nicer?? Yes. Lowkey a whole vibe upgrade. You'll especially need this when you're out here building wireframe models β€” that's the moment it really eats πŸ”₯

Now the important part, no cap: nbuf should contain n * 6 float values. Why six? Because for each vertex you give a normal vector (x,y,z) β€” that's three floats β€” and you've got 2 vertices for each line, so that's 6 float values per line in total. Math girlie behavior, we love to see it πŸ’€βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich

  • Author of s3d 🫢

and that's the whole page, periodt πŸ’œ this was the s3d manual, S3D_PEP_LINE_NORMALS(3) β€” go forth and give your lines some normal main character energy, bestie πŸŒˆπŸ’–