SbCylinder(3)
π SbCylinder(3) π
okay bestie, welcome to the Library Functions Manual β this is the SbCylinder page, and honestly? it's giving geometry royalty. let's go π
β¨ NAME β¨
SbCylinder β the SbCylinder class is a representation of a cylinder.
πΈ SYNOPSIS πΈ
#include <Inventor/SbLinear.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) constfloat getRadius (void) constSbBool intersect (const SbLine &l, SbVec3f &intersection) constSbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) constvoid print (FILE *file) const
π¦ Detailed Description π¦
The SbCylinder class is a representation of a cylinder. no cap, that's the whole job.
This class is used within other classes in Coin. It contains data to represent a cylinder by an axis and a radius. and here's the plot twist: the cylinder has no length/height value, which means it is treated as of infinite length. it just goes on forever, main character energy, no beginning no end πβ¨
See also
SbLine,SbSphere
π§ 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 it's just. a lil guy. sitting at the origin. iconic.
References setValue().
SbCylinder::SbCylinder (const SbLine & a, const float r)
Construct and initialize an SbCylinder instance with the given axis a and radius r. you tell it who it is and it slays immediately.
References setValue().
π Member Function Documentation π
void SbCylinder::setValue (const SbLine & a, const float r)
Set the axis and radius of the cylinder. two-for-one glow up π
See also
getAxis(),getRadius().
References setAxis(), and setRadius().
Referenced by SbCylinder(), and SbCylinder().
void SbCylinder::setAxis (const SbLine & a)
Set the center axis of the cylinder. this is the spine of the whole operation, lowkey the most important part.
See also
setRadius(),getAxis().
References SbLine::getDirection(), SbVec3f::length(), and SoDebugError::postWarning().
Referenced by setValue().
void SbCylinder::setRadius (const float r)
Set the radius of the cylinder. thick or thin, your call bestie π«Ά
See also
setAxis(),getRadius().
References SoDebugError::postWarning().
Referenced by setValue().
const SbLine & SbCylinder::getAxis (void ) const
Return the line which is the center axis of the cylinder.
See also
setAxis(),getRadius().
Referenced by print().
float SbCylinder::getRadius (void ) const
Return radius of cylinder. that's it, that's the whole function, and honestly? respect.
See also
setRadius(),getAxis().
Referenced by print().
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.
If the ray does not intersect the cylinder, FALSE is returned, otherwise we will return TRUE. so basically a vibe check for whether the ray showed up at all π
References intersect().
Referenced by intersect().
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. If the ray just "grazes" the cylinder, the enter and exit points have equal values. like a little forehead kiss on the way past, no actual piercing π₯Ί
If the ray does not intersect the cylinder, FALSE is returned, otherwise we will return TRUE.
References SbVec3f::cross(), SbVec3f::dot(), SbLine::getDirection(), SbLine::getPosition(), SbVec3f::length(), SbVec3f::normalize(), and SoDebugError::postWarning().
void SbCylinder::print (FILE * fp) const
Dump the state of this object to the file stream. heads up though: only works in debug version of the library β method does nothing in an optimized compile. so if you're out here wondering why your optimized build is silent, that's why, not a skill issue, just a compile flag issue π
References getAxis(), getRadius(), and SbLine::print().
β Author β
Generated automatically by Doxygen for Coin from the source code. not a human, just a robot doing its lil thing π€π
π PSA before you go: that infinite-length thing is real. there is no height. don't go looking for one. the cylinder simply is.
and that's the page bestie!! mwah π«Ά this was Coin Version 2.5.0, SbCylinder(3), and yes the whole thing was literally auto-generated by Doxygen from the source code. slay. bye!! πβ¨π
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms