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

panda/src/linmath/lpoint3_src.I

Go to the documentation of this file.
00001 // Filename: lpoint3_src.I
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 ////////////////////////////////////////////////////////////////////
00021 //     Function: LPoint3::Default Constructor
00022 //       Access: Public
00023 //  Description:
00024 ////////////////////////////////////////////////////////////////////
00025 INLINE_LINMATH FLOATNAME(LPoint3)::
00026 FLOATNAME(LPoint3)() {
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: LPoint3::Copy Constructor
00031 //       Access: Public
00032 //  Description:
00033 ////////////////////////////////////////////////////////////////////
00034 INLINE_LINMATH FLOATNAME(LPoint3)::
00035 FLOATNAME(LPoint3)(const FLOATNAME(LVecBase3) &copy) : FLOATNAME(LVecBase3)(copy) {
00036 }
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 //     Function: LPoint3::Copy Assignment Operator
00040 //       Access: Public
00041 //  Description:
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE_LINMATH FLOATNAME(LPoint3) &FLOATNAME(LPoint3)::
00044 operator = (const FLOATNAME(LVecBase3) &copy) {
00045   FLOATNAME(LVecBase3)::operator = (copy);
00046   return *this;
00047 }
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: LPoint3::Copy Fill Operator
00051 //       Access: Public
00052 //  Description:
00053 ////////////////////////////////////////////////////////////////////
00054 INLINE_LINMATH FLOATNAME(LPoint3) &FLOATNAME(LPoint3)::
00055 operator = (FLOATTYPE fill_value) {
00056   FLOATNAME(LVecBase3)::operator = (fill_value);
00057   return *this;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: LPoint3::Constructor
00062 //       Access: Public
00063 //  Description:
00064 ////////////////////////////////////////////////////////////////////
00065 INLINE_LINMATH FLOATNAME(LPoint3)::
00066 FLOATNAME(LPoint3)(FLOATTYPE fill_value) :
00067   FLOATNAME(LVecBase3)(fill_value)
00068 {
00069 }
00070 
00071 ////////////////////////////////////////////////////////////////////
00072 //     Function: LPoint3::Constructor
00073 //       Access: Public
00074 //  Description:
00075 ////////////////////////////////////////////////////////////////////
00076 INLINE_LINMATH FLOATNAME(LPoint3)::
00077 FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) :
00078   FLOATNAME(LVecBase3)(x, y, z)
00079 {
00080 }
00081 
00082 ////////////////////////////////////////////////////////////////////
00083 //     Function: LPoint3::zero Named Constructor
00084 //       Access: Public
00085 //  Description: Returns a zero-length point.
00086 ////////////////////////////////////////////////////////////////////
00087 INLINE_LINMATH const FLOATNAME(LPoint3) &FLOATNAME(LPoint3)::
00088 zero() {
00089   return (const FLOATNAME(LPoint3) &)FLOATNAME(LVecBase3)::zero();
00090 }
00091 
00092 ////////////////////////////////////////////////////////////////////
00093 //     Function: LPoint3::unit_x Named Constructor
00094 //       Access: Public
00095 //  Description: Returns a unit X point.
00096 ////////////////////////////////////////////////////////////////////
00097 INLINE_LINMATH const FLOATNAME(LPoint3) &FLOATNAME(LPoint3)::
00098 unit_x() {
00099   return (const FLOATNAME(LPoint3) &)FLOATNAME(LVecBase3)::unit_x();
00100 }
00101 
00102 ////////////////////////////////////////////////////////////////////
00103 //     Function: LPoint3::unit_y Named Constructor
00104 //       Access: Public
00105 //  Description: Returns a unit Y point.
00106 ////////////////////////////////////////////////////////////////////
00107 INLINE_LINMATH const FLOATNAME(LPoint3) &FLOATNAME(LPoint3)::
00108 unit_y() {
00109   return (const FLOATNAME(LPoint3) &)FLOATNAME(LVecBase3)::unit_y();
00110 }
00111 
00112 ////////////////////////////////////////////////////////////////////
00113 //     Function: LPoint3::unit_z Named Constructor
00114 //       Access: Public
00115 //  Description: Returns a unit Z point.
00116 ////////////////////////////////////////////////////////////////////
00117 INLINE_LINMATH const FLOATNAME(LPoint3) &FLOATNAME(LPoint3)::
00118 unit_z() {
00119   return (const FLOATNAME(LPoint3) &)FLOATNAME(LVecBase3)::unit_z();
00120 }
00121 
00122 ////////////////////////////////////////////////////////////////////
00123 //     Function: LPoint3::unary -
00124 //       Access: Public
00125 //  Description:
00126 ////////////////////////////////////////////////////////////////////
00127 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00128 operator - () const {
00129   return FLOATNAME(LVecBase3)::operator - ();
00130 }
00131 
00132 ////////////////////////////////////////////////////////////////////
00133 //     Function: LPoint3::point + vecbase
00134 //       Access: Public
00135 //  Description:
00136 ////////////////////////////////////////////////////////////////////
00137 INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LPoint3)::
00138 operator + (const FLOATNAME(LVecBase3) &other) const {
00139   return FLOATNAME(LVecBase3)::operator + (other);
00140 }
00141 
00142 ////////////////////////////////////////////////////////////////////
00143 //     Function: LPoint3::point + vector
00144 //       Access: Public
00145 //  Description:
00146 ////////////////////////////////////////////////////////////////////
00147 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00148 operator + (const FLOATNAME(LVector3) &other) const {
00149   return FLOATNAME(LVecBase3)::operator + (other);
00150 }
00151 
00152 ////////////////////////////////////////////////////////////////////
00153 //     Function: LPoint3::point - vecbase
00154 //       Access: Public
00155 //  Description:
00156 ////////////////////////////////////////////////////////////////////
00157 INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LPoint3)::
00158 operator - (const FLOATNAME(LVecBase3) &other) const {
00159   return FLOATNAME(LVecBase3)::operator - (other);
00160 }
00161 
00162 ////////////////////////////////////////////////////////////////////
00163 //     Function: LPoint3::point - point
00164 //       Access: Public
00165 //  Description:
00166 ////////////////////////////////////////////////////////////////////
00167 INLINE_LINMATH FLOATNAME(LVector3) FLOATNAME(LPoint3)::
00168 operator - (const FLOATNAME(LPoint3) &other) const {
00169   return FLOATNAME(LVecBase3)::operator - (other);
00170 }
00171 
00172 ////////////////////////////////////////////////////////////////////
00173 //     Function: LPoint3::point - vector
00174 //       Access: Public
00175 //  Description:
00176 ////////////////////////////////////////////////////////////////////
00177 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00178 operator - (const FLOATNAME(LVector3) &other) const {
00179   return FLOATNAME(LVecBase3)::operator - (other);
00180 }
00181 
00182 ////////////////////////////////////////////////////////////////////
00183 //     Function: LPoint3::cross
00184 //       Access: Public
00185 //  Description:
00186 ////////////////////////////////////////////////////////////////////
00187 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00188 cross(const FLOATNAME(LVecBase3) &other) const {
00189   return FLOATNAME(LVecBase3)::cross(other);
00190 }
00191 
00192 ////////////////////////////////////////////////////////////////////
00193 //     Function: LPoint3::operator * scalar
00194 //       Access: Public
00195 //  Description:
00196 ////////////////////////////////////////////////////////////////////
00197 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00198 operator * (FLOATTYPE scalar) const {
00199   return FLOATNAME(LPoint3)(FLOATNAME(LVecBase3)::operator * (scalar));
00200 }
00201 
00202 ////////////////////////////////////////////////////////////////////
00203 //     Function: LPoint3::operator / scalar
00204 //       Access: Public
00205 //  Description:
00206 ////////////////////////////////////////////////////////////////////
00207 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00208 operator / (FLOATTYPE scalar) const {
00209   return FLOATNAME(LPoint3)(FLOATNAME(LVecBase3)::operator / (scalar));
00210 }
00211 
00212 ////////////////////////////////////////////////////////////////////
00213 //     Function: LPoint3::origin
00214 //       Access: Public, Static
00215 //  Description: Returns the origin of the indicated coordinate
00216 //               system.  This is always 0, 0, 0 with all of our
00217 //               existing coordinate systems; it's hard to imagine it
00218 //               ever being different.
00219 ////////////////////////////////////////////////////////////////////
00220 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00221 origin(CoordinateSystem) {
00222   return FLOATNAME(LPoint3)(0.0f, 0.0f, 0.0f);
00223 }
00224 
00225 ////////////////////////////////////////////////////////////////////
00226 //     Function: LPoint3::rfu
00227 //       Access: Public, Static
00228 //  Description: Returns a point described by right, forward, up
00229 //               displacements from the origin, wherever that maps to
00230 //               in the given coordinate system.
00231 ////////////////////////////////////////////////////////////////////
00232 INLINE_LINMATH FLOATNAME(LPoint3) FLOATNAME(LPoint3)::
00233 rfu(FLOATTYPE right_v, FLOATTYPE fwd_v, FLOATTYPE up_v,
00234     CoordinateSystem cs) {
00235   return origin(cs) +
00236     FLOATNAME(LVector3)::rfu(right_v, fwd_v, up_v, cs);
00237 }
00238 

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