Panda3D
geomLinesAdjacency.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file geomLinesAdjacency.h
10  * @author rdb
11  * @date 2018-03-01
12  */
13 
14 #ifndef GEOMLINESADJACENCY_H
15 #define GEOMLINESADJACENCY_H
16 
17 #include "pandabase.h"
18 #include "geomPrimitive.h"
19 
20 /**
21  * Defines a series of disconnected line segments with adjacency information,
22  * for use with geometry shaders.
23  */
24 class EXPCL_PANDA_GOBJ GeomLinesAdjacency : public GeomPrimitive {
25 PUBLISHED:
26  explicit GeomLinesAdjacency(UsageHint usage_hint);
28  virtual ~GeomLinesAdjacency();
29  ALLOC_DELETED_CHAIN(GeomLinesAdjacency);
30 
31 public:
32  virtual PT(GeomPrimitive) make_copy() const;
33  virtual PrimitiveType get_primitive_type() const;
34  virtual int get_geom_rendering() const;
35 
36  virtual int get_num_vertices_per_primitive() const;
37  virtual int get_min_num_vertices_per_primitive() const;
38 
39 public:
40  virtual bool draw(GraphicsStateGuardianBase *gsg,
41  const GeomPrimitivePipelineReader *reader,
42  bool force) const;
43 
44 public:
45  static void register_with_read_factory();
46 
47 protected:
48  static TypedWritable *make_from_bam(const FactoryParams &params);
49 
50 public:
51  static TypeHandle get_class_type() {
52  return _type_handle;
53  }
54  static void init_type() {
55  GeomPrimitive::init_type();
56  register_type(_type_handle, "GeomLinesAdjacency",
57  GeomPrimitive::get_class_type());
58  }
59  virtual TypeHandle get_type() const {
60  return get_class_type();
61  }
62  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
63 
64 private:
65  static TypeHandle _type_handle;
66 
67  friend class Geom;
68 };
69 
70 #endif
Defines a series of disconnected line segments with adjacency information, for use with geometry shad...
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(), along with zero to four record_derivation()s.
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
Definition: geomPrimitive.h:56
A container for geometry primitives.
Definition: geom.h:54
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:36
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.