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

pandatool/src/flt/fltLocalVertexPool.h

Go to the documentation of this file.
00001 // Filename: fltLocalVertexPool.h
00002 // Created by:  drose (28Feb01)
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 FLTLOCALVERTEXPOOL_H
00020 #define FLTLOCALVERTEXPOOL_H
00021 
00022 #include <pandatoolbase.h>
00023 
00024 #include "fltRecord.h"
00025 #include "fltHeader.h"
00026 #include "fltVertex.h"
00027 
00028 #include <pointerTo.h>
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : FltLocalVertexPool
00032 // Description : A local vertex pool, as might appear in the middle of
00033 //               the hierarchy, for instance for a mesh.
00034 ////////////////////////////////////////////////////////////////////
00035 class FltLocalVertexPool : public FltRecord {
00036 public:
00037   FltLocalVertexPool(FltHeader *header);
00038 
00039   // These bits are not stored in the vertex pool, but are read from
00040   // the .flt file and used immediately.
00041   enum AttributeMask {
00042     AM_has_position      = 0x80000000,
00043     AM_has_color_index   = 0x40000000,
00044     AM_has_packed_color  = 0x20000000,
00045     AM_has_normal        = 0x10000000,
00046     AM_has_base_uv       = 0x08000000,
00047     AM_has_uv_1          = 0x04000000,
00048     AM_has_uv_2          = 0x02000000,
00049     AM_has_uv_3          = 0x01000000,
00050     AM_has_uv_4          = 0x00800000,
00051     AM_has_uv_5          = 0x00400000,
00052     AM_has_uv_6          = 0x00200000,
00053     AM_has_uv_7          = 0x00100000
00054   };
00055 
00056   typedef pvector<PT(FltVertex)> Vertices;
00057   Vertices _vertices;
00058 
00059 public:
00060   virtual bool extract_record(FltRecordReader &reader);
00061   virtual bool build_record(FltRecordWriter &writer) const;
00062 
00063 public:
00064   virtual TypeHandle get_type() const {
00065     return get_class_type();
00066   }
00067   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00068   static TypeHandle get_class_type() {
00069     return _type_handle;
00070   }
00071   static void init_type() {
00072     FltRecord::init_type();
00073     register_type(_type_handle, "FltLocalVertexPool",
00074                   FltRecord::get_class_type());
00075   }
00076 
00077 private:
00078   static TypeHandle _type_handle;
00079 };
00080 
00081 #include "fltLocalVertexPool.I"
00082 
00083 #endif
00084 
00085 

Generated on Fri May 2 03:19:23 2003 for Panda-Tool by doxygen1.3