Panda3D
 All Classes Functions Variables Enumerations
boundingHexahedron.I
00001 // Filename: boundingHexahedron.I
00002 // Created by:  drose (03Oct99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: BoundingHexahedron::Constructor
00018 //       Access: Public
00019 //  Description: 
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE_MATHUTIL BoundingHexahedron::
00022 BoundingHexahedron() {
00023 }
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //     Function: BoundingHexahedron::get_num_points
00027 //       Access: Published
00028 //  Description: Returns 8: the number of vertices of a hexahedron.
00029 ////////////////////////////////////////////////////////////////////
00030 INLINE_MATHUTIL int BoundingHexahedron::
00031 get_num_points() const {
00032   return num_points;
00033 }
00034 
00035 ////////////////////////////////////////////////////////////////////
00036 //     Function: BoundingHexahedron::get_point
00037 //       Access: Published
00038 //  Description: Returns the nth vertex of the hexahedron.
00039 ////////////////////////////////////////////////////////////////////
00040 INLINE_MATHUTIL LPoint3 BoundingHexahedron::
00041 get_point(int n) const {
00042   nassertr(n >= 0 && n < num_points, LPoint3::zero());
00043   return _points[n];
00044 }
00045 
00046 ////////////////////////////////////////////////////////////////////
00047 //     Function: BoundingHexahedron::get_num_planes
00048 //       Access: Published
00049 //  Description: Returns 6: the number of faces of a hexahedron.
00050 ////////////////////////////////////////////////////////////////////
00051 INLINE_MATHUTIL int BoundingHexahedron::
00052 get_num_planes() const {
00053   return num_planes;
00054 }
00055 
00056 ////////////////////////////////////////////////////////////////////
00057 //     Function: BoundingHexahedron::get_plane
00058 //       Access: Published
00059 //  Description: Returns the nth face of the hexahedron.
00060 ////////////////////////////////////////////////////////////////////
00061 INLINE_MATHUTIL LPlane BoundingHexahedron::
00062 get_plane(int n) const {
00063   nassertr(n >= 0 && n < num_planes, LPlane());
00064   return _planes[n];
00065 }
 All Classes Functions Variables Enumerations