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

panda/src/mathutil/plane_src.h

Go to the documentation of this file.
00001 // Filename: plane_src.h
00002 // Created by:  mike (09Jan97)
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 //       Class : Plane
00021 // Description :
00022 ////////////////////////////////////////////////////////////////////
00023 class EXPCL_PANDA FLOATNAME(Plane) {
00024 PUBLISHED:
00025   INLINE_MATHUTIL FLOATNAME(Plane)(void);
00026   INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(Plane) &copy);
00027   INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(LPoint3) &a, 
00028                                    const FLOATNAME(LPoint3) &b,
00029                                    const FLOATNAME(LPoint3) &c);
00030   INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(LVector3) &normal,
00031                                    const FLOATNAME(LPoint3) &point);
00032   INLINE_MATHUTIL FLOATNAME(Plane)(FLOATTYPE a, FLOATTYPE b,
00033                                    FLOATTYPE c, FLOATTYPE d);
00034 
00035   INLINE_MATHUTIL FLOATNAME(Plane)& operator = (const FLOATNAME(Plane)& copy);
00036 
00037   INLINE_MATHUTIL FLOATNAME(Plane) operator * (const FLOATNAME(LMatrix3) &mat) const;
00038   INLINE_MATHUTIL FLOATNAME(Plane) operator * (const FLOATNAME(LMatrix4) &mat) const;
00039 
00040   FLOATNAME(LMatrix4) get_reflection_mat(void) const;
00041 
00042   INLINE_MATHUTIL FLOATNAME(LVector3) get_normal() const;
00043   FLOATNAME(LPoint3) get_point() const;
00044 
00045   INLINE_MATHUTIL FLOATTYPE dist_to_plane(const FLOATNAME(LPoint3) &point) const;
00046   INLINE_MATHUTIL bool intersects_line(FLOATNAME(LPoint3) &intersection_point,
00047                               const FLOATNAME(LPoint3) &p1,
00048                               const FLOATNAME(LPoint3) &p2) const;
00049   INLINE_MATHUTIL bool intersects_line(FLOATTYPE &t,
00050                               const FLOATNAME(LPoint3) &from,
00051                               const FLOATNAME(LVector3) &delta) const;
00052 
00053   INLINE_MATHUTIL const FLOATTYPE *get_data() const;
00054   INLINE_MATHUTIL int get_num_components() const;
00055 
00056   INLINE_MATHUTIL void output(ostream &out) const;
00057   INLINE_MATHUTIL void write(ostream &out, int indent_level = 0) const;
00058 
00059 public:
00060   INLINE_MATHUTIL void write_datagram(Datagram &dest) const;
00061   INLINE_MATHUTIL void read_datagram(DatagramIterator &source);
00062 
00063 public:
00064   FLOATTYPE _a, _b, _c, _d;
00065 };
00066 
00067 INLINE_MATHUTIL ostream &operator << (ostream &out, const FLOATNAME(Plane) &p) {
00068   p.output(out);
00069   return out;
00070 }
00071 
00072 #include "plane_src.I"

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