00001 // Filename: cLwoPoints.h 00002 // Created by: drose (25Apr01) 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 #ifndef CLWOPOINTS_H 00020 #define CLWOPOINTS_H 00021 00022 #include <pandatoolbase.h> 00023 00024 #include <lwoPoints.h> 00025 #include <eggVertexPool.h> 00026 #include <pointerTo.h> 00027 00028 #include "pmap.h" 00029 00030 class LwoToEggConverter; 00031 class LwoVertexMap; 00032 class CLwoLayer; 00033 00034 //////////////////////////////////////////////////////////////////// 00035 // Class : CLwoPoints 00036 // Description : This class is a wrapper around LwoPoints and stores 00037 // additional information useful during the 00038 // conversion-to-egg process. 00039 //////////////////////////////////////////////////////////////////// 00040 class CLwoPoints { 00041 public: 00042 INLINE CLwoPoints(LwoToEggConverter *converter, const LwoPoints *points, 00043 CLwoLayer *layer); 00044 00045 void add_vmap(const LwoVertexMap *lwo_vmap); 00046 bool get_uv(const string &uv_name, int n, LPoint2f &uv) const; 00047 00048 void make_egg(); 00049 void connect_egg(); 00050 00051 LwoToEggConverter *_converter; 00052 CPT(LwoPoints) _points; 00053 CLwoLayer *_layer; 00054 PT(EggVertexPool) _egg_vpool; 00055 00056 // A number of vertex maps of different types may be associated, but 00057 // we only care about some of the types here. 00058 typedef pmap<string, const LwoVertexMap *> VMap; 00059 VMap _txuv; 00060 VMap _pick; 00061 }; 00062 00063 #include "cLwoPoints.I" 00064 00065 #endif 00066 00067