Coin
4.0.3
Coin3D core library
|
The SbSphereProjector class is the abstract base class for mapping to spherical surfaces. More...
#include <Inventor/projectors/SbSphereProjector.h>
Public Member Functions | |
virtual SbRotation | getRotation (const SbVec3f &point1, const SbVec3f &point2)=0 |
const SbSphere & | getSphere (void) const |
SbBool | isFront (void) const |
SbBool | isOrientToEye (void) const |
SbBool | isPointInFront (const SbVec3f &point) const |
SbVec3f | projectAndGetRotation (const SbVec2f &point, SbRotation &rot) |
void | setFront (const SbBool infront) |
void | setOrientToEye (const SbBool orienttoeye) |
void | setSphere (const SbSphere &sph) |
virtual void | setWorkingSpace (const SbMatrix &space) |
Public Member Functions inherited from SbProjector | |
virtual SbProjector * | copy (void) const =0 |
const SbViewVolume & | getViewVolume (void) const |
const SbMatrix & | getWorkingSpace (void) const |
virtual SbVec3f | project (const SbVec2f &point)=0 |
virtual void | setViewVolume (const SbViewVolume &vol) |
virtual SbBool | tryProject (const SbVec2f &point, const float epsilon, SbVec3f &result) |
Protected Member Functions | |
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 () |
float | findVanishingDistance (void) const |
SbLine | getWorkingLine (const SbVec2f &point) const |
SbBool | verifyProjection (const SbVec3f &projpt) const |
Protected Attributes | |
SbBool | intersectFront |
SbVec3f | lastPoint |
SbBool | needSetup |
SbBool | orientToEye |
SbSphere | sphere |
Protected Attributes inherited from SbProjector | |
SbViewVolume | viewVol |
SbMatrix | workingToWorld |
SbMatrix | worldToWorking |
The SbSphereProjector class is the abstract base class for mapping to spherical surfaces.
The sphere projectors map 2D points to various surface types based on spherical shapes.
|
protected |
Default constructor sets up a sphere at the origin with radius 1.
Constructor taking an explicit sphere projection definition.
|
pure virtual |
Returns rotation on the projection surface which reorients point1 to point2.
Implemented in SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.
Intersect line with the SbSphereProjector::sphere and place the intersection point (if any) in result. Considers setFront() settings.
Returns TRUE
if line actually hits the sphere, FALSE
if it doesn't intersect with it.
SbBool SbSphereProjector::isFront | ( | void | ) | const |
Returns value of the flag which decides whether to intersect with the outside or inside of the sphere.
SbBool SbSphereProjector::isOrientToEye | ( | void | ) | const |
Returns the state of the sphere orientation flag.
Check if point is on the front side or the back side of the cylinder.
SbVec3f SbSphereProjector::projectAndGetRotation | ( | const SbVec2f & | point, |
SbRotation & | rot ) |
Project the 2D point to a 3D coordinate on the spherical surface, and find the rotation from the last projection to this one.
Set whether to intersect with the outside of the sphere (infront equal to TRUE
), or the inside.
Sets whether or not the projection surface should be oriented towards the eye of the viewer. Default is TRUE
.
Sets the matrix used for converting from the projector's coordinate system to the world coordinate system.
Reimplemented from SbProjector.
|
protected |
Flag which says whether or not we should map to the outside or inside of the sphere surface.
|
protected |
Stores the previously projected 3D point.
|
protected |
Set to TRUE
whenever the projection surface needs to be recalculated according to the setting of the SbSphereProjector::orientToEye flag.
|
protected |
Which direction the spherical surface is oriented.
|
protected |
Projection sphere.