00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 class EXPCL_PANDA FLOATNAME(Plane) {
00024 PUBLISHED:
00025 INLINE_MATHUTIL FLOATNAME(Plane)(void);
00026 INLINE_MATHUTIL FLOATNAME(Plane)(const FLOATNAME(Plane) ©);
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"