Panda3D
Loading...
Searching...
No Matches
eggTriangleStrip.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 eggTriangleStrip.h
10 * @author drose
11 * @date 2005-03-13
12 */
13
14#ifndef EGGTRIANGLESTRIP_H
15#define EGGTRIANGLESTRIP_H
16
17#include "pandabase.h"
18
20
21/**
22 * A connected strip of triangles. This does not normally appear in an egg
23 * file; it is typically generated as a result of meshing.
24 */
25class EXPCL_PANDA_EGG EggTriangleStrip : public EggCompositePrimitive {
26PUBLISHED:
27 INLINE explicit EggTriangleStrip(const std::string &name = "");
28 INLINE EggTriangleStrip(const EggTriangleStrip &copy);
29 INLINE EggTriangleStrip &operator = (const EggTriangleStrip &copy);
30 virtual ~EggTriangleStrip();
31
32 virtual EggTriangleStrip *make_copy() const override;
33
34 virtual void write(std::ostream &out, int indent_level) const override;
35
36protected:
37 virtual int get_num_lead_vertices() const override;
38 virtual bool do_triangulate(EggGroupNode *container) const override;
39
40public:
41 static TypeHandle get_class_type() {
42 return _type_handle;
43 }
44 static void init_type() {
45 EggCompositePrimitive::init_type();
46 register_type(_type_handle, "EggTriangleStrip",
47 EggCompositePrimitive::get_class_type());
48 }
49 virtual TypeHandle get_type() const override {
50 return get_class_type();
51 }
52 virtual TypeHandle force_init_type() override {
53 init_type();
54 return get_class_type();
55 }
56
57private:
58 static TypeHandle _type_handle;
59};
60
61#include "eggTriangleStrip.I"
62
63#endif
The base class for primitives such as triangle strips and triangle fans, which include several compon...
A base class for nodes in the hierarchy that are not leaf nodes.
A connected strip of triangles.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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(),...