00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef COIN_SBXFBOX3F_H
00021
#define COIN_SBXFBOX3F_H
00022
00023
#include <stdio.h>
00024
#include <Inventor/SbBox3f.h>
00025
#include <Inventor/SbMatrix.h>
00026
00027 class COIN_DLL_API SbXfBox3f :
public SbBox3f {
00028
typedef SbBox3f inherited;
00029
00030
public:
00031 SbXfBox3f(
void);
00032 SbXfBox3f(
const SbVec3f & boxmin,
const SbVec3f & boxmax);
00033 SbXfBox3f(
const SbBox3f & box);
00034 ~SbXfBox3f();
00035
00036
void setTransform(
const SbMatrix & m);
00037
const SbMatrix & getTransform(
void)
const;
00038
const SbMatrix & getInverse(
void)
const;
00039
SbVec3f getCenter(
void)
const;
00040
void extendBy(
const SbVec3f & pt);
00041
void extendBy(
const SbBox3f & bb);
00042
void extendBy(
const SbXfBox3f & bb);
00043 SbBool intersect(
const SbVec3f & pt)
const;
00044 SbBool intersect(
const SbBox3f & bb)
const;
00045
void getSpan(
const SbVec3f & direction,
float & dMin,
float & dMax)
const;
00046
SbBox3f project(
void)
const;
00047
friend COIN_DLL_API
int operator ==(
const SbXfBox3f & b1,
const SbXfBox3f & b2);
00048
friend COIN_DLL_API
int operator !=(
const SbXfBox3f & b1,
const SbXfBox3f & b2);
00049
00050
00051
00052
void transform(
const SbMatrix & m);
00053
00054
float getVolume(
void)
const;
00055
00056
void print(FILE * file)
const;
00057
00058
private:
00059
00060
const SbVec3f &
getMin(
void)
const {
return SbBox3f::getMin(); }
00061
const SbVec3f &
getMax(
void)
const {
return SbBox3f::getMax(); }
00062
00063
void calcInverse(
void)
const;
00064
void makeInvInvalid(
void);
00065
00066
SbMatrix matrix, invertedmatrix;
00067 };
00068
00069 COIN_DLL_API
int operator ==(
const SbXfBox3f & b1,
const SbXfBox3f & b2);
00070 COIN_DLL_API
int operator !=(
const SbXfBox3f & b1,
const SbXfBox3f & b2);
00071
00072
#endif // !COIN_SBXFBOX3F_H