00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef _OSGCYLINDERVOLUME_INL_
00041 #define _OSGCYLINDERVOLUME_INL_
00042
00043 #include <OSGCylinderVolume.h>
00044 #include "OSGLine.h"
00045 #include "OSGVolume.h"
00046
00047 OSG_BEGIN_NAMESPACE
00048
00049
00050 inline
00051 CylinderVolume::CylinderVolume(void) :
00052 Volume()
00053 {
00054 }
00055
00056
00057 inline
00058 CylinderVolume::CylinderVolume(const Pnt3f &p,
00059 const Vec3f &d,
00060 Real32 r) :
00061 Volume ( ),
00062 _axisPos(p),
00063 _axisDir(d),
00064 _radius (r)
00065 {
00066 setEmpty(false);
00067 }
00068
00069
00070 inline
00071 CylinderVolume::CylinderVolume(const CylinderVolume &c):
00072 Volume (c ),
00073 _axisPos(c._axisPos),
00074 _axisDir(c._axisDir),
00075 _radius (c._radius )
00076 {
00077 }
00078
00079
00080 inline
00081 CylinderVolume::~CylinderVolume(void)
00082 {
00083 }
00084
00085
00086 inline
00087 void CylinderVolume::getAxis(Pnt3f &apos, Vec3f &adir) const
00088 {
00089 adir = _axisDir;
00090 apos = _axisPos;
00091 }
00092
00093
00094 inline
00095 Real32 CylinderVolume::getRadius(void) const
00096 {
00097 return _radius;
00098 }
00099
00100
00101 inline
00102 void CylinderVolume::setValue(const Pnt3f &p, const Vec3f &d, Real32 r)
00103 {
00104 _axisPos = p;
00105 _axisDir = d;
00106 _radius = r;
00107 }
00108
00109
00110 inline
00111 void CylinderVolume::setAxis(const Pnt3f &p, const Vec3f &d)
00112 {
00113 _axisPos = p;
00114 _axisDir = d;
00115 }
00116
00117
00118 inline
00119 void CylinderVolume::setRadius(Real32 r)
00120 {
00121 _radius = r;
00122 }
00123
00124
00125 inline
00126 void CylinderVolume::extendBy(const CylinderVolume &volume)
00127 {
00128 OSG::extend(*this, volume);
00129 }
00130
00131
00132 inline
00133 bool CylinderVolume::intersect(const CylinderVolume &volume) const
00134 {
00135 return OSG::intersect(*this, volume);
00136 }
00137
00138 OSG_END_NAMESPACE
00139
00140 #endif // _OSGCYLINDERVOLUME_INL_