.TH "SbSphere" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SbSphere \- The \fBSbSphere\fP class is a representation of a sphere\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSbSphere\fP (void)" .br .ti -1c .RI "\fBSbSphere\fP (const \fBSbVec3f\fP ¢er, const float radius)" .br .ti -1c .RI "void \fBsetValue\fP (const \fBSbVec3f\fP ¢er, const float radius)" .br .ti -1c .RI "void \fBsetCenter\fP (const \fBSbVec3f\fP ¢er)" .br .ti -1c .RI "void \fBsetRadius\fP (const float radius)" .br .ti -1c .RI "const \fBSbVec3f\fP & \fBgetCenter\fP (void) const" .br .ti -1c .RI "float \fBgetRadius\fP (void) const" .br .ti -1c .RI "void \fBcircumscribe\fP (const \fBSbBox3f\fP &box)" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbLine\fP &l, \fBSbVec3f\fP &intersection) const" .br .ti -1c .RI "SbBool \fBintersect\fP (const \fBSbLine\fP &l, \fBSbVec3f\fP &enter, \fBSbVec3f\fP &exit) const" .br .ti -1c .RI "SbBool \fBpointInside\fP (const \fBSbVec3f\fP &p) const" .br .ti -1c .RI "void \fBprint\fP (FILE *file) const" .br .in -1c .SH "Detailed Description" .PP The \fBSbSphere\fP class is a representation of a sphere\&. This class is used within many other classes in Coin\&. It contains the data necessary to represent a sphere (a 3D point and a radius)\&. .PP \fBSee also\fP .RS 4 \fBSbCylinder\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SbSphere::SbSphere (void )" The default constructor does nothing\&. The center point and the radius will be uninitialized\&. .SS "SbSphere::SbSphere (const \fBSbVec3f\fP & centerarg, const float radiusarg)" Construct an \fBSbSphere\fP instance with the given center point and radius\&. .SH "Member Function Documentation" .PP .SS "void SbSphere::setValue (const \fBSbVec3f\fP & centerarg, const float radiusarg)" Set the sphere's center point and radius\&. .PP \fBSee also\fP .RS 4 \fBgetCenter()\fP, \fBgetRadius()\fP\&. .RE .PP .SS "void SbSphere::setCenter (const \fBSbVec3f\fP & centerarg)" Set the sphere's center point\&. .PP \fBSee also\fP .RS 4 \fBsetValue()\fP, \fBsetRadius()\fP and \fBgetCenter()\fP\&. .RE .PP .SS "void SbSphere::setRadius (const float radiusarg)" Set the sphere's radius\&. .PP \fBSee also\fP .RS 4 \fBsetValue()\fP, \fBsetCenter()\fP and \fBgetRadius()\fP\&. .RE .PP .SS "const \fBSbVec3f\fP & SbSphere::getCenter (void ) const" Returns an \fBSbVec3f\fP with the sphere's center point\&. .PP \fBSee also\fP .RS 4 \fBsetCenter()\fP, \fBgetRadius()\fP\&. .RE .PP .SS "float SbSphere::getRadius (void ) const" Returns the sphere's radius\&. .PP \fBSee also\fP .RS 4 \fBsetRadius()\fP, \fBgetCenter()\fP\&. .RE .PP .SS "void SbSphere::circumscribe (const \fBSbBox3f\fP & box)" Make the sphere exactly contain \fIbox\fP, 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\&. .SS "SbBool SbSphere::intersect (const \fBSbLine\fP & l, \fBSbVec3f\fP & intersection) const" Finds the intersection enter point for the given line \fIl\fP on the sphere\&. .PP If the line does not intersect the sphere, \fIFALSE\fP is returned\&. .SS "SbBool SbSphere::intersect (const \fBSbLine\fP & l, \fBSbVec3f\fP & enter, \fBSbVec3f\fP & exit) const" Find the intersection points of the ray \fIl\fP on the sphere and return these in \fIenter\fP and \fIexit\fP\&. If the ray just 'grazes' the sphere, the \fIenter\fP and \fIexit\fP points have equal values\&. .PP If the ray does not intersect the sphere, \fIFALSE\fP is returned, otherwise we will return \fITRUE\fP\&. .SS "SbBool SbSphere::pointInside (const \fBSbVec3f\fP & p) const" Returns \fITRUE\fP of the given point \fIp\fP lies within the sphere\&. .SS "void SbSphere::print (FILE * fp) const" Dump the state of this object to the \fIfp\fP file stream\&. Only works in debug version of library, method does nothing in an optimized build\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.