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