Panda3D
 All Classes Functions Variables Enumerations
eggScalarTablePointer.h
1 // Filename: eggScalarTablePointer.h
2 // Created by: drose (18Jul03)
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 EGGSCALARTABLEPOINTER_H
16 #define EGGSCALARTABLEPOINTER_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "eggSliderPointer.h"
21 
22 #include "eggSAnimData.h"
23 #include "pointerTo.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : EggScalarTablePointer
27 // Description : This stores a pointer back to an EggSAnimData table
28 // (i.e. an <S$Anim> entry in an egg file),
29 // corresponding to the animation data from a single
30 // bundle for this slider.
31 ////////////////////////////////////////////////////////////////////
33 public:
35 
36  virtual double get_frame_rate() const;
37  virtual int get_num_frames() const;
38  virtual void extend_to(int num_frames);
39  virtual double get_frame(int n) const;
40 
41  virtual void set_name(const string &name);
42 
43 private:
44  PT(EggSAnimData) _data;
45 
46 public:
47  static TypeHandle get_class_type() {
48  return _type_handle;
49  }
50  static void init_type() {
51  EggSliderPointer::init_type();
52  register_type(_type_handle, "EggScalarTablePointer",
53  EggSliderPointer::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 
virtual void extend_to(int num_frames)
Extends the table to the indicated number of frames.
This stores a pointer back to an EggSAnimData table (i.e.
virtual int get_num_frames() const
Returns the number of frames of animation for this particular slider.
Corresponding to an &lt;S$Anim&gt; entry, this stores a single column of numbers, for instance for a morph ...
Definition: eggSAnimData.h:28
virtual void set_name(const string &name)
Applies the indicated name change to the egg file.
virtual double get_frame(int n) const
Returns the value corresponding to this slider position in the nth frame.
This is a base class for EggVertexPointer and EggScalarTablePointer.
virtual double get_frame_rate() const
Returns the stated frame rate of this particular joint, or 0.0 if it doesn&#39;t state.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
The highest-level base class in the egg directory.
Definition: eggObject.h:31