![]() |
http://www.sim.no http://www.coin3d.org |
The SbSphereProjector class is the abstract base class for mapping to spherical surfaces. More...
#include <Inventor/projectors/SbSphereProjector.h>
Public Member Functions | |
SbVec3f | projectAndGetRotation (const SbVec2f &point, SbRotation &rot) |
virtual SbRotation | getRotation (const SbVec3f &point1, const SbVec3f &point2)=0 |
void | setSphere (const SbSphere &sph) |
const SbSphere & | getSphere (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) |
Public Member Functions inherited from SbProjector | |
virtual SbVec3f | project (const SbVec2f &point)=0 |
virtual void | setViewVolume (const SbViewVolume &vol) |
const SbViewVolume & | getViewVolume (void) const |
const SbMatrix & | getWorkingSpace (void) const |
virtual SbProjector * | copy (void) const =0 |
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 () |
SbLine | getWorkingLine (const SbVec2f &point) const |
float | findVanishingDistance (void) const |
SbBool | verifyProjection (const SbVec3f &projpt) const |
Protected Attributes | |
SbBool | intersectFront |
SbSphere | sphere |
SbBool | orientToEye |
SbBool | needSetup |
SbVec3f | lastPoint |
Protected Attributes inherited from SbProjector | |
SbViewVolume | viewVol |
SbMatrix | worldToWorking |
SbMatrix | workingToWorld |
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.
References intersectFront, lastPoint, needSetup, orientToEye, and sphere.
Referenced by getRotation(), SbSphereSheetProjector::SbSphereSheetProjector(), and SbSphereSheetProjector::SbSphereSheetProjector().
|
protected |
Constructor taking an explicit sphere projection definition.
References intersectFront, lastPoint, needSetup, orientToEye, and sphere.
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.
References getRotation(), lastPoint, and SbProjector::project().
|
pure virtual |
Returns rotation on the projection surface which re-orients point1 to point2.
Implemented in SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.
References getSphere(), intersectSphereFront(), isFront(), isOrientToEye(), isPointInFront(), SbSphereProjector(), setFront(), setOrientToEye(), and setSphere().
Referenced by projectAndGetRotation().
void SbSphereProjector::setSphere | ( | const SbSphere & | sph | ) |
const SbSphere & SbSphereProjector::getSphere | ( | void | ) | const |
void SbSphereProjector::setOrientToEye | ( | const SbBool | orienttoeye | ) |
Sets whether or not the projection surface should be oriented towards the eye of the viewer. Default is TRUE
.
References needSetup, and orientToEye.
Referenced by getRotation().
SbBool SbSphereProjector::isOrientToEye | ( | void | ) | const |
Returns the state of the sphere orientation flag.
References orientToEye.
Referenced by getRotation(), and SbSphereSheetProjector::project().
void SbSphereProjector::setFront | ( | const SbBool | infront | ) |
Set whether to intersect with the outside of the sphere (infront equal to TRUE
), or the inside.
References intersectFront, and needSetup.
Referenced by getRotation().
SbBool SbSphereProjector::isFront | ( | void | ) | const |
Returns value of the flag which decides whether to intersect with the outside or inside of the sphere.
References intersectFront.
Referenced by getRotation(), and intersectSphereFront().
SbBool SbSphereProjector::isPointInFront | ( | const SbVec3f & | point | ) | const |
Check if point is on the frontside or the backside of the cylinder.
References SbVec3f::dot(), SbViewVolume::getProjectionPoint(), SbViewVolume::getProjectionType(), SbProjector::getViewVolume(), SbViewVolume::PERSPECTIVE, sphere, SbProjector::worldToWorking, and SbViewVolume::zVector().
Referenced by getRotation().
|
virtual |
Sets the matrix used for converting from the projector's coordinate system to the world coordinate system.
Reimplemented from SbProjector.
References needSetup, and SbProjector::setWorkingSpace().
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.
References isFront(), and sphere.
Referenced by getRotation(), SbSpherePlaneProjector::project(), SbSphereSectionProjector::project(), and SbSphereSheetProjector::project().
|
protected |
Flag which says whether or not we should map to the outside or inside of the sphere surface.
Referenced by isFront(), SbSphereSheetProjector::project(), SbSphereProjector(), SbSphereProjector(), setFront(), SbSphereSheetProjector::setupPlane(), and SbSphereSectionProjector::setupTolerance().
|
protected |
Projection sphere.
Referenced by SbSpherePlaneProjector::getRotation(), SbSphereSectionProjector::getRotation(), getSphere(), intersectSphereFront(), isPointInFront(), SbSphereSectionProjector::project(), SbSphereSheetProjector::project(), SbSphereProjector(), SbSphereProjector(), setSphere(), SbSphereSheetProjector::setupPlane(), and SbSphereSectionProjector::setupTolerance().
|
protected |
Which direction the spherical surface is oriented.
Referenced by isOrientToEye(), SbSphereProjector(), SbSphereProjector(), setOrientToEye(), SbSphereSheetProjector::setupPlane(), and SbSphereSectionProjector::setupTolerance().
|
protected |
Set to TRUE
whenever the projection surface needs to be recalculated according to the setting of the SbSphereProjector::orientToEye flag.
Referenced by SbSphereSheetProjector::getRotation(), SbSphereSectionProjector::isWithinTolerance(), SbSpherePlaneProjector::project(), SbSphereSectionProjector::project(), SbSphereSheetProjector::project(), SbSphereProjector(), SbSphereProjector(), setFront(), setOrientToEye(), setSphere(), SbSphereSectionProjector::setTolerance(), SbSphereSheetProjector::setupPlane(), SbSphereSectionProjector::setupTolerance(), and setWorkingSpace().
|
protected |
Stores the previously projected 3D point.
Referenced by SbSpherePlaneProjector::project(), SbSphereSectionProjector::project(), SbSphereSheetProjector::project(), projectAndGetRotation(), SbSphereProjector(), and SbSphereProjector().
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Wed Jul 23 2025 for Coin by Doxygen. 1.14.0