00001 // Filename: fltnames.h 00002 // Created by: cxgeorge (04Apr01) 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 // 00022 // This file is used throughout this directory, in conjunction with 00023 // dblnames.h, to implement a poor man's template of the linmath 00024 // objects on numeric type. The idea is to #include either fltnames.h 00025 // or dblnames.h (or, in theory, intnames.h or any other numeric type 00026 // we wanted to implement) and then to include the various *_src.h 00027 // and/or *_src.cxx files that actually define the linmath objects. 00028 // 00029 // We do this instead of using actual templates to avoid some of the 00030 // inherent problems with templates: compiler complexity and 00031 // distributed code bloat, for instance; plus it allows us to 00032 // implement #if-based specialization on numeric type for compilers 00033 // (like VC++) that don't completely support template specialization. 00034 // That and the fact that VC++ seems to have a particularly bad time 00035 // with templates in general. 00036 // 00037 //////////////////////////////////////////////////////////////////// 00038 00039 00040 #undef FLOATTYPE 00041 #undef FLOATNAME 00042 #undef FLOATTOKEN 00043 #undef FLOATCONST 00044 00045 #define FLOATTYPE float 00046 #define FLOATNAME(ARG) ARG##f 00047 #define FLOATTOKEN 'f' 00048 #define FLOATCONST(ARG) ARG##f