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

panda/src/linmath/lcast_to_src.I

Go to the documentation of this file.
00001 // Filename: lcast_to_src.I
00002 // Created by:  
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 INLINE_LINMATH FLOATNAME2(LVecBase2)
00020 lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase2) &source) {
00021   return FLOATNAME2(LVecBase2)(source[0], source[1]);
00022 }
00023 
00024 INLINE_LINMATH FLOATNAME2(LVecBase3)
00025 lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase3) &source) {
00026   return FLOATNAME2(LVecBase3)(source[0], source[1], source[2]);
00027 }
00028 
00029 INLINE_LINMATH FLOATNAME2(LVecBase4)
00030 lcast_to(FLOATTYPE2 *, const FLOATNAME(LVecBase4) &source) {
00031   return FLOATNAME2(LVecBase4)(source[0], source[1], source[2], source[3]);
00032 }
00033 
00034 INLINE_LINMATH FLOATNAME2(LVector2)
00035 lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector2) &source) {
00036   return FLOATNAME2(LVector2)(source[0], source[1]);
00037 }
00038 
00039 INLINE_LINMATH FLOATNAME2(LVector3)
00040 lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector3) &source) {
00041   return FLOATNAME2(LVector3)(source[0], source[1], source[2]);
00042 }
00043 
00044 INLINE_LINMATH FLOATNAME2(LVector4)
00045 lcast_to(FLOATTYPE2 *, const FLOATNAME(LVector4) &source) {
00046   return FLOATNAME2(LVector4)(source[0], source[1], source[2], source[3]);
00047 }
00048 
00049 INLINE_LINMATH FLOATNAME2(LPoint2)
00050 lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint2) &source) {
00051   return FLOATNAME2(LPoint2)(source[0], source[1]);
00052 }
00053 
00054 INLINE_LINMATH FLOATNAME2(LPoint3)
00055 lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint3) &source) {
00056   return FLOATNAME2(LPoint3)(source[0], source[1], source[2]);
00057 }
00058 
00059 INLINE_LINMATH FLOATNAME2(LPoint4)
00060 lcast_to(FLOATTYPE2 *, const FLOATNAME(LPoint4) &source) {
00061   return FLOATNAME2(LPoint4)(source[0], source[1], source[2], source[3]);
00062 }
00063 
00064 INLINE_LINMATH FLOATNAME2(LQuaternion)
00065 lcast_to(FLOATTYPE2 *, const FLOATNAME(LQuaternion)& c) {
00066   return FLOATNAME2(LQuaternion)(c.get_r(), c.get_i(), c.get_j(), c.get_k());
00067 }
00068 
00069 INLINE_LINMATH FLOATNAME2(LMatrix3)
00070 lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix3) &source) {
00071   return FLOATNAME2(LMatrix3)
00072     (source(0, 0), source(0, 1), source(0, 2),
00073      source(1, 0), source(1, 1), source(1, 2),
00074      source(2, 0), source(2, 1), source(2, 2));
00075 }
00076 
00077 INLINE_LINMATH FLOATNAME2(LMatrix4)
00078 lcast_to(FLOATTYPE2 *, const FLOATNAME(LMatrix4) &source) {
00079   return FLOATNAME2(LMatrix4)
00080     (source(0, 0), source(0, 1), source(0, 2), source(0, 3),
00081      source(1, 0), source(1, 1), source(1, 2), source(1, 3),
00082      source(2, 0), source(2, 1), source(2, 2), source(2, 3),
00083      source(3, 0), source(3, 1), source(3, 2), source(3, 3));
00084 }

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