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

panda/src/linmath/lpoint3_src.h

Go to the documentation of this file.
00001 // Filename: lpoint3_src.h
00002 // Created by:  drose (25Sep99)
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 : LPoint3
00021 // Description : This is a three-component point in space (as opposed
00022 //               to a three-component vector, which represents a
00023 //               direction and a distance).  Some of the methods are
00024 //               slightly different between LPoint3 and LVector3; in
00025 //               particular, subtraction of two points yields a
00026 //               vector, while addition of a vector and a point yields
00027 //               a point.
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDA FLOATNAME(LPoint3) : public FLOATNAME(LVecBase3) {
00030 PUBLISHED:
00031   INLINE_LINMATH FLOATNAME(LPoint3)();
00032   INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) &copy);
00033   INLINE_LINMATH FLOATNAME(LPoint3) &operator = (const FLOATNAME(LVecBase3) &copy);
00034   INLINE_LINMATH FLOATNAME(LPoint3) &operator = (FLOATTYPE fill_value);
00035   INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE fill_value);
00036   INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
00037 
00038   INLINE_LINMATH static const FLOATNAME(LPoint3) &zero();
00039   INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_x();
00040   INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_y();
00041   INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_z();
00042 
00043   INLINE_LINMATH FLOATNAME(LPoint3) operator - () const;
00044 
00045   INLINE_LINMATH FLOATNAME(LVecBase3)
00046   operator + (const FLOATNAME(LVecBase3) &other) const;
00047   INLINE_LINMATH FLOATNAME(LPoint3)
00048   operator + (const FLOATNAME(LVector3) &other) const;
00049 
00050   INLINE_LINMATH FLOATNAME(LVecBase3)
00051   operator - (const FLOATNAME(LVecBase3) &other) const;
00052   INLINE_LINMATH FLOATNAME(LVector3)
00053   operator - (const FLOATNAME(LPoint3) &other) const;
00054   INLINE_LINMATH FLOATNAME(LPoint3)
00055   operator - (const FLOATNAME(LVector3) &other) const;
00056 
00057   INLINE_LINMATH FLOATNAME(LPoint3) cross(const FLOATNAME(LVecBase3) &other) const;
00058   INLINE_LINMATH FLOATNAME(LPoint3) operator * (FLOATTYPE scalar) const;
00059   INLINE_LINMATH FLOATNAME(LPoint3) operator / (FLOATTYPE scalar) const;
00060 
00061   // Some special named constructors for LPoint3.
00062 
00063   INLINE_LINMATH static FLOATNAME(LPoint3) origin(CoordinateSystem cs = CS_default);
00064   INLINE_LINMATH static FLOATNAME(LPoint3) rfu(FLOATTYPE right,
00065                                        FLOATTYPE fwd,
00066                                        FLOATTYPE up,
00067                                        CoordinateSystem cs = CS_default);
00068 public:
00069   static TypeHandle get_class_type() {
00070     return _type_handle;
00071   }
00072   static void init_type();
00073 
00074 private:
00075   static TypeHandle _type_handle;
00076 };
00077 
00078 #include "lpoint3_src.I"

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