Panda3D
eggPoint.h
1 // Filename: eggPoint.h
2 // Created by: drose (15Dec99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGPOINT_H
16 #define EGGPOINT_H
17 
18 #include "pandabase.h"
19 
20 #include "eggPrimitive.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggPoint
24 // Description : A single point, or a collection of points as defined
25 // by a single <PointLight> entry.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAEGG EggPoint : public EggPrimitive {
28 PUBLISHED:
29  INLINE EggPoint(const string &name = "");
30  INLINE EggPoint(const EggPoint &copy);
31  INLINE EggPoint &operator = (const EggPoint &copy);
32 
33  INLINE bool has_thick() const;
34  INLINE double get_thick() const;
35  INLINE void set_thick(double thick);
36  INLINE void clear_thick();
37 
38  INLINE bool has_perspective() const;
39  INLINE bool get_perspective() const;
40  INLINE void set_perspective(bool perspective);
41  INLINE void clear_perspective();
42 
43  virtual bool cleanup();
44 
45  virtual void write(ostream &out, int indent_level) const;
46 
47 private:
48  enum Flags {
49  F_has_thick = 0x0001,
50  F_perspective = 0x0002,
51  F_has_perspective = 0x0004,
52  };
53 
54  int _flags;
55  double _thick;
56 
57 public:
58 
59  static TypeHandle get_class_type() {
60  return _type_handle;
61  }
62  static void init_type() {
63  EggPrimitive::init_type();
64  register_type(_type_handle, "EggPoint",
65  EggPrimitive::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 
72 private:
73  static TypeHandle _type_handle;
74 
75 };
76 
77 #include "eggPoint.I"
78 
79 #endif
A base class for any of a number of kinds of geometry primitives: polygons, point lights...
Definition: eggPrimitive.h:51
virtual bool cleanup()
Cleans up modeling errors in whatever context this makes sense.
A single point, or a collection of points as defined by a single <PointLight> entry.
Definition: eggPoint.h:27
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85