Panda3D
eggLine.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 eggLine.h
10  * @author drose
11  * @date 2003-10-14
12  */
13 
14 #ifndef EGGLINE_H
15 #define EGGLINE_H
16 
17 #include "pandabase.h"
18 
19 #include "eggCompositePrimitive.h"
20 
21 /**
22  * A line segment, or a series of connected line segments, defined by a <Line>
23  * entry.
24  */
25 class EXPCL_PANDA_EGG EggLine : public EggCompositePrimitive {
26 PUBLISHED:
27  INLINE explicit EggLine(const std::string &name = "");
28  INLINE EggLine(const EggLine &copy);
29  INLINE EggLine &operator = (const EggLine &copy);
30  virtual ~EggLine();
31 
32  virtual EggLine *make_copy() const override;
33 
34  virtual void write(std::ostream &out, int indent_level) const override;
35 
36  INLINE bool has_thick() const;
37  INLINE double get_thick() const;
38  INLINE void set_thick(double thick);
39  INLINE void clear_thick();
40 
41 protected:
42  virtual int get_num_lead_vertices() const override;
43 
44 private:
45  double _thick;
46  bool _has_thick;
47 
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  EggCompositePrimitive::init_type();
54  register_type(_type_handle, "EggLine",
55  EggCompositePrimitive::get_class_type());
56  }
57  virtual TypeHandle get_type() const override {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() override {
61  init_type();
62  return get_class_type();
63  }
64 
65 private:
66  static TypeHandle _type_handle;
67 
68 };
69 
70 #include "eggLine.I"
71 
72 #endif
The base class for primitives such as triangle strips and triangle fans, which include several compon...
A line segment, or a series of connected line segments, defined by a <Line> entry.
Definition: eggLine.h:25
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(),...
Definition: register_type.I:22