Panda3D
 All Classes Functions Variables Enumerations
characterVertexSlider.h
1 // Filename: characterVertexSlider.h
2 // Created by: drose (28Mar05)
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 CHARACTERVERTEXSLIDER_H
16 #define CHARACTERVERTEXSLIDER_H
17 
18 #include "pandabase.h"
19 #include "characterSlider.h"
20 #include "vertexSlider.h"
21 #include "pointerTo.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : CharacterVertexSlider
25 // Description : This is a specialization on VertexSlider that
26 // returns the slider value associated with a particular
27 // CharacterSlider object.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDA_CHAR CharacterVertexSlider : public VertexSlider {
30 private:
32 
33 PUBLISHED:
35  virtual ~CharacterVertexSlider();
36 
37  INLINE const CharacterSlider *get_char_slider() const;
38 
39  virtual PN_stdfloat get_slider() const;
40 
41 private:
42  PT(CharacterSlider) _char_slider;
43 
44 public:
45  static void register_with_read_factory();
46  virtual void write_datagram(BamWriter *manager, Datagram &dg);
47  virtual int complete_pointers(TypedWritable **plist, BamReader *manager);
48 
49 protected:
50  static TypedWritable *make_from_bam(const FactoryParams &params);
51  void fillin(DatagramIterator &scan, BamReader *manager);
52 
53 public:
54  static TypeHandle get_class_type() {
55  return _type_handle;
56  }
57  static void init_type() {
58  VertexSlider::init_type();
59  register_type(_type_handle, "CharacterVertexSlider",
60  VertexSlider::get_class_type());
61  }
62  virtual TypeHandle get_type() const {
63  return get_class_type();
64  }
65  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
66 
67 private:
68  static TypeHandle _type_handle;
69 
70  friend class CharacterSlider;
71 };
72 
73 #include "characterVertexSlider.I"
74 
75 #endif
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition: bamReader.h:122
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:37
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:41
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition: bamWriter.h:73
This is our own Panda specialization on the default STL list.
Definition: plist.h:38
This is a morph slider within the character.
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:40
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:85
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:43
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.