SbCylinder(3)
β¨ SbCylinder β NAME β¨
ok so SbCylinder is literally just a representation of a cylinder π like that's it, that's the whole vibe. it's from the Coin manual, section 3, and bestie it's giving geometry-class-that-ate.
π SYNOPSIS π
#include <Inventor/SbCylinder.h>
π Public Member Functions
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 πΈ
SbCylinder is a representation of a cylinder. no cap. π«Ά
she gets used inside other classes in Coin, and what she carries is the data you need to describe a cylinder: an axis and a radius. and here's the iconic part β there is no length or height value at all, which means this cylinder is treated as being of infinite length β¨ like she goes on forever, main character energy fr.
heads up bestie: infinite length is not a drill. if you're picturing a cute little can of soup, adjust your mental image. π₯«β‘οΈβΎοΈ
See also SbLine, SbSphere β go say hi to the siblings, they're all in the same friend group π
π¦ Constructor & Destructor Documentation π¦
SbCylinder::SbCylinder (void )
the default constructor is gonna make you a cylinder with radius 1, and the center axis goes through origo in the parallel direction of the positive y-axis. so she's standing straight up, dead center, radius one. slay π
SbCylinder::SbCylinder (const SbLine & a, const float r)
constructs AND initializes an SbCylinder instance with the axis a and radius r you hand her. build-a-cylinder workshop π§
β Member Function Documentation β
void SbCylinder::setValue (const SbLine & a, const float r)
sets both the axis and the radius of the cylinder, one call, two jobs, efficient queen π
See also getAxis(), getRadius().
void SbCylinder::setAxis (const SbLine & a)
sets the center axis of the cylinder. that's the whole thing, just the axis. π―
See also setRadius(), getAxis().
void SbCylinder::setRadius (const float r)
sets the radius of the cylinder. width check, but make it permanent π
See also setAxis(), getRadius().
const SbLine & SbCylinder::getAxis (void ) const
returns the line that is the center axis of the cylinder. read-only, no touchy, she's just showing you the axis π
See also setAxis(), getRadius().
float SbCylinder::getRadius (void ) const
returns the radius of the cylinder. just the number. short and sweet, we love a concise king π
See also setRadius(), getAxis().
SbBool SbCylinder::intersect (const SbLine & l, SbVec3f & intersection) const
finds the intersection point where the ray l enters the cylinder, and returns that point in intersection. π―
if the ray does NOT intersect the cylinder, FALSE is returned β otherwise you get TRUE back. simple as that bestie.
SbBool SbCylinder::intersect (const SbLine & l, SbVec3f & enter, SbVec3f & exit) const
finds both intersection points of the ray l on the cylinder and returns them in enter and exit. and if the ray just "grazes" the cylinder, the enter and exit points will have equal values β like a little tangent kiss, we've all been there π
if the ray does NOT intersect the cylinder, FALSE is returned β otherwise TRUE comes back to you.
void SbCylinder::print (FILE * fp) const
dumps the state of this object to the fp file stream. π
β οΈ okay so important: this ONLY WORKS IN THE DEBUG VERSION of the library. in an optimized build, the method does absolutely nothing. so if you're printing into the void and getting silence back... yeah, that's why, she's not ghosting you on purpose π
π Author π
generated automatically by Doxygen for Coin from the source code. she didn't write herself, but she definitely has main character energy π β¨
okay bye bestie, go build a very long cylinder π
Version 4.0.10 β Thu Jun 25 2026 00:00:00 β that's the Coin era this page was born in, and the SbCylinder(3) energy stays iconic forever π¦ππ
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms