00001 // Filename: lpoint2_src.h 00002 // Created by: drose (08Mar00) 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 //////////////////////////////////////////////////////////////////// 00021 // Class : LPoint2 00022 // Description : This is a two-component point in space. 00023 //////////////////////////////////////////////////////////////////// 00024 class EXPCL_PANDA FLOATNAME(LPoint2) : public FLOATNAME(LVecBase2) { 00025 PUBLISHED: 00026 INLINE_LINMATH FLOATNAME(LPoint2)(); 00027 INLINE_LINMATH FLOATNAME(LPoint2)(const FLOATNAME(LVecBase2) ©); 00028 INLINE_LINMATH FLOATNAME(LPoint2) &operator = (const FLOATNAME(LVecBase2) ©); 00029 INLINE_LINMATH FLOATNAME(LPoint2) &operator = (FLOATTYPE fill_value); 00030 INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE fill_value); 00031 INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y); 00032 00033 INLINE_LINMATH static const FLOATNAME(LPoint2) &zero(); 00034 INLINE_LINMATH static const FLOATNAME(LPoint2) &unit_x(); 00035 INLINE_LINMATH static const FLOATNAME(LPoint2) &unit_y(); 00036 00037 INLINE_LINMATH FLOATNAME(LPoint2) operator - () const; 00038 00039 INLINE_LINMATH FLOATNAME(LVecBase2) 00040 operator + (const FLOATNAME(LVecBase2) &other) const; 00041 INLINE_LINMATH FLOATNAME(LPoint2) 00042 operator + (const FLOATNAME(LVector2) &other) const; 00043 00044 INLINE_LINMATH FLOATNAME(LVecBase2) 00045 operator - (const FLOATNAME(LVecBase2) &other) const; 00046 INLINE_LINMATH FLOATNAME(LVector2) 00047 operator - (const FLOATNAME(LPoint2) &other) const; 00048 INLINE_LINMATH FLOATNAME(LPoint2) 00049 operator - (const FLOATNAME(LVector2) &other) const; 00050 00051 INLINE_LINMATH FLOATNAME(LPoint2) operator * (FLOATTYPE scalar) const; 00052 INLINE_LINMATH FLOATNAME(LPoint2) operator / (FLOATTYPE scalar) const; 00053 00054 public: 00055 static TypeHandle get_class_type() { 00056 return _type_handle; 00057 } 00058 static void init_type(); 00059 00060 private: 00061 static TypeHandle _type_handle; 00062 }; 00063 00064 #include "lpoint2_src.I"