Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/mathutil/boundingLine.I

Go to the documentation of this file.
00001 // Filename: boundingLine.I
00002 // Created by:  drose (04Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 INLINE_MATHUTIL BoundingLine::
00020 BoundingLine() {
00021 }
00022 
00023 INLINE_MATHUTIL BoundingLine::
00024 BoundingLine(const LPoint3f &a, const LPoint3f &b) :
00025   _origin(a), _vector(b - a)
00026 {
00027   _vector.normalize();
00028   _flags = 0;
00029   nassertd(!_origin.is_nan() && !_vector.is_nan()) {
00030     _flags = F_empty;
00031   }
00032 }
00033 
00034 INLINE_MATHUTIL const LPoint3f &BoundingLine::
00035 get_point_a() const {
00036   nassertr(!is_empty(), _origin);
00037   nassertr(!is_infinite(), _origin);
00038   return _origin;
00039 }
00040 
00041 INLINE_MATHUTIL LPoint3f BoundingLine::
00042 get_point_b() const {
00043   nassertr(!is_empty(), _origin);
00044   nassertr(!is_infinite(), _origin);
00045   return _origin + _vector;
00046 }

Generated on Fri May 2 00:40:23 2003 for Panda by doxygen1.3