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

pandatool/src/flt/fltVertexList.h

Go to the documentation of this file.
00001 // Filename: fltVertexList.h
00002 // Created by:  drose (25Aug00)
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 FLTVERTEXLIST_H
00020 #define FLTVERTEXLIST_H
00021 
00022 #include <pandatoolbase.h>
00023 
00024 #include "fltRecord.h"
00025 #include "fltPackedColor.h"
00026 #include "fltVertex.h"
00027 
00028 #include <pointerTo.h>
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : FltVertexList
00032 // Description : A list of vertices, typically added as a child of a
00033 //               face bead.
00034 ////////////////////////////////////////////////////////////////////
00035 class FltVertexList : public FltRecord {
00036 public:
00037   FltVertexList(FltHeader *header);
00038 
00039   int get_num_vertices() const;
00040   FltVertex *get_vertex(int n) const;
00041   void clear_vertices();
00042   void add_vertex(FltVertex *vertex);
00043 
00044   virtual void output(ostream &out) const;
00045 
00046 protected:
00047   virtual bool extract_record(FltRecordReader &reader);
00048   virtual bool build_record(FltRecordWriter &writer) const;
00049 
00050 private:
00051   typedef pvector<PT(FltVertex)> Vertices;
00052   Vertices _vertices;
00053 
00054 public:
00055   virtual TypeHandle get_type() const {
00056     return get_class_type();
00057   }
00058   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00059   static TypeHandle get_class_type() {
00060     return _type_handle;
00061   }
00062   static void init_type() {
00063     FltRecord::init_type();
00064     register_type(_type_handle, "FltVertexList",
00065                   FltRecord::get_class_type());
00066   }
00067 
00068 private:
00069   static TypeHandle _type_handle;
00070 };
00071 
00072 #endif
00073 
00074 

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