SbSphereProjector(3)
SbSphereProjector π
okay bestie, gather round, because this is a manual page for SbSphereProjector(3) from the Library Functions Manual, and it's lowkey one of those abstract-base-class situations that sounds scary but is actually just vibes with math. sit down, grab a strawberry π, we're doing this.
β¨ NAME β¨
SbSphereProjector β the abstract base class for mapping to spherical surfaces. she's the blueprint, the blueprint-est blueprint. everything else in this family is her daughter. π
π¦ SYNOPSIS π¦
#include <Inventor/projectors/SbSphereProjector.h>
Inherits SbProjector.
Inherited by SbSphereSectionProjector, and SbSphereSheetProjector.
πΈ Public Member Functions πΈ
SbVec3f projectAndGetRotation(const SbVec2f &point, SbRotation &rot)virtual SbRotation getRotation(const SbVec3f &point1, const SbVec3f &point2) = 0void setSphere(const SbSphere &sph)const SbSphere & getSphere(void) constvoid setOrientToEye(const SbBool orienttoeye)SbBool isOrientToEye(void) constvoid setFront(const SbBool infront)SbBool isFront(void) constSbBool isPointInFront(const SbVec3f &point) constvirtual void setWorkingSpace(const SbMatrix &space)
π Public Member Functions inherited from SbProjector
virtual SbVec3f project(const SbVec2f &point) = 0virtual void setViewVolume(const SbViewVolume &vol)const SbViewVolume & getViewVolume(void) constconst SbMatrix & getWorkingSpace(void) constvirtual SbProjector * copy(void) const = 0
π Protected Member Functions π
SbSphereProjector(const SbBool orienttoeye)SbSphereProjector(const SbSphere &s, const SbBool orienttoeye)SbBool intersectSphereFront(const SbLine &l, SbVec3f &result)
π Protected Member Functions inherited from SbProjector
SbProjector(void)virtual ~SbProjector()SbLine getWorkingLine(const SbVec2f &point) constfloat findVanishingDistance(void) constSbBool verifyProjection(const SbVec3f &projpt) const
π Protected Attributes π
SbBool intersectFrontSbSphere sphereSbBool orientToEyeSbBool needSetupSbVec3f lastPoint
π Protected Attributes inherited from SbProjector
SbViewVolume viewVolSbMatrix worldToWorkingSbMatrix workingToWorld
π Detailed Description π
The SbSphereProjector class is the abstract base class for mapping to spherical surfaces.
The sphere projectors map 2D points to various surface types based on spherical shapes. that's the whole gig. 2D in, sphere-y 3D out, no cap. π«Ά
See also
SbCylinderProjector
π§ Constructor & Destructor Documentation π§
π SbSphereProjector::SbSphereProjector(const SbBool orienttoeye) [protected]
Default constructor sets up a sphere at the origin with radius 1. cute, simple, iconic. π«
References intersectFront, lastPoint, needSetup, orientToEye, and sphere.
Referenced by getRotation(), SbSphereSheetProjector::SbSphereSheetProjector(), and SbSphereSheetProjector::SbSphereSheetProjector().
π SbSphereProjector::SbSphereProjector(const SbSphere & s, const SbBool orienttoeye) [protected]
Constructor taking an explicit sphere projection definition. you bring the sphere, she brings the projection. β¨
References intersectFront, lastPoint, needSetup, orientToEye, and sphere.
π Member Function Documentation π
πΈ SbVec3f SbSphereProjector::projectAndGetRotation(const SbVec2f & point, SbRotation & rot)
Project the 2D point to a 3D coordinate on the spherical surface, and find the rotation from the last projection to this one. so she remembers where you were last time and tells you how to spin to where you are now. main character energy fr. π₯
See also
project(),getRotation()
References getRotation(), lastPoint, and SbProjector::project().
πΈ virtual SbRotation SbSphereProjector::getRotation(const SbVec3f & point1, const SbVec3f & point2) [pure virtual]
Returns rotation on the projection surface which re-orients point1 to point2. pure virtual, bestie β you literally cannot instantiate this one, the subclasses have to do the work. π
Implemented in SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.
References getSphere(), intersectSphereFront(), isFront(), isOrientToEye(), isPointInFront(), SbSphereProjector(), setFront(), setOrientToEye(), and setSphere().
Referenced by projectAndGetRotation().
πΈ void SbSphereProjector::setSphere(const SbSphere & sph)
Set sphere to project onto. pick your sphere, girl. π
References needSetup, and sphere.
Referenced by getRotation().
πΈ const SbSphere & SbSphereProjector::getSphere(void) const
Returns projection sphere.
References sphere.
Referenced by getRotation().
πΈ void SbSphereProjector::setOrientToEye(const SbBool orienttoeye)
Sets whether or not the projection surface should be oriented towards the eye of the viewer. Default is TRUE. ποΈβ¨
References needSetup, and orientToEye.
Referenced by getRotation().
πΈ SbBool SbSphereProjector::isOrientToEye(void) const
Returns the state of the sphere orientation flag. yes/no, do we face the eyeballs. π
References orientToEye.
Referenced by getRotation(), and SbSphereSheetProjector::project().
πΈ void SbSphereProjector::setFront(const SbBool infront)
Set whether to intersect with the outside of the sphere (infront equal to TRUE), or the inside. outside girlie or inside girlie, choose your fighter. π
References intersectFront, and needSetup.
Referenced by getRotation().
πΈ SbBool SbSphereProjector::isFront(void) const
Returns value of the flag which decides whether to intersect with the outside or inside of the sphere.
References intersectFront.
Referenced by getRotation(), and intersectSphereFront().
πΈ SbBool SbSphereProjector::isPointInFront(const SbVec3f & point) const
Check if point is on the frontside or the backside of the cylinder. π« okay so the docs literally say "cylinder" here even though this whole class is about spheres β that's what the page says, so that's what you get. we do not edit the source, we only love her.
References SbVec3f::dot(), SbViewVolume::getProjectionPoint(), SbViewVolume::getProjectionType(), SbProjector::getViewVolume(), SbViewVolume::PERSPECTIVE, sphere, SbProjector::worldToWorking, and SbViewVolume::zVector().
Referenced by getRotation().
πΈ void SbSphereProjector::setWorkingSpace(const SbMatrix & space) [virtual]
Sets the matrix used for converting from the projector's coordinate system to the world coordinate system. coordinate system glow-up. πβ‘οΈπ
Reimplemented from SbProjector.
References needSetup, and SbProjector::setWorkingSpace().
π SbBool SbSphereProjector::intersectSphereFront(const SbLine & l, SbVec3f & result) [protected]
Intersect line l with the SbSphereProjector::sphere and place the intersection point (if any) in result. Considers setFront() settings.
Returns TRUE if line actually hits the sphere, FALSE if it doesn't intersect with it. so basically: did the line make it? π
References isFront(), and sphere.
Referenced by getRotation(), SbSpherePlaneProjector::project(), SbSphereSectionProjector::project(), and SbSphereSheetProjector::project().
π Member Data Documentation π
β SbBool SbSphereProjector::intersectFront [protected]
Flag which says whether or not we should map to the outside or inside of the sphere surface.
Referenced by isFront(), SbSphereSheetProjector::project(), SbSphereProjector(), SbSphereProjector(), setFront(), SbSphereSheetProjector::setupPlane(), and SbSphereSectionProjector::setupTolerance().
β SbSphere SbSphereProjector::sphere [protected]
Projection sphere. literally the sphere. π«Ά
Referenced by SbSpherePlaneProjector::getRotation(), SbSphereSectionProjector::getRotation(), getSphere(), intersectSphereFront(), isPointInFront(), SbSphereSectionProjector::project(), SbSphereSheetProjector::project(), SbSphereProjector(), SbSphereProjector(), setSphere(), SbSphereSheetProjector::setupPlane(), and SbSphereSectionProjector::setupTolerance().
β SbBool SbSphereProjector::orientToEye [protected]
Which direction the spherical surface is oriented.
Referenced by isOrientToEye(), SbSphereProjector(), SbSphereProjector(), setOrientToEye(), SbSphereSheetProjector::setupPlane(), and SbSphereSectionProjector::setupTolerance().
β SbBool SbSphereProjector::needSetup [protected]
Set to TRUE whenever the projection surface needs to be recalculated according to the setting of the SbSphereProjector::orientToEye flag. the "girl we need to redo this" flag. π
Referenced by SbSphereSheetProjector::getRotation(), SbSphereSectionProjector::isWithinTolerance(), SbSpherePlaneProjector::project(), SbSphereSectionProjector::project(), SbSphereSheetProjector::project(), SbSphereProjector(), SbSphereProjector(), setFront(), setOrientToEye(), setSphere(), SbSphereSectionProjector::setTolerance(), SbSphereSheetProjector::setupPlane(), SbSphereSectionProjector::setupTolerance(), and setWorkingSpace().
β SbVec3f SbSphereProjector::lastPoint [protected]
Stores the previously projected 3D point. her memory of the last place you were. π iconic behaviour honestly.
Referenced by SbSpherePlaneProjector::project(), SbSphereSectionProjector::project(), SbSphereSheetProjector::project(), projectAndGetRotation(), SbSphereProjector(), and SbSphereProjector().
π Author π
Generated automatically by Doxygen for Coin from the source code. yes bestie, a robot wrote the original and now a robot wrote this one. we're all just vibes in a machine. π€β¨
okay and that's the whole page, no skips, no skimming, every single option and cross-reference accounted for. π
tiny sign-off for the footer: this page lives in Coin, Version 2.5.0, and it's filed under SbSphereProjector(3). periodt. ππ¦
π¦ 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