Panda3D
Loading...
Searching...
No Matches
geomLinestrips.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 geomLinestrips.h
10 * @author drose
11 * @date 2005-03-22
12 */
13
14#ifndef GEOMLINESTRIPS_H
15#define GEOMLINESTRIPS_H
16
17#include "pandabase.h"
18#include "geomPrimitive.h"
19
20/**
21 * Defines a series of line strips.
22 */
23class EXPCL_PANDA_GOBJ GeomLinestrips : public GeomPrimitive {
24PUBLISHED:
25 explicit GeomLinestrips(UsageHint usage_hint);
26 GeomLinestrips(const GeomLinestrips &copy);
27 virtual ~GeomLinestrips();
28 ALLOC_DELETED_CHAIN(GeomLinestrips);
29
30public:
31 virtual PT(GeomPrimitive) make_copy() const;
32 virtual PrimitiveType get_primitive_type() const;
33 virtual int get_geom_rendering() const;
34
35 CPT(GeomPrimitive) make_adjacency() const;
36
37 virtual int get_min_num_vertices_per_primitive() const;
38 virtual int get_num_unused_vertices_per_primitive() const;
39
40public:
41 virtual bool draw(GraphicsStateGuardianBase *gsg,
42 const GeomPrimitivePipelineReader *reader,
43 bool force) const;
44
45protected:
46 virtual CPT(GeomPrimitive) decompose_impl() const;
47 virtual CPT(GeomVertexArrayData) rotate_impl() const;
48 virtual bool requires_unused_vertices() const;
49 virtual void append_unused_vertices(GeomVertexArrayData *vertices,
50 int vertex);
51
52public:
53 static void register_with_read_factory();
54
55protected:
56 static TypedWritable *make_from_bam(const FactoryParams &params);
57
58public:
59 static TypeHandle get_class_type() {
60 return _type_handle;
61 }
62 static void init_type() {
63 GeomPrimitive::init_type();
64 register_type(_type_handle, "GeomLinestrips",
65 GeomPrimitive::get_class_type());
66 }
67 virtual TypeHandle get_type() const {
68 return get_class_type();
69 }
70 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
71
72private:
73 static TypeHandle _type_handle;
74
75 friend class Geom;
76};
77
78#endif
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Defines a series of line strips.
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...
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...
get_num_unused_vertices_per_primitive
Returns the number of vertices that are added between primitives that aren't, strictly speaking,...
This is the data for one array of a GeomVertexData structure.
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.
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(),...