Panda3D
characterVertexSlider.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 characterVertexSlider.h
10  * @author drose
11  * @date 2005-03-28
12  */
13 
14 #ifndef CHARACTERVERTEXSLIDER_H
15 #define CHARACTERVERTEXSLIDER_H
16 
17 #include "pandabase.h"
18 #include "characterSlider.h"
19 #include "vertexSlider.h"
20 #include "pointerTo.h"
21 
22 /**
23  * This is a specialization on VertexSlider that returns the slider value
24  * associated with a particular CharacterSlider object.
25  */
26 class EXPCL_PANDA_CHAR CharacterVertexSlider : public VertexSlider {
27 private:
29 
30 PUBLISHED:
32  virtual ~CharacterVertexSlider();
33 
34  INLINE const CharacterSlider *get_char_slider() const;
35 
36  virtual PN_stdfloat get_slider() const;
37 
38 private:
39  PT(CharacterSlider) _char_slider;
40 
41 public:
42  static void register_with_read_factory();
43  virtual void write_datagram(BamWriter *manager, Datagram &dg);
44  virtual int complete_pointers(TypedWritable **plist, BamReader *manager);
45 
46 protected:
47  static TypedWritable *make_from_bam(const FactoryParams &params);
48  void fillin(DatagramIterator &scan, BamReader *manager);
49 
50 public:
51  static TypeHandle get_class_type() {
52  return _type_handle;
53  }
54  static void init_type() {
55  VertexSlider::init_type();
56  register_type(_type_handle, "CharacterVertexSlider",
57  VertexSlider::get_class_type());
58  }
59  virtual TypeHandle get_type() const {
60  return get_class_type();
61  }
62  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
63 
64 private:
65  static TypeHandle _type_handle;
66 
67  friend class CharacterSlider;
68 };
69 
70 #include "characterVertexSlider.I"
71 
72 #endif
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition: bamReader.h:110
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
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.
This is a specialization on VertexSlider that returns the slider value associated with a particular C...
This is an abstract base class that retains some slider value, which is a linear value that typically...
Definition: vertexSlider.h:37
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition: bamWriter.h:63
This is our own Panda specialization on the default STL list.
Definition: plist.h:35
This is a morph slider within the character.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:36
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:38
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.