SbSphere(3)

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

🌸 NAME 🌸

okay bestie, so SbSphere β€” the SbSphere class is a representation of a sphere. that's it, that's the vibe. a whole sphere. iconic πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/SbLinear.h>

🫢 Public Member Functions

  • SbSphere (void)
  • SbSphere (const SbVec3f &center, const float radius)
  • void setValue (const SbVec3f &center, const float radius)
  • void setCenter (const SbVec3f &center)
  • void setRadius (const float radius)
  • const SbVec3f & getCenter (void) const
  • float getRadius (void) const
  • void circumscribe (const SbBox3f &box)
  • SbBool intersect (const SbLine &l, SbVec3f &intersection) const
  • SbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const
  • SbBool pointInside (const SbVec3f &p) const
  • void print (FILE *file) const

🌈 Detailed Description 🌈

The SbSphere class is a representation of a sphere. no cap.

This class is used within many other classes in Coin. It contains the data necessary to represent a sphere β€” literally just a 3D point and a radius. that's the whole personality. and honestly? it eats. πŸ”₯

See also

  • SbCylinder

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SbSphere::SbSphere (void )

The default constructor does nothing. not a single thing. the center point and the radius will be uninitialized. 🫠 so like… she's awake but she's not ready, yk? please give her some values before you start asking her questions.

SbSphere::SbSphere (const SbVec3f & centerarg, const float radiusarg)

Construct an SbSphere instance with the given center point and radius. now she's fully formed, slay. ✨


πŸ¦‹ Member Function Documentation πŸ¦‹

void SbSphere::setValue (const SbVec3f & centerarg, const float radiusarg)

Set the sphere's center point and radius. two birds, one glow-up. πŸ’…

See also

  • getCenter(), getRadius().

void SbSphere::setCenter (const SbVec3f & centerarg)

Set the sphere's center point. just the center, bestie. one thing at a time.

See also

  • setValue(), setRadius() and getCenter().

void SbSphere::setRadius (const float radiusarg)

Set the sphere's radius. how big is she? you decide. 🌸

See also

  • setValue(), setCenter() and getRadius().

const SbVec3f & SbSphere::getCenter (void ) const

Returns an SbVec3f with the sphere's center point. where is she located, spiritually and also mathematically. πŸ“

See also

  • setCenter(), getRadius().

float SbSphere::getRadius (void ) const

Returns the sphere's radius. a single float. the whole measurement of her reach. 🌐

See also

  • setRadius(), getCenter().

void SbSphere::circumscribe (const SbBox3f & box)

Make the sphere exactly contain box, i.e. the sphere center point will be the same as that of the box, and the radius will be the distance from the box center point to any of the corners. so she just swallows the whole box. girl ate. 😌

SbBool SbSphere::intersect (const SbLine & l, SbVec3f & intersection) const

Finds the intersection enter point for the given line l on the sphere.

If the line does not intersect the sphere, FALSE is returned. πŸ’€

SbBool SbSphere::intersect (const SbLine & l, SbVec3f & enter, SbVec3f & exit) const

Find the intersection points of the ray l on the sphere and return these in enter and exit. If the ray just "grazes" the sphere, the enter and exit points have equal values. a lil kiss on the surface, if you will. 😭

If the ray does not intersect the sphere, FALSE is returned, otherwise we will return TRUE. no in-between, fr fr.

SbBool SbSphere::pointInside (const SbVec3f & p) const

Returns TRUE of the given point p lies within the sphere. is she in the circle of trust? yes or no. 🫢

void SbSphere::print (FILE * fp) const

Dump the state of this object to the file stream.

⚠️ okay important: this only works in the debug version of the library. in an optimized compile, the method does nothing. not "prints less", not "prints differently" β€” literally nothing. so don't be out here debugging with it and getting confused, bestie. πŸ™ˆ

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. so like, not a human, a robot wrote this, and honestly it understood the assignment. πŸ€–πŸ’–


and that's the whole page!! this one came from Coin, Version 3.1.3, and yeah β€” SbSphere(3) is the page, the manual name, all of it. thanks for reading, ily, go build a sphere. πŸ¦‹βœ¨

πŸ“¦ where this page comes from