00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef GEOMTRIANGLES_H
00016 #define GEOMTRIANGLES_H
00017
00018 #include "pandabase.h"
00019 #include "geomPrimitive.h"
00020
00021
00022
00023
00024
00025 class EXPCL_PANDA_GOBJ GeomTriangles : public GeomPrimitive {
00026 PUBLISHED:
00027 GeomTriangles(UsageHint usage_hint);
00028 GeomTriangles(const GeomTriangles ©);
00029 virtual ~GeomTriangles();
00030
00031 public:
00032 virtual PT(GeomPrimitive) make_copy() const;
00033 virtual PrimitiveType get_primitive_type() const;
00034
00035 virtual int get_num_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) doubleside_impl() const;
00044 virtual CPT(GeomPrimitive) reverse_impl() const;
00045 virtual CPT(GeomVertexArrayData) rotate_impl() const;
00046
00047 public:
00048 static void register_with_read_factory();
00049
00050 protected:
00051 static TypedWritable *make_from_bam(const FactoryParams ¶ms);
00052
00053 public:
00054 static TypeHandle get_class_type() {
00055 return _type_handle;
00056 }
00057 static void init_type() {
00058 GeomPrimitive::init_type();
00059 register_type(_type_handle, "GeomTriangles",
00060 GeomPrimitive::get_class_type());
00061 }
00062 virtual TypeHandle get_type() const {
00063 return get_class_type();
00064 }
00065 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00066
00067 private:
00068 static TypeHandle _type_handle;
00069
00070 friend class Geom;
00071 };
00072
00073 #endif