SBSPHERESECTIONPROJECTOR(3coin2)
๐ NAME ๐
SbSphereSectionProjector โ bestie, this one is the projector that maps 2D points onto a sliced sphere. That's it, that's the whole job description. ๐
โจ SYNOPSIS โจ
#include <Inventor/projectors/SbSphereSectionProjector.h>
Inherits SbSphereProjector.
Inherited by SbSpherePlaneProjector.
๐ธ Public Member Functions ๐ธ
SbSphereSectionProjector(const float edgetol=0.9f, const SbBool orienttoeye=1)โ ๐SbSphereSectionProjector(const SbSphere &sph, const float edgetol=0.9f, const SbBool orienttoeye=1)โ ๐ซถvirtual SbProjector * copy(void) constโ โจvirtual SbVec3f project(const SbVec2f &point)โ ๐virtual SbRotation getRotation(const SbVec3f &point1, const SbVec3f &point2)โ ๐ซvoid setTolerance(const float edgetol)โ ๐float getTolerance(void) constโ ๐void setRadialFactor(const float rad=0.0f)โ ๐ฅfloat getRadialFactor(void) constโ โญSbBool isWithinTolerance(const SbVec3f &point)โ ๐
๐ Public Member Functions inherited from SbSphereProjector ๐
SbVec3f projectAndGetRotation(const SbVec2f &point, SbRotation &rot)void 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 void setViewVolume(const SbViewVolume &vol)const SbViewVolume & getViewVolume(void) constconst SbMatrix & getWorkingSpace(void) const
๐ก๏ธ Protected Member Functions ๐ก๏ธ
virtual void setupTolerance(void)โ ๐ง
๐ Protected Member Functions inherited from SbSphereProjector ๐
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 ๐ง
float tolerancefloat tolDistfloat radialFactorSbVec3f planePointSbVec3f planeDirfloat planeDistSbPlane tolPlane
๐ Protected Attributes inherited from SbSphereProjector ๐
SbBool intersectFrontSbSphere sphereSbBool orientToEyeSbBool needSetupSbVec3f lastPoint
๐ Protected Attributes inherited from SbProjector ๐
SbViewVolume viewVolSbMatrix worldToWorkingSbMatrix workingToWorld
๐ DETAILED DESCRIPTION ๐
So, SbSphereSectionProjector projects 2D points onto a sliced sphere. Iconic behaviour, no notes.
The projection sphere for this class is sliced by a clipping plane, and the projections get mapped onto whatever's left of the sphere. It's giving "sphere but make it a lil slice". ๐ฐ
๐ See also ๐
SbCylinderSectionProjector
๐ Constructor & Destructor Documentation ๐
SbSphereSectionProjector::SbSphereSectionProjector(const float edgetol = 0.9f, const SbBool orienttoeye = 1)
Default constructor, bestie. Go check SbSphereProjector::SbSphereProjector() for the family lore.
The edgetol value should be within <0, 1], and it specifies how much of the sphere is used as a projection surface. A 1.0 means the full front half is used. Slay.
References: radialFactor, and tolerance.
Referenced by copy().
SbSphereSectionProjector::SbSphereSectionProjector(const SbSphere & sph, const float edgetol = 0.9f, const SbBool orienttoeye = 1)
Constructor where you get to explicitly set the projection sphere. Very main character of you. ๐ซถ
References: radialFactor, and tolerance.
๐ฅ Member Function Documentation ๐ฅ
SbProjector * SbSphereSectionProjector::copy(void ) const [virtual]
Constructs and returns a copy of this projector. Heads up though: the caller is responsible for destructing the new instance. You break it, you bought it. ๐
โ ๏ธ Note that if the Coin library has been built as a DLL under Microsoft Windows and you use this method from application code, you must make sure that both the Coin DLL and the application executable is using the same instance of a C Run-Time (CRT) library. Otherwise, you will get memory heap corruption upon deallocating the returned instances, eventually leading to mysterious crashes. Not the cute kind of mysterious. ๐ญ
Implements SbProjector.
Reimplemented in SbSpherePlaneProjector.
References: SbSphereSectionProjector().
SbVec3f SbSphereSectionProjector::project(const SbVec2f & point) [virtual]
Projects the 2D point from normalized viewport coordinates to a 3D point. The mapping gets done in accordance with the type of the projector โ so like, let the projector cook. ๐ฅ
Implements SbProjector.
Reimplemented in SbSpherePlaneProjector.
References: SbProjector::getWorkingLine(), SbSphereProjector::intersectSphereFront(), isWithinTolerance(), SbSphereProjector::lastPoint, SbSphereProjector::needSetup, SoDebugError::postWarning(), setupTolerance(), SbSphereProjector::sphere, and tolPlane.
SbRotation SbSphereSectionProjector::getRotation(const SbVec3f & point1, const SbVec3f & point2) [virtual]
Returns the rotation on the projection surface that re-orients point1 to point2. โจ
Implements SbSphereProjector.
Reimplemented in SbSpherePlaneProjector.
References: SbSphereProjector::sphere.
Referenced by SbSpherePlaneProjector::getRotation().
void SbSphereSectionProjector::setTolerance(const float edgetol)
The edgetol value decides how much of the surface of the sphere is used for projection. A 1.0 means the full sphere half is used. ๐
References: SbSphereProjector::needSetup, and tolerance.
float SbSphereSectionProjector::getTolerance(void ) const
Returns the edge tolerance for the sphere half. ๐
References: tolerance.
void SbSphereSectionProjector::setRadialFactor(const float rad = 0.0f)
Sets up the controlling value for how the rotation calculation will be done "outside" the sphere. Ngl, this one's the vibe-setter:
- A
radialFactorequal to0.0will make the rotations be done like if they were done by dragging the sphere. - A value of
1.0will make the rotation be around the axis from the viewpoint towards the sphere.
References: radialFactor.
float SbSphereSectionProjector::getRadialFactor(void ) const
Returns the value of radialFactor. โญ
See also
setRadialFactor()
References: radialFactor.
SbBool SbSphereSectionProjector::isWithinTolerance(const SbVec3f & point)
Checks if point is within the part of the sphere used for projections. ๐ฏ
References: SbSphereProjector::needSetup, planePoint, and setupTolerance().
Referenced by SbSpherePlaneProjector::getRotation(), SbSpherePlaneProjector::project(), and project().
void SbSphereSectionProjector::setupTolerance(void ) [protected], [virtual]
Recalculates the internal projection surface settings. ๐ ๏ธ You need to do this if any of the parameters influencing the projection surface have been changed from subclasses without using the access methods. Rude, but okay.
References: SbSphereProjector::intersectFront, SbSphereProjector::needSetup, SbSphereProjector::orientToEye, planeDir, planeDist, planePoint, SbSphereProjector::sphere, tolDist, tolerance, tolPlane, SbProjector::viewVol, and SbProjector::worldToWorking.
Referenced by isWithinTolerance(), SbSpherePlaneProjector::project(), and project().
๐ Member Data Documentation ๐
float SbSphereSectionProjector::tolerance [protected]
Tolerance value, deciding how much of the half-sphere to do projections against. ๐ซ
Referenced by getTolerance(), SbSphereSectionProjector(), SbSphereSectionProjector(), setTolerance(), and setupTolerance().
float SbSphereSectionProjector::tolDist [protected]
Tolerance value multiplied with the sphere radius. Math girlies rise. ๐งฎ
Referenced by SbSpherePlaneProjector::getRotation(), and setupTolerance().
float SbSphereSectionProjector::radialFactor [protected]
The radialfactor value decides how to calculate rotations outside of the sphere.
See also
setRadialFactor()
Referenced by getRadialFactor(), SbSphereSectionProjector(), SbSphereSectionProjector(), and setRadialFactor().
SbVec3f SbSphereSectionProjector::planePoint [protected]
A point in the plane where the center of the sphere is. ๐
Referenced by SbSpherePlaneProjector::getRotation(), isWithinTolerance(), and setupTolerance().
SbVec3f SbSphereSectionProjector::planeDir [protected]
Direction of the cutting plane. โ๏ธ
Referenced by SbSpherePlaneProjector::getRotation(), and setupTolerance().
float SbSphereSectionProjector::planeDist [protected]
Distance from the plane to the sphere center. ๐
Referenced by setupTolerance().
SbPlane SbSphereSectionProjector::tolPlane [protected]
Defines the plane cutting the sphere into a projection part. ๐ฐ๐ช
Referenced by SbSpherePlaneProjector::project(), project(), and setupTolerance().
๐ Author ๐
Generated automatically by Doxygen for Coin from the source code. So like, no human wrote this one, it just manifested. ๐
โจ and that's the whole page, bestie โจ โ brought to you by the Coin girlies, Version 2.5.0, living in the Library Functions Manual as section 3. mwah ๐ ๐๐ฆ๐
๐ฆ 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