SBSPHEREPROJECTOR(3iv)

πŸ’– SbSphereProjector(3IV) β€” the sphere projector glow-up πŸ’–

okay bestie, sit down, hydrate, and let's talk about SbSphereProjector from the 3IV manual. she's abstract, she's spherical, she's the blueprint other projectors wish they were. this page is literally her whole personality. ✨


πŸŽ€ NAME πŸŽ€

SbSphereProjector β€” sphere projector, no cap 🫢


🌸 INHERITS FROM 🌸

she's got a whole family tree, and the vibes are immaculate:

  • SbProjector > SbSphereProjector

so SbProjector is the parent, and our girl is the child. main character energy runs in the bloodline, fr fr. πŸ‘‘


✨ SYNOPSIS ✨

first things first, you gotta pull her in:

#include <Inventor/projectors/SbSphereProjector.h>

then here's everything she brings to the group chat.

Methods from class SbSphereProjector

SbVec3f             projectAndGetRotation(const SbVec2f &point, SbRotation
                         &rot)
virtual SbRotation  getRotation(const SbVec3f &point1, const SbVec3f
                         &point2)
void                setSphere(const SbSphere &sph)
const SbSphere &    getSphere() const
void                setOrientToEye(SbBool orientToEye)
SbBool              isOrientToEye() const
void                setFront(SbBool isFront)
SbBool              isFront() const
SbBool              isPointInFront(const SbVec3f &point) const

Methods from class SbProjector

the inherited hand-me-downs, and honestly? iconic:

virtual SbVec3f        project(const SbVec2f &point)
virtual void           setViewVolume(const SbViewVolume &vol)
const SbViewVolume &   getViewVolume() const
virtual void           setWorkingSpace(const SbMatrix &space)
const SbMatrix &       getWorkingSpace() const
virtual SbProjector *  copy() const

πŸ’… DESCRIPTION πŸ’…

so SbSphereProjector is an abstract base class β€” meaning you don't instantiate her directly, she's the template, the blueprint, the it-girl that other classes are built from. πŸ’€ she's for projectors that use a sphere in their projection. sphere projectors are typically used to write interactive 3D manipulators and viewers. that's her whole thing. that's the assignment and she ate. πŸ”₯


πŸ¦‹ METHODS πŸ¦‹

SbVec3f projectAndGetRotation(const SbVec2f &point, SbRotation &rot)

apply the projector using the given point, and she hands back the point in three dimensions that it projects to. and not only that β€” she also returns in rot a rotation on the surface of the sphere from the last projected point to this one. the passed point should be normalized (i.e. lie in the range [0.0,1.0]), with (0,0) at the lower-left. so like, know your coordinate grid bestie, don't just be out here passing raw numbers. πŸ™ˆ

virtual SbRotation getRotation(const SbVec3f &point1, const SbVec3f &point2)

get a rotation given two points on this sphere projector. the rotation will be on the surface of the sphere. two points in, one rotation out. that's the trade. ✨

void setSphere(const SbSphere &sph)

const SbSphere & getSphere() const

set and get the sphere on which to project points. the default sphere has radius 1.0 β€” yes, just 1.0, that's the vibe out of the box. πŸŽ€

void setOrientToEye(SbBool orientToEye)

SbBool isOrientToEye() const

set and get whether the projector should always be oriented towards the eye. set to FALSE if the tolerance should be evaluated in working space. so flip that bool when you want the working-space treatment, iykyk. πŸ‘€

void setFront(SbBool isFront)

SbBool isFront() const

SbBool isPointInFront(const SbVec3f &point) const

set and get whether the projector should intersect the half of the sphere that faces the eye. set to FALSE if the projector should intersect with the rear half instead. front half or back half, you pick, she supports both. front-facing is the default aesthetic but the rear half is right there if you need it. πŸ’œ


🌈 SEE ALSO 🌈

her whole extended friend group, all of them also slaying:

  • SbCylinderProjector
  • SbCylinderPlaneProjector
  • SbCylinderSectionProjector
  • SbCylinderSheetProjector
  • SbLineProjector
  • SbPlaneProjector
  • SbSpherePlaneProjector
  • SbSphereSectionProjector
  • SbSphereSheetProjector

and that's the whole page, bestie!! πŸ₯ΉπŸ’–

oh and before you go β€” the footer of this little doc reads SbSphereProjector(3IV)(), so shoutout to the SbSphereProjector(3IV) source and version tag with that lil empty date field. she's timeless, literally. go project something gorgeous. πŸ’…βœ¨πŸ¦‹