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

panda/src/gobj/geomTristrip.h

Go to the documentation of this file.
00001 // Filename: geomTristrip.h
00002 // Created by:  charles (13Jul00)
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 GEOMTRISTRIP_H
00020 #define GEOMTRISTRIP_H
00021 
00022 #include "geom.h"
00023 
00024 ////////////////////////////////////////////////////////////////////
00025 //       Class : GeomTristrip
00026 // Description : Triangle Strip Primitive
00027 ////////////////////////////////////////////////////////////////////
00028 class EXPCL_PANDA GeomTristrip : public Geom {
00029 public:
00030   GeomTristrip() : Geom() { }
00031   virtual Geom *make_copy() const;
00032   virtual void print_draw_immediate() const;
00033   int get_num_tris() const;
00034   virtual void draw_immediate(GraphicsStateGuardianBase *gsg, GeomContext *gc);
00035 
00036   virtual int get_num_vertices_per_prim() const {
00037     return 0;
00038   }
00039   virtual int get_num_more_vertices_than_components() const {
00040     return 2;
00041   }
00042   virtual bool uses_components() const {
00043     return true;
00044   }
00045 
00046   virtual int get_length(int prim) const {
00047     return _primlengths[prim];
00048   }
00049 
00050   virtual Geom *explode() const;
00051   virtual PTA_ushort get_tris() const;
00052 
00053 public:
00054   static void register_with_read_factory(void);
00055   static TypedWritable *make_GeomTristrip(const FactoryParams &params);
00056 
00057 PUBLISHED:
00058   static TypeHandle get_class_type() {
00059     return _type_handle;
00060   }
00061 public:
00062   static void init_type() {
00063     Geom::init_type();
00064     register_type(_type_handle, "GeomTristrip",
00065                   Geom::get_class_type());
00066   }
00067   virtual TypeHandle get_type() const {
00068     return get_class_type();
00069   }
00070   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00071 
00072 private:
00073   static TypeHandle _type_handle;
00074 };
00075 
00076 #endif // GEOMTRISTRIP_H

Generated on Fri May 2 00:39:31 2003 for Panda by doxygen1.3