Panda3D
 All Classes Functions Variables Enumerations
eggBackPointer.h
1 // Filename: eggBackPointer.h
2 // Created by: drose (26Feb01)
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 EGGBACKPOINTER_H
16 #define EGGBACKPOINTER_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "typedObject.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggBackPointer
24 // Description : This stores a pointer from an EggJointData or
25 // EggSliderData object back to the referencing data in
26 // an egg file. One of these objects corresponds to
27 // each model appearing in an egg file, and may
28 // reference either a single node, or a table, or a slew
29 // of vertices and primitives, depending on the type of
30 // data stored.
31 //
32 // This is just an abstract base class. The actual
33 // details are stored in the various subclasses.
34 ////////////////////////////////////////////////////////////////////
35 class EggBackPointer : public TypedObject {
36 public:
38 
39  virtual double get_frame_rate() const;
40  virtual int get_num_frames() const=0;
41  virtual void extend_to(int num_frames);
42  virtual bool has_vertices() const;
43 
44  virtual void set_name(const string &name);
45 
46 public:
47  static TypeHandle get_class_type() {
48  return _type_handle;
49  }
50  static void init_type() {
52  register_type(_type_handle, "EggBackPointer",
53  TypedObject::get_class_type());
54  }
55  virtual TypeHandle get_type() const {
56  return get_class_type();
57  }
58  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
59 
60 private:
61  static TypeHandle _type_handle;
62 };
63 
64 #endif
65 
66 
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Definition: typedObject.cxx:52
virtual void set_name(const string &name)
Applies the indicated name change to the egg file.
virtual double get_frame_rate() const
Returns the stated frame rate of this particular joint, or 0.0 if it doesn't state.
This is an abstract class that all classes which use TypeHandle, and also provide virtual functions t...
Definition: typedObject.h:98
virtual void extend_to(int num_frames)
Extends the table to the indicated number of frames.
virtual bool has_vertices() const
Returns true if there are any vertices referenced by the node this points to, false otherwise...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This stores a pointer from an EggJointData or EggSliderData object back to the referencing data in an...