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 * @since 1.10.0
25 */
26class EXPCL_PANDA_GOBJ GeomLinesAdjacency : public GeomPrimitive {
27PUBLISHED:
28 explicit GeomLinesAdjacency(UsageHint usage_hint);
30 virtual ~GeomLinesAdjacency();
31 ALLOC_DELETED_CHAIN(GeomLinesAdjacency);
32
33public:
34 virtual PT(GeomPrimitive) make_copy() const;
35 virtual PrimitiveType get_primitive_type() const;
36 virtual int get_geom_rendering() const;
37
38 virtual int get_num_vertices_per_primitive() const;
39 virtual int get_min_num_vertices_per_primitive() const;
40
41public:
42 virtual bool draw(GraphicsStateGuardianBase *gsg,
43 const GeomPrimitivePipelineReader *reader,
44 bool force) const;
45
46public:
47 static void register_with_read_factory();
48
49protected:
50 static TypedWritable *make_from_bam(const FactoryParams &params);
51
52public:
53 static TypeHandle get_class_type() {
54 return _type_handle;
55 }
56 static void init_type() {
57 GeomPrimitive::init_type();
58 register_type(_type_handle, "GeomLinesAdjacency",
59 GeomPrimitive::get_class_type());
60 }
61 virtual TypeHandle get_type() const {
62 return get_class_type();
63 }
64 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
65
66private:
67 static TypeHandle _type_handle;
68
69 friend class Geom;
70};
71
72#endif
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:36
Defines a series of disconnected line segments with adjacency information, for use with geometry shad...
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
Definition: geomPrimitive.h:56
get_min_num_vertices_per_primitive
Returns the minimum number of vertices that must be added before close_primitive() may legally be cal...
get_geom_rendering
Returns the set of GeomRendering bits that represent the rendering properties required to properly re...
Definition: geomPrimitive.h:73
get_num_vertices_per_primitive
If the primitive type is a simple type in which all primitives have the same number of vertices,...
A container for geometry primitives.
Definition: geom.h:54
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
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22