Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGCylinderVolume.inl

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028  *                                                                           *
00029 \*---------------------------------------------------------------------------*/
00030 /*---------------------------------------------------------------------------*\
00031  *                                Changes                                    *
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_

Generated on Thu Aug 25 04:02:31 2005 for OpenSG by  doxygen 1.4.3