SBSPHERESECTIONPROJECTOR(3coin2)

๐Ÿ“ฆ version 2.5.0, in fedora 43, fedora 44

๐ŸŽ€ 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) const
  • void setOrientToEye(const SbBool orienttoeye)
  • SbBool isOrientToEye(void) const
  • void setFront(const SbBool infront)
  • SbBool isFront(void) const
  • SbBool isPointInFront(const SbVec3f &point) const
  • virtual void setWorkingSpace(const SbMatrix &space)

๐Ÿฆ‹ Public Member Functions inherited from SbProjector ๐Ÿฆ‹

  • virtual void setViewVolume(const SbViewVolume &vol)
  • const SbViewVolume & getViewVolume(void) const
  • const 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) const
  • float findVanishingDistance(void) const
  • SbBool verifyProjection(const SbVec3f &projpt) const

๐Ÿงš Protected Attributes ๐Ÿงš

  • float tolerance
  • float tolDist
  • float radialFactor
  • SbVec3f planePoint
  • SbVec3f planeDir
  • float planeDist
  • SbPlane tolPlane

๐ŸŽ€ Protected Attributes inherited from SbSphereProjector ๐ŸŽ€

  • SbBool intersectFront
  • SbSphere sphere
  • SbBool orientToEye
  • SbBool needSetup
  • SbVec3f lastPoint

๐Ÿ’… Protected Attributes inherited from SbProjector ๐Ÿ’…

  • SbViewVolume viewVol
  • SbMatrix worldToWorking
  • SbMatrix 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 radialFactor equal to 0.0 will make the rotations be done like if they were done by dragging the sphere.
  • A value of 1.0 will 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