SbProjector(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

SbProjector πŸ’…βœ¨

okay so bestie, welcome to the Coin manual, section 3 (that's library functions for the girlies who don't know πŸŽ€). Today's main character is SbProjector. Buckle up. πŸ¦‹


✨ NAME ✨

SbProjector β€” the SbProjector class is the abstract base projector class. no cap, that's literally the whole name section. πŸ’–


🌸 SYNOPSIS 🌸

#include <Inventor/projectors/SbProjector.h>

Inherited by SbCylinderProjector, SbLineProjector, SbPlaneProjector, and SbSphereProjector.

πŸ‘‘ Public Member Functions

virtual SbVec3f project (const SbVec2f &point)=0
virtual void setViewVolume (const SbViewVolume &vol)
const SbViewVolume & getViewVolume (void) const
virtual void setWorkingSpace (const SbMatrix &space)
const SbMatrix & getWorkingSpace (void) const
virtual SbProjector * copy (void) const =0
virtual SbBool tryProject (const SbVec2f &point, const float epsilon,
    SbVec3f &result)

🧚 Protected Member Functions

SbProjector (void)
virtual ~SbProjector ()
SbLine getWorkingLine (const SbVec2f &point) const
float findVanishingDistance (void) const
SbBool verifyProjection (const SbVec3f &projpt) const

πŸ“ Protected Attributes

SbViewVolume viewVol
SbMatrix worldToWorking
SbMatrix workingToWorld

πŸ’œ Detailed Description πŸ’œ

The SbProjector class is the abstract base projector class. it's giving "I'm the blueprint, not the building." πŸ—οΈ

Projectors are used in the Coin library for mapping 2D coordinates (typically from the position of the mouse cursor in the rendering window) to 3D "world" coordinates. yes bestie, 2D mouse brain β†’ 3D space brain. iconic. πŸ–±οΈβž‘οΈπŸŒ

Mapping 2D coordinates to 3D coordinates is something which is done extensively in the dragger classes, to provide the user with a convenient and natural way of interacting with the 3D geometry of scenes. lowkey the draggers would be nothing without this. πŸ’…

For a usage example, see the class documentation for SbSphereSheetProjector. go read that one if you want the tea β˜•

The application programmer should normally not need to care about the projector classes, unless there are special needs in the application. fr fr, you can just vibe and ignore this whole page if you're a regular app dev. πŸ™ˆ

See also

  • SoDragger

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SbProjector::SbProjector (void ) [protected]

The constructor initializes the working space matrix to an identity matrix. clean slate energy. ✨

virtual SbProjector::~SbProjector () [inline], [protected], [virtual]

Destructor is protected, as this is an abstract class. can't touch this from the outside, bestie. πŸ”’


πŸ”₯ Member Function Documentation πŸ”₯

virtual SbVec3f SbProjector::project (const SbVec2f & point) [pure virtual]

Project the 2D point from normalized viewport coordinates to a 3D point. The mapping will be done in accordance with the type of the projector. so like, each subclass does its own lil flavor of projecting. πŸͺ„

Implemented in SbCylinderPlaneProjector, SbCylinderProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.

void SbProjector::setViewVolume (const SbViewVolume & vol) [virtual]

Set the viewing volume the projections will take place in. this is the sandbox the math plays in. πŸ–οΈ

See also

  • getViewVolume()

const SbViewVolume & SbProjector::getViewVolume (void ) const

Return the current viewing volume used by the projections. the receipts of what you set. 🧾

See also

  • setViewVolume()

void SbProjector::setWorkingSpace (const SbMatrix & space) [virtual]

Sets the matrix used for converting from the projector's coordinate system to the world coordinate system. translation era. 🌐

Reimplemented in SbCylinderProjector, and SbSphereProjector.

const SbMatrix & SbProjector::getWorkingSpace (void ) const

Returns projector-to-world matrix. that's it, that's the sentence. πŸ’β€β™€οΈ

See also

  • setWorkingSpace()

virtual SbProjector * SbProjector::copy (void ) const [pure virtual]

Construct and return a copy of this projector. The caller is responsible for destructing the new instance. so like, you made the clone, you clean up the clone. πŸ‘―

⚠️ 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 are 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 me warning you about heap corruption πŸ’€ this one's a real one, don't skip it.

Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.

SbBool SbProjector::tryProject (const SbVec2f & point, const float epsilon, SbVec3f & result) [virtual]

Try projecting the 2D point from normalized viewport coordinates to a 3D point. The mapping will be done in accordance with the type of the projector. same vibe as project(), but it says try. 🫢

If the projection can't be done safely (for instance when the projection plane or line is parallel to the view volume projection), this function should return FALSE.

Default implementation will call project() and always return TRUE, but subclasses can override this behavior to support safe projections. so the base class is out here being optimistic and always saying yes 😭

Since

  • Coin 3.0

Reimplemented in SbLineProjector, and SbPlaneProjector.

SbLine SbProjector::getWorkingLine (const SbVec2f & point) const [protected]

From the 2D point in normalized screen space coordinates, calculate the line passing through the scene. it's giving "laser pointer through the geometry." πŸ”¦

Typically used for tracking intersection points for the mouse cursor. πŸ‘€

float SbProjector::findVanishingDistance (void ) const [protected]

Finds the unit cube vanishing distance for the current projector view volume. The view volume must be a perspective view volume. no perspective, no vanishing distance, sorry bestie. πŸ“

This method was not part of the Inventor v2.1 API, and is an extension specific to Coin.

Since

  • Coin 1.1

SbBool SbProjector::verifyProjection (const SbVec3f & projpt) const [protected]

Verifies that projpt is a valid projection for the current view volume. For perspective view volumes, it does this by checking that the projection point is in front of the eye plane. For orthographic projections, this method always returns TRUE. vibe check for your projection point πŸ’…

This method was not part of the Inventor v2.1 API, and is an extension specific to Coin.

Since

  • Coin 1.1

πŸ¦‹ Member Data Documentation πŸ¦‹

SbViewVolume SbProjector::viewVol [protected]

The viewing volume definition. the whole visual cone/frustum situation. πŸ”­

SbMatrix SbProjector::worldToWorking [protected]

The matrix which converts from world coordinates to coordinates in the projector's local coordinate system. going in πŸšͺ

SbMatrix SbProjector::workingToWorld [protected]

The matrix which converts from coordinates in the projector's local coordinate system to world coordinates. coming out πŸšͺ✨


🌈 Author 🌈

Generated automatically by Doxygen for Coin from the source code. yes, a robot wrote this and I just gave it a glow-up. πŸ€–πŸ’–


okay bestie that's the whole page, no skips, no summaries, every single flag and function accounted for. slay. πŸ’…βœ¨

Version 4.0.10 Β· Thu Jun 25 2026 00:00:00 Β· SbProjector(3) β€” Coin manual, out. πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from