Provided by: libcoin80-doc_3.1.4~abc9f50-4ubuntu2_all

**NAME**

SbProjector - TheSbProjectorclass is the abstract base projector class. 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.

**SYNOPSIS**

#include <Inventor/projectors/SbProjector.h> Inherited bySbCylinderProjector,SbLineProjector,SbPlaneProjector, andSbSphereProjector.PublicMemberFunctionsvirtualSbVec3fproject(constSbVec2f&point)=0 virtual voidsetViewVolume(constSbViewVolume&vol) constSbViewVolume&getViewVolume(void) const virtual voidsetWorkingSpace(constSbMatrix&space) constSbMatrix&getWorkingSpace(void) const virtualSbProjector*copy(void) const =0 virtual SbBooltryProject(constSbVec2f&point, const float epsilon,SbVec3f&result)ProtectedMemberFunctionsSbProjector(void) virtual~SbProjector()SbLinegetWorkingLine(constSbVec2f&point) const floatfindVanishingDistance(void) const SbBoolverifyProjection(constSbVec3f&projpt) constProtectedAttributesSbViewVolumeviewVolSbMatrixworldToWorkingSbMatrixworkingToWorld

**Detailed** **Description**

TheSbProjectorclass is the abstract base projector class. 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. 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. For a usage example, see the class documentation forSbSphereSheetProjector. The application programmer should normally not need to care about the projector classes, unless there are special needs in the application.SeeAlso:SoDragger

**Constructor** **&** **Destructor** **Documentation**

SbProjector::SbProjector(void)[protected]The constructor initializes the workingspace matrix to an identity matrix.SbProjector::~SbProjector()[inline],[protected],[virtual]Destructor is protected, as this is an abstract class.

**Member** **Function** **Documentation**

SbVec3fSbProjector::project(constSbVec2f&point)[purevirtual]Project the 2Dpointfrom normalized viewport coordinates to a 3D point. The mapping will be done in accordance with the type of the projector. Implemented inSbCylinderSectionProjector,SbSphereSectionProjector,SbCylinderPlaneProjector,SbCylinderSheetProjector,SbSpherePlaneProjector,SbLineProjector,SbPlaneProjector,SbSphereSheetProjector, andSbCylinderProjector.voidSbProjector::setViewVolume(constSbViewVolume&vol)[virtual]Set the viewing volume the projections will take place in.SeeAlso:getViewVolume()constSbViewVolume&SbProjector::getViewVolume(void)constReturn the current viewing volume used by the projections.SeeAlso:setViewVolume()voidSbProjector::setWorkingSpace(constSbMatrix&space)[virtual]Sets the matrix used for converting from the projector's coordinate system to the world coordinate system. Reimplemented inSbSphereProjector, andSbCylinderProjector.constSbMatrix&SbProjector::getWorkingSpace(void)constReturns projector-to-world matrix.SeeAlso:setWorkingSpace()SbProjector*SbProjector::copy(void)const[purevirtual]Construct and return a copy of this projector. The caller is responsible for destructing the new instance.NotethatiftheCoinlibraryhasbeenbuiltasaDLLunderMicrosoftWindowsandyouusethismethodfromapplicationcode,youmustmakesurethatboththeCoinDLLandtheapplicationexecutableisusingthesameinstanceofaCRun-Time(CRT)library.Otherwise,youwillgetmemoryheapcorruptionupondeallocatingthereturnedinstances,eventuallyleadingtomysteriouscrashes.Implemented inSbCylinderSectionProjector,SbSphereSectionProjector,SbCylinderPlaneProjector,SbCylinderSheetProjector,SbSpherePlaneProjector,SbLineProjector,SbPlaneProjector, andSbSphereSheetProjector.SbBoolSbProjector::tryProject(constSbVec2f&point,constfloatepsilon,SbVec3f&result)[virtual]Try projecting the 2Dpointfrom normalized viewport coordinates to a 3D point. The mapping will be done in accordance with the type of the projector. 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 callproject()and always return TRUE, but subclasses can override this behavior to support safe projections.Since:Coin 3.0 Reimplemented inSbLineProjector, andSbPlaneProjector.SbLineSbProjector::getWorkingLine(constSbVec2f&point)const[protected]From the 2Dpointin normalized screenspace coordinates, calculate the line passing through the scene. Typically used for tracking intersection points for the mouse cursor.floatSbProjector::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. This method was not part of the Inventor v2.1 API, and is an extension specific to Coin.Since:Coin 1.1SbBoolSbProjector::verifyProjection(constSbVec3f&projpt)const[protected]Verifies thatprojptis 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 returnsTRUE. 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**

SbProjector::viewVol[protected]The viewVol definition.SbProjector::worldToWorking[protected]The matrix which converts from world coordinates to coordinates in the projector's local coordinate system.SbProjector::workingToWorld[protected]The matrix which converts from coordinates in the projector's local coordinate system to world coordinates.

**Author**

Generated automatically by Doxygen for Coin from the source code.