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

panda/src/collide/collisionPlane.I

Go to the documentation of this file.
00001 // Filename: collisionPlane.I
00002 // Created by:  drose (25Apr00)
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 ////////////////////////////////////////////////////////////////////
00020 //     Function: CollisionPlane::Default Constructor
00021 //       Access: Public
00022 //  Description: This is only for the convenience of CollisionPolygon.
00023 //               Normally, you should not attempt to create an
00024 //               uninitialized CollisionPlane.
00025 ////////////////////////////////////////////////////////////////////
00026 INLINE CollisionPlane::
00027 CollisionPlane() {
00028 }
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //     Function: CollisionPlane::Constructor
00032 //       Access: Public
00033 //  Description:
00034 ////////////////////////////////////////////////////////////////////
00035 INLINE CollisionPlane::
00036 CollisionPlane(const Planef &plane) :
00037   _plane(plane)
00038 {
00039 }
00040 
00041 ////////////////////////////////////////////////////////////////////
00042 //     Function: CollisionPlane::Copy Constructor
00043 //       Access: Public
00044 //  Description:
00045 ////////////////////////////////////////////////////////////////////
00046 INLINE CollisionPlane::
00047 CollisionPlane(const CollisionPlane &copy) :
00048   CollisionSolid(copy),
00049   _plane(copy._plane)
00050 {
00051 }
00052 
00053 ////////////////////////////////////////////////////////////////////
00054 //     Function: CollisionPlane::get_normal
00055 //       Access: Public
00056 //  Description:
00057 ////////////////////////////////////////////////////////////////////
00058 INLINE LVector3f CollisionPlane::
00059 get_normal() const {
00060   return _plane.get_normal();
00061 }
00062 
00063 ////////////////////////////////////////////////////////////////////
00064 //     Function: CollisionPlane::dist_to_plane
00065 //       Access: Public
00066 //  Description:
00067 ////////////////////////////////////////////////////////////////////
00068 INLINE float CollisionPlane::
00069 dist_to_plane(const LPoint3f &point) const {
00070   return _plane.dist_to_plane(point);
00071 }
00072 
00073 ////////////////////////////////////////////////////////////////////
00074 //     Function: CollisionPlane::set_plane
00075 //       Access: Public
00076 //  Description:
00077 ////////////////////////////////////////////////////////////////////
00078 INLINE void CollisionPlane::
00079 set_plane(const Planef &plane) {
00080   _plane = plane;
00081   mark_bound_stale();
00082   mark_viz_stale();
00083 }
00084 
00085 ////////////////////////////////////////////////////////////////////
00086 //     Function: CollisionPlane::get_plane
00087 //       Access: Public
00088 //  Description:
00089 ////////////////////////////////////////////////////////////////////
00090 INLINE const Planef &CollisionPlane::
00091 get_plane() const {
00092   return _plane;
00093 }

Generated on Fri May 2 00:35:39 2003 for Panda by doxygen1.3