Panda3D

geomPoints.h

00001 // Filename: geomPoints.h
00002 // Created by:  drose (22Mar05)
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 GEOMPOINTS_H
00016 #define GEOMPOINTS_H
00017 
00018 #include "pandabase.h"
00019 #include "geomPrimitive.h"
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //       Class : GeomPoints
00023 // Description : Defines a series of disconnected points.
00024 ////////////////////////////////////////////////////////////////////
00025 class EXPCL_PANDA_GOBJ GeomPoints : public GeomPrimitive {
00026 PUBLISHED:
00027   GeomPoints(UsageHint usage_hint);
00028   GeomPoints(const GeomPoints &copy);
00029   virtual ~GeomPoints();
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 
00036   virtual int get_num_vertices_per_primitive() const;
00037   virtual int get_min_num_vertices_per_primitive() const;
00038 
00039 public:
00040   virtual bool draw(GraphicsStateGuardianBase *gsg,
00041                     const GeomPrimitivePipelineReader *reader,
00042                     bool force) const;
00043 
00044 public:
00045   static void register_with_read_factory();
00046 
00047 protected:
00048   static TypedWritable *make_from_bam(const FactoryParams &params);
00049 
00050 public:
00051   static TypeHandle get_class_type() {
00052     return _type_handle;
00053   }
00054   static void init_type() {
00055     GeomPrimitive::init_type();
00056     register_type(_type_handle, "GeomPoints",
00057                   GeomPrimitive::get_class_type());
00058   }
00059   virtual TypeHandle get_type() const {
00060     return get_class_type();
00061   }
00062   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00063 
00064 private:
00065   static TypeHandle _type_handle;
00066 
00067   friend class Geom;
00068 };
00069 
00070 #endif
 All Classes Functions Variables Enumerations