Panda3D
eggVertexAux.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 eggVertexAux.h
10  * @author jenes
11  * @date 2011-11-15
12  */
13 
14 #ifndef EGGVERTEXAUX_H
15 #define EGGVERTEXAUX_H
16 
17 #include "pandabase.h"
18 
19 #include "eggMorphList.h"
20 #include "eggNamedObject.h"
21 
22 #include "luse.h"
23 
24 /**
25  * The set of named auxiliary data that may or may not be assigned to a
26  * vertex. Panda will import this data and create a custom column for it in
27  * the vertex data, but will not otherwise interpret it. Presumably, a shader
28  * will process the data later.
29  */
30 class EXPCL_PANDA_EGG EggVertexAux : public EggNamedObject {
31 PUBLISHED:
32  explicit EggVertexAux(const std::string &name, const LVecBase4d &aux);
33  EggVertexAux(const EggVertexAux &copy);
34  EggVertexAux &operator = (const EggVertexAux &copy);
35  virtual ~EggVertexAux();
36 
37  INLINE void set_name(const std::string &name);
38 
39  INLINE const LVecBase4d &get_aux() const;
40  INLINE void set_aux(const LVecBase4d &aux);
41 
42  static PT(EggVertexAux) make_average(const EggVertexAux *first,
43  const EggVertexAux *second);
44 
45  void write(std::ostream &out, int indent_level) const;
46  int compare_to(const EggVertexAux &other) const;
47 
48 private:
49  LVecBase4d _aux;
50 
51 public:
52  static TypeHandle get_class_type() {
53  return _type_handle;
54  }
55  static void init_type() {
56  EggNamedObject::init_type();
57  register_type(_type_handle, "EggVertexAux",
58  EggNamedObject::get_class_type());
59  }
60  virtual TypeHandle get_type() const {
61  return get_class_type();
62  }
63  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "eggVertexAux.I"
70 
71 #endif
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
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The set of named auxiliary data that may or may not be assigned to a vertex.
Definition: eggVertexAux.h:30
This is a fairly low-level base class–any egg object that has a name.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
Definition: stl_compares.h:73
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81