00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef COIN_SBSPHERE_H
00021
#define COIN_SBSPHERE_H
00022
00023
#include <stdio.h>
00024
#include <Inventor/SbVec3f.h>
00025
00026
class SbLine;
00027
class SbBox3f;
00028
00029 class COIN_DLL_API SbSphere {
00030
public:
00031 SbSphere(
void);
00032 SbSphere(
const SbVec3f & center,
const float radius);
00033
void setValue(
const SbVec3f & center,
const float radius);
00034
void setCenter(
const SbVec3f & center);
00035
void setRadius(
const float radius);
00036
const SbVec3f & getCenter(
void)
const;
00037
float getRadius(
void)
const;
00038
void circumscribe(
const SbBox3f & box);
00039 SbBool intersect(
const SbLine & l,
SbVec3f & intersection)
const;
00040 SbBool intersect(
const SbLine & l,
SbVec3f & enter,
SbVec3f & exit)
const;
00041 SbBool pointInside(
const SbVec3f & p)
const;
00042
00043
void print(FILE * file)
const;
00044
00045
private:
00046
SbVec3f center;
00047
float radius;
00048 };
00049
00050
#endif // !COIN_SBSPHERE_H