Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sbsphere(3) [debian man page]

SbSphere(3)							       Coin							       SbSphere(3)

NAME
SbSphere - The SbSphere class is a representation of a sphere. This class is used within many other classes in Coin. It contains the data neccessary to represent a sphere (a 3D point and a radius). SYNOPSIS
#include <Inventor/SbLinear.h> Public Member Functions SbSphere (void) SbSphere (const SbVec3f &center, const float radius) void setValue (const SbVec3f &center, const float radius) void setCenter (const SbVec3f &center) void setRadius (const float radius) const SbVec3f & getCenter (void) const float getRadius (void) const void circumscribe (const SbBox3f &box) SbBool intersect (const SbLine &l, SbVec3f &intersection) const SbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const SbBool pointInside (const SbVec3f &p) const void print (FILE *file) const Detailed Description The SbSphere class is a representation of a sphere. This class is used within many other classes in Coin. It contains the data neccessary to represent a sphere (a 3D point and a radius). See also: SbCylinder Constructor &; Destructor Documentation SbSphere::SbSphere (void) The default constructor does nothing. The center point and the radius will be uninitialized. SbSphere::SbSphere (const SbVec3f &centerarg, const floatradiusarg) Construct an SbSphere instance with the given center point and radius. Member Function Documentation void SbSphere::setValue (const SbVec3f &centerarg, const floatradiusarg) Set the sphere's center point and radius. See also: getCenter(), getRadius(). void SbSphere::setCenter (const SbVec3f &centerarg) Set the sphere's center point. See also: setValue(), setRadius() and getCenter(). void SbSphere::setRadius (const floatradiusarg) Set the sphere's radius. See also: setValue(), setCenter() and getRadius(). const SbVec3f & SbSphere::getCenter (void) const Returns an SbVec3f with the sphere's center point. See also: setCenter(), getRadius(). float SbSphere::getRadius (void) const Returns the sphere's radius. See also: setRadius(), getCenter(). void SbSphere::circumscribe (const SbBox3f &box) Make the sphere exactly contain box, i.e. the sphere center point will be the same as that of the box, and the radius will be the distance from the box center point to any of the corners. SbBool SbSphere::intersect (const SbLine &l, SbVec3f &intersection) const Finds the intersection enter point for the given line l on the sphere. If the line does not intersect the sphere, FALSE is returned. SbBool SbSphere::intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const Find the intersection points of the ray l on the sphere and return these in enter and exit. If the ray just 'grazes' the sphere, the enter and exit points have equal values. If the ray does not intersect the sphere, FALSE is returned, otherwise we will return TRUE. SbBool SbSphere::pointInside (const SbVec3f &p) const Returns TRUE of the given point p lies within the sphere. void SbSphere::print (FILE *fp) const Dump the state of this object to the file stream. Only works in debug version of library, method does nothing in an optimized compile. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbSphere(3)

Check Out this Related Man Page

SbSphereProjector(3)						       Coin						      SbSphereProjector(3)

NAME
SbSphereProjector - 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. SYNOPSIS
#include <Inventor/projectors/SbSphereProjector.h> Inherits SbProjector. Inherited by SbSphereSectionProjector, and SbSphereSheetProjector. 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) Protected Member Functions 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 SbBoolorienttoeye) [protected] Default constructor sets up a sphere at the origin with radius 1. SbSphereProjector::SbSphereProjector (const SbSphere &s, const SbBoolorienttoeye) [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. Implemented in SbSphereSectionProjector, SbSpherePlaneProjector, and SbSphereSheetProjector. void SbSphereProjector::setSphere (const SbSphere &sph) Set sphere to project onto. const SbSphere & SbSphereProjector::getSphere (void) const Returns projection sphere. void SbSphereProjector::setOrientToEye (const SbBoolorienttoeye) Sets whether or not the projection surface should be oriented towards the eye of the viewer. Default is TRUE. SbBool SbSphereProjector::isOrientToEye (void) const Returns the state of the sphere orientation flag. void SbSphereProjector::setFront (const SbBoolinfront) 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] Sets the matrix used for converting from the projector's coordinate system to the world coordinate system. 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. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbSphereProjector(3)
Man Page