S3D_OBJ_INFO(9)

πŸ’– S3D_OBJ_INFO(9) πŸ’–

okay bestie, pull up a chair, we're reading the s3d manual page for S3D_OBJ_INFO(9) together and honestly? it's short, it's sweet, it's giving "tiny struct, big responsibilities" 🫢


✨ NAME ✨

s3d_obj_info β€” object information, aka the lil info packet that tells you everything about an object πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <s3d.h>

that's it. that's the whole include. slay.


πŸ¦‹ STRUCTURE MEMBERS πŸ¦‹

here's the struct in all its glory, no cap, every single field exactly as it is:

struct s3d_obj_info {
     uint32_t object;
     uint32_t flags;
     float trans_x;
     float trans_y;
     float trans_z;
     float rot_x;
     float rot_y;
     float rot_z;
     float scale;
     float r;
     char name;
}

🌸 DESCRIPTION 🌸

so like, you can use this on the buffer of an event of type S3D_EVENT_OBJ_INFO. that's the whole vibe check right there. ✨

now for name β€” for your usual, regular, everyday objects it will usually contain nothing, like genuinely nothing, it's giving empty. but for mcp objects it's gonna contain the application's name right here. so if you're an mcp you get to have a name, main character energy fr fr. πŸ‘‘

and r? r is the radius of the convex sphere of an object. yes bestie, a convex sphere. and plot twist β€” this one is also gonna be interesting for the mcp too. πŸ“

okay now the special objects, the celebs of the scene: things like camera and pointer will have the "sys_" prefix in the name, and they'll be named "pointer0", "pointer1" ... or "cam0", "cam1" ... you get the pattern, it's giving numbered besties. 🌈

and one more thing, for a cam object specifically: scale will contain the aspect ratio. iconic. don't forget it. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich

  • Author of s3d

lowkey the whole page is like 4 paragraphs and a struct and yet it ate. πŸ’– keep those field names exact when you're using them, bestie, i'm literally begging. πŸ™ˆ

and that's the whole thing!! this page is from the s3d manual, page S3D_OBJ_INFO(9), written by Simon Wunderlich, the author of s3d β€” mwah, tysm for reading, go forth and inspect your objects πŸ’œπŸ§šβœ¨