SBCYLINDERPROJECTOR(3iv)

πŸ’– SbCylinderProjector β€” cylinder projector πŸ’–

okay bestie, this one's from the 3IV manual and it is lowkey a whole legend β€” it's the abstract base-class blueprint for projectors that do their thing with a cylinder. let's get into it ✨


🌸 INHERITS FROM 🌸

SbProjector > SbCylinderProjector

so yeah, it's giving "child of SbProjector" energy. the family tree is real 🫢


✨ SYNOPSIS ✨

#include <Inventor/projectors/SbCylinderProjector.h>

Methods from class SbCylinderProjector:

                      ~SbCylinderProjector()
  SbVec3f             projectAndGetRotation(const SbVec2f &point, SbRotation
                           &rot)
  virtual SbRotation  getRotation(const SbVec3f &point1, const SbVec3f
                           &point2)
  void                setCylinder(const SbCylinder &cyl)
  const SbCylinder &  getCylinder() 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:

  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 SbCylinderProjector is an abstract base class for projectors that use a cylinder in their projection. that's the vibe. πŸ’…

the tea on getRotation(): for any SbCylinderProjector it will always hand you back a rotation that's about the axis of the cylinder. no cap, always.

and like, who actually uses this? cylinder projectors are typically the move when you're writing interactive 3D manipulators and viewers. main character energy fr fr πŸ‘‘


πŸ’… METHODS πŸ’…

~SbCylinderProjector()

Destructor. that's it, that's the whole thing. bye bestie 😭

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

apply the projector using the given point, and it returns the point in three dimensions that it projects to. bonus: it also returns in rot a rotation about the axis of the cylinder, going from the last projected point to this one. πŸŒ€

heads up: the point you pass should be normalized (i.e. lie in the range [0.0,1.0]), with (0,0) at the lower-left.

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

get a rotation given two points on this cylinder projector. the rotation will be about the axis of the cylinder. simple as that ✨

void setCylinder(const SbCylinder &cyl) / const SbCylinder & getCylinder() const

set and get the cylinder on which to project points. the default cylinder is aligned with the Y axis and has radius 1.0. πŸŽ€

void setOrientToEye(SbBool orientToEye) / SbBool isOrientToEye() const

set and get whether the projector should always be oriented towards the eye. set it to FALSE if the tolerance should be evaluated in working space. πŸ‘€

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 cylinder that faces the eye. set it to FALSE if the projector should intersect with the rear half instead. πŸ”„


🫢 SEE ALSO 🫢

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

the whole projector friend group, honestly. go say hi 🌈


and that's the whole page, bestie!! πŸŽ€ this was the SbCylinderProjector(3IV)() manual, straight from the 3IV source β€” mwah, obsessed πŸ’–βœ¨