Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SbSphereProjector Class Reference

The SbSphereProjector class is the abstract base class for mapping to spherical surfaces. More...

#include <Inventor/projectors/SbSphereProjector.h>

Inheritance diagram for SbSphereProjector::

SbProjector SbSphereSectionProjector SbSphereSheetProjector SbSpherePlaneProjector List of all members.

Public Methods

SbVec3f projectAndGetRotation (const SbVec2f &point, SbRotation &rot)
virtual SbRotation getRotation (const SbVec3f &point1, const SbVec3f &point2)=0
void setSphere (const SbSphere &sph)
const SbSpheregetSphere (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)

Protected Methods

 SbSphereProjector (const SbBool orienttoeye)
 SbSphereProjector (const SbSphere &s, const SbBool orienttoeye)
SbBool intersectSphereFront (const SbLine &l, SbVec3f &result)

Protected Attributes

SbBool intersectFront
SbSphere sphere
SbBool orientToEye
SbBool needSetup
SbVec3f lastPoint

Detailed Description

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.

See also:
SbCylinderProjector


Constructor & Destructor Documentation

SbSphereProjector::SbSphereProjector const SbBool orienttoeye [protected]
 

Default constructor sets up a sphere at the origin with radius 1.

SbSphereProjector::SbSphereProjector const SbSphere & s,
const SbBool orienttoeye
[protected]
 

Constructor taking an explicit sphere projection definition.


Member Function Documentation

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.

See also:
project(), getRotation()

SbRotation SbSphereProjector::getRotation const SbVec3f & point1,
const SbVec3f & point2
[pure virtual]
 

Returns rotation on the projection surface which re-orients point1 to point2.

Reimplemented in SbSphereSheetProjector, SbSphereSectionProjector, and SbSpherePlaneProjector.

void SbSphereProjector::setSphere const SbSphere & sph
 

Set sphere to project onto.

const SbSphere & SbSphereProjector::getSphere void const
 

Returns projection sphere.

void SbSphereProjector::setOrientToEye const SbBool orienttoeye
 

Sets whether or not the projection surface should be oriented towards the eye of the viewer.

SbBool SbSphereProjector::isOrientToEye void const
 

Returns the state of the sphere orientation flag.

void SbSphereProjector::setFront const SbBool infront
 

Set whether to intersect with the outside of the sphere (infront equal to TRUE), or the inside.

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::isPointInFront const SbVec3f & point const
 

Check if point is on the frontside or the backside of the cylinder.

void SbSphereProjector::setWorkingSpace const SbMatrix & space [virtual]
 

Overloaded from parent to set needSetup to TRUE.

Reimplemented from SbProjector.

SbBool SbSphereProjector::intersectSphereFront const SbLine & l,
SbVec3f & result
[protected]
 

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.


Member Data Documentation

SbSphereProjector::intersectFront [protected]
 

Flag which says whether or not we should map to the outside or inside of the sphere surface.

SbSphereProjector::sphere [protected]
 

Projection sphere.

SbSphereProjector::orientToEye [protected]
 

Which direction the spherical surface is oriented.

SbSphereProjector::needSetup [protected]
 

Set to TRUE whenever the projection surface needs to be recalculated according to the setting of the SbSphereProjector::orientToEye flag.

SbSphereProjector::lastPoint [protected]
 

Stores the previously projected 3D point.


The documentation for this class was generated from the following files:
Generated at Tue Mar 5 03:31:31 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001