Panda3D

cLwoPoints.h

00001 // Filename: cLwoPoints.h
00002 // Created by:  drose (25Apr01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef CLWOPOINTS_H
00016 #define CLWOPOINTS_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "lwoPoints.h"
00021 #include "eggVertexPool.h"
00022 #include "pointerTo.h"
00023 
00024 #include "pmap.h"
00025 
00026 class LwoToEggConverter;
00027 class LwoVertexMap;
00028 class CLwoLayer;
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : CLwoPoints
00032 // Description : This class is a wrapper around LwoPoints and stores
00033 //               additional information useful during the
00034 //               conversion-to-egg process.
00035 ////////////////////////////////////////////////////////////////////
00036 class CLwoPoints {
00037 public:
00038   INLINE CLwoPoints(LwoToEggConverter *converter, const LwoPoints *points,
00039                     CLwoLayer *layer);
00040 
00041   void add_vmap(const LwoVertexMap *lwo_vmap);
00042   bool get_uv(const string &uv_name, int n, LPoint2 &uv) const;
00043 
00044   void make_egg();
00045   void connect_egg();
00046 
00047   LwoToEggConverter *_converter;
00048   CPT(LwoPoints) _points;
00049   CLwoLayer *_layer;
00050   PT(EggVertexPool) _egg_vpool;
00051 
00052   // A number of vertex maps of different types may be associated, but
00053   // we only care about some of the types here.
00054   typedef pmap<string, const LwoVertexMap *> VMap;
00055   VMap _txuv;
00056   VMap _pick;
00057 };
00058 
00059 #include "cLwoPoints.I"
00060 
00061 #endif
00062 
00063 
 All Classes Functions Variables Enumerations