SbCylinder(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– SbCylinder πŸ’–

okay bestie, so this is a page from the Library Functions Manual for SbCylinder(3), and honestly? it's giving geometry but make it cute. let's get into it πŸŽ€


✨ NAME ✨

SbCylinder β€” the SbCylinder class is a representation of a cylinder. that's it, that's the whole vibe. a cylinder. iconic. πŸ₯«


🌸 SYNOPSIS 🌸

first things first, you gotta pull it in:

#include <Inventor/SbLinear.h>

πŸ¦‹ Public Member Functions πŸ¦‹

here's the whole squad, no gatekeeping:

SbCylinder (void)
SbCylinder (const SbLine &a, const float r)
void setValue (const SbLine &a, const float r)
void setAxis (const SbLine &a)
void setRadius (const float r)
const SbLine & getAxis (void) const
float getRadius (void) const
SbBool intersect (const SbLine &l, SbVec3f &intersection) const
SbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const
void print (FILE *file) const

πŸ‘‘ Detailed Description πŸ‘‘

The SbCylinder class is a representation of a cylinder.

okay so here's the tea β˜• β€” this class is used within other classes in Coin, it's a whole supporting character. it contains data to represent a cylinder by an axis and a radius. and the way that it has no length/height value?? meaning it is treated as of infinite length. no cap. the cylinder just goes on forever and ever, main character energy fr fr 🌈

See also 🌟

SbLine, SbSphere β€” go read those too, bestie, they're all in the same friend group.


🧚 Constructor & Destructor Documentation 🧚

🌸 SbCylinder::SbCylinder (void )

The default constructor will make a cylinder of radius 1, center axis going through origo in the parallel direction of the positive y-axis. so you get a lil default bby cylinder for free, no effort required πŸ’…

🌸 SbCylinder::SbCylinder (const SbLine & a, const float r)

Construct and initialize an SbCylinder instance with the given axis a and radius r. you hand it the axis, you hand it the radius, and boom πŸ’₯ instant cylinder, custom made just for you.


πŸ’œ Member Function Documentation πŸ’œ

πŸ“ void SbCylinder::setValue (const SbLine & a, const float r)

Set the axis and radius of the cylinder. both at once, one call, efficiency queen ✨

See also getAxis(), getRadius().

πŸ“ void SbCylinder::setAxis (const SbLine & a)

Set the center axis of the cylinder. just the axis tho, radius stays doing its own thing.

See also setRadius(), getAxis().

πŸ“ void SbCylinder::setRadius (const float r)

Set the radius of the cylinder. skinny legend or thicc, you decide πŸŽ€

See also setAxis(), getRadius().

πŸ“ const SbLine & SbCylinder::getAxis (void ) const

Return the line which is the center axis of the cylinder. it hands you back the whole axis, const and everything.

See also setAxis(), getRadius().

πŸ“ float SbCylinder::getRadius (void ) const

Return radius of cylinder. short and sweet, literally just the number 🌟

See also setRadius(), getAxis().

πŸ“ SbBool SbCylinder::intersect (const SbLine & l, SbVec3f & intersection) const

Finds the intersection point of the ray l on the cylinder where the ray enters, and return this point in intersection. so like, where does this ray first touch the cylinder? that's your answer, bestie 🎯

If the ray does not intersect the cylinder, FALSE is returned, otherwise we will return TRUE. simple as that, no drama.

πŸ“ SbBool SbCylinder::intersect (const SbLine & l, SbVec3f & enter, SbVec3f & exit) const

Find the intersection points of the ray l on the cylinder and return these in enter and exit. so now you get BOTH ends β€” where it comes in and where it goes out πŸšͺ✨

If the ray just "grazes" the cylinder, the enter and exit points have equal values. like, barely touched it. grazing. respectfully 😭

If the ray does not intersect the cylinder, FALSE is returned, otherwise we will return TRUE.

πŸ“ void SbCylinder::print (FILE * fp) const

Dump the state of this object to the file stream. spill everything, no secrets πŸ’…

⚠️ okay important heads up: this Only works in debug version of library, method does nothing in an optimized compile. so if you're building optimized and wondering why nothing's printing… that's why, bestie, don't come for me πŸ™ˆ

🫢 Author 🫢

Generated automatically by Doxygen for Coin from the source code. so nobody hand-wrote this, the robots did it, and honestly? they ate πŸ€–βœ¨


and that's the whole page, no notes πŸ’– this was Coin, Version 3.1.3, and yeah it's the SbCylinder(3) page β€” thanks for reading all the way to the bottom, you're literally the best πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from