Panda3D
 All Classes Functions Variables Enumerations
geomTristrips.h
00001 // Filename: geomTristrips.h
00002 // Created by:  drose (08Mar05)
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 GEOMTRISTRIPS_H
00016 #define GEOMTRISTRIPS_H
00017 
00018 #include "pandabase.h"
00019 #include "geomPrimitive.h"
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //       Class : GeomTristrips
00023 // Description : Defines a series of triangle strips.
00024 ////////////////////////////////////////////////////////////////////
00025 class EXPCL_PANDA_GOBJ GeomTristrips : public GeomPrimitive {
00026 PUBLISHED:
00027   GeomTristrips(UsageHint usage_hint);
00028   GeomTristrips(const GeomTristrips &copy);
00029   virtual ~GeomTristrips();
00030 
00031 public:
00032   virtual PT(GeomPrimitive) make_copy() const;
00033   virtual PrimitiveType get_primitive_type() const;
00034   virtual int get_geom_rendering() const;
00035   virtual int get_num_unused_vertices_per_primitive() const;
00036 
00037 public:
00038   virtual bool draw(GraphicsStateGuardianBase *gsg,
00039                     const GeomPrimitivePipelineReader *reader,
00040                     bool force) const;
00041 
00042 protected:
00043   virtual CPT(GeomPrimitive) decompose_impl() const;
00044   virtual CPT(GeomPrimitive) doubleside_impl() const;
00045   virtual CPT(GeomPrimitive) reverse_impl() const;
00046   virtual CPT(GeomVertexArrayData) rotate_impl() const;
00047   virtual bool requires_unused_vertices() const;
00048   virtual void append_unused_vertices(GeomVertexArrayData *vertices, 
00049                                       int vertex);
00050 
00051 public:
00052   static void register_with_read_factory();
00053 
00054 protected:
00055   static TypedWritable *make_from_bam(const FactoryParams &params);
00056 
00057 public:
00058   static TypeHandle get_class_type() {
00059     return _type_handle;
00060   }
00061   static void init_type() {
00062     GeomPrimitive::init_type();
00063     register_type(_type_handle, "GeomTristrips",
00064                   GeomPrimitive::get_class_type());
00065   }
00066   virtual TypeHandle get_type() const {
00067     return get_class_type();
00068   }
00069   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00070 
00071 private:
00072   static TypeHandle _type_handle;
00073 
00074   friend class Geom;
00075 };
00076 
00077 #endif
 All Classes Functions Variables Enumerations