SbCylinder(3)

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

πŸ’– 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) 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. 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