SbSphere Class Reference
[Basics]

Class for representing a sphere. More...

#include <Inventor/SbSphere.h>

List of all members.

Public Member Functions

 SbSphere ()
 SbSphere (const SbVec3f &c, float r)
void setValue (const SbVec3f &c, float r)
void setCenter (const SbVec3f &c)
void setRadius (float r)
const SbVec3fgetCenter () const
float getRadius () const
void circumscribe (const SbBox3f &box)
SbBool intersect (const SbLine &l, SbVec3f &intersection) const
SbBool intersect (const SbLine &l, SbVec3f &enter, SbVec3f &exit) const

Detailed Description

Class for representing a sphere.

Represents a sphere in 3D. This is a lightweight datatype that is used for arguments or return values in the Open Inventor toolkit. See SoSphere for a database sphere (used for rendering, picking, etc.).

SEE ALSO

SbVec3f, SbLine, SoSphere


Constructor & Destructor Documentation

SbSphere::SbSphere (  )  [inline]

Default constructor.

The sphere is not initialized.

SbSphere::SbSphere ( const SbVec3f c,
float  r 
)

Constructor that takes a center and a radius.


Member Function Documentation

void SbSphere::circumscribe ( const SbBox3f box  ) 

Return a sphere containing a given box.

const SbVec3f& SbSphere::getCenter (  )  const [inline]

Return the center.

float SbSphere::getRadius (  )  const [inline]

Return the radius.

SbBool SbSphere::intersect ( const SbLine l,
SbVec3f enter,
SbVec3f exit 
) const

Intersect line and sphere, returning TRUE if there is an intersection.

The line is treated as a ray.

SbBool SbSphere::intersect ( const SbLine l,
SbVec3f intersection 
) const

Intersect line and sphere, returning TRUE if there is an intersection.

The line is treated as a ray.

void SbSphere::setCenter ( const SbVec3f c  ) 

Set the center.

void SbSphere::setRadius ( float  r  ) 

Set the radius.

void SbSphere::setValue ( const SbVec3f c,
float  r 
)

Change the center and radius.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/