.TH "SbSphereSheetProjector" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbSphereSheetProjector \- .PP The \fBSbSphereSheetProjector\fP class projects 2D points to 3D points on a sheet covering a spherical shape\&. .PP The following stand-alone example shows how screen space coordinates projects into 3D when mapped with an \fBSbSphereSheetProjector\fP\&. It outputs the resulting projections as an \fBSoPointSet\fP in a Inventor-file on stdout: .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSbSphereProjector\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbSphereSheetProjector\fP (const SbBool orienttoeye=TRUE)" .br .ti -1c .RI "\fBSbSphereSheetProjector\fP (const \fBSbSphere\fP &sph, const SbBool orienttoeye=TRUE)" .br .ti -1c .RI "virtual \fBSbProjector\fP * \fBcopy\fP (void) const " .br .ti -1c .RI "virtual \fBSbVec3f\fP \fBproject\fP (const \fBSbVec2f\fP &point)" .br .ti -1c .RI "virtual \fBSbRotation\fP \fBgetRotation\fP (const \fBSbVec3f\fP &point1, const \fBSbVec3f\fP &point2)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "void \fBsetupPlane\fP (void)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBSbVec3f\fP \fBworkingProjPoint\fP" .br .ti -1c .RI "\fBSbVec3f\fP \fBplanePoint\fP" .br .ti -1c .RI "\fBSbVec3f\fP \fBplaneDir\fP" .br .ti -1c .RI "float \fBplaneDist\fP" .br .ti -1c .RI "\fBSbPlane\fP \fBtolPlane\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSbSphereSheetProjector\fP class projects 2D points to 3D points on a sheet covering a spherical shape\&. .PP The following stand-alone example shows how screen space coordinates projects into 3D when mapped with an \fBSbSphereSheetProjector\fP\&. It outputs the resulting projections as an \fBSoPointSet\fP in a Inventor-file on stdout: .PP .nf #include #include #include #include int main(void) { SoDB::init(); const float START = 0\&.0f; const float END = 1\&.0f; const float STEPS = 50\&.0f; const float STEPSIZE = ((END - START) / STEPS); SbSphere s(SbVec3f(0, 0, 0), 0\&.8); SbSphereSheetProjector ssp(s, TRUE); // last argument is orientToEye SbViewVolume volume; volume\&.ortho(-1, 1, -1, 1, -1, 1); ssp\&.setViewVolume(volume); (void)fprintf(stdout, '#Inventor V2\&.1 ascii\n\n' 'Separator {\n' ' Coordinate3 {\n' ' point [\n'); for (float i=START; i <= END; i += STEPSIZE) { for (float j=START; j <= END; j += STEPSIZE) { SbVec3f v = ssp\&.project(SbVec2f(j, i)); (void)fprintf(stdout, '\t%f %f %f,\n', v[0], v[1], v[2]); } } (void)fprintf(stdout, ' ]\n' ' }\n' ' DrawStyle { pointSize 2 }\n' ' PointSet { }\n' '}\n'); return 0; } .fi .PP .PP The projections to 3D points in the resulting Inventor-file looks like this: .PP .SH "Constructor & Destructor Documentation" .PP .SS "SbSphereSheetProjector::SbSphereSheetProjector (const SbBoolorienttoeye = \fCTRUE\fP)" Constructor\&. Uses default sphere defintion, see \fBSbSphereProjector::SbSphereProjector()\fP\&. .PP \fIorienttoeye\fP decides whether or not the sheet should always be oriented towards the viewer\&. .SS "SbSphereSheetProjector::SbSphereSheetProjector (const \fBSbSphere\fP &sph, const SbBoolorienttoeye = \fCTRUE\fP)" Constructor with explicit definition of projection sphere\&. .SH "Member Function Documentation" .PP .SS "\fBSbProjector\fP * SbSphereSheetProjector::copy (void) const\fC [virtual]\fP" Construct and return a copy of this projector\&. The caller is responsible for destructing the new instance\&. .PP \fBNote that if the Coin library has been built as a DLL under Microsoft Windows and you use this method from application code, you \fImust\fP 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 \fIwill\fP get memory heap corruption upon deallocating the returned instances, eventually leading to mysterious crashes\&.\fP .PP Implements \fBSbProjector\fP\&. .SS "\fBSbVec3f\fP SbSphereSheetProjector::project (const \fBSbVec2f\fP &point)\fC [virtual]\fP" Project the 2D \fIpoint\fP from normalized viewport coordinates to a 3D point\&. The mapping will be done in accordance with the type of the projector\&. .PP Implements \fBSbProjector\fP\&. .SS "\fBSbRotation\fP SbSphereSheetProjector::getRotation (const \fBSbVec3f\fP &point1, const \fBSbVec3f\fP &point2)\fC [virtual]\fP" Returns rotation on the projection surface which re-orients \fIpoint1\fP to \fIpoint2\fP\&. .PP Implements \fBSbSphereProjector\fP\&. .SS "void SbSphereSheetProjector::setupPlane (void)\fC [protected]\fP" Recalculates projection surface settings after changes to the parameters\&. .SH "Member Data Documentation" .PP .SS "SbSphereSheetProjector::workingProjPoint\fC [protected]\fP" Last projected point, in the working space coordinate system\&. .SS "SbSphereSheetProjector::planePoint\fC [protected]\fP" Position of the center of the sphere in the plane of the hyberbolic sheet\&. .SS "SbSphereSheetProjector::planeDir\fC [protected]\fP" Normal vector of the plane defining the orientation of the sheet\&. .SS "SbSphereSheetProjector::planeDist\fC [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .SS "SbSphereSheetProjector::tolPlane\fC [protected]\fP" The tolerance value specifying how much of the sphere is 'above' the sheet\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.