Panda3D

characterVertexSlider.h

00001 // Filename: characterVertexSlider.h
00002 // Created by:  drose (28Mar05)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef CHARACTERVERTEXSLIDER_H
00016 #define CHARACTERVERTEXSLIDER_H
00017 
00018 #include "pandabase.h"
00019 #include "characterSlider.h"
00020 #include "vertexSlider.h"
00021 #include "pointerTo.h"
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //       Class : CharacterVertexSlider
00025 // Description : This is a specialization on VertexSlider that
00026 //               returns the slider value associated with a particular
00027 //               CharacterSlider object.
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDA_CHAR CharacterVertexSlider : public VertexSlider {
00030 private:
00031   CharacterVertexSlider();
00032 
00033 PUBLISHED:
00034   CharacterVertexSlider(CharacterSlider *char_slider);
00035   virtual ~CharacterVertexSlider();
00036 
00037   INLINE const CharacterSlider *get_char_slider() const;
00038 
00039   virtual PN_stdfloat get_slider() const;
00040 
00041 private:
00042   PT(CharacterSlider) _char_slider;
00043 
00044 public:
00045   static void register_with_read_factory();
00046   virtual void write_datagram(BamWriter *manager, Datagram &dg);
00047   virtual int complete_pointers(TypedWritable **plist, BamReader *manager);
00048 
00049 protected:
00050   static TypedWritable *make_from_bam(const FactoryParams &params);
00051   void fillin(DatagramIterator &scan, BamReader *manager);
00052 
00053 public:
00054   static TypeHandle get_class_type() {
00055     return _type_handle;
00056   }
00057   static void init_type() {
00058     VertexSlider::init_type();
00059     register_type(_type_handle, "CharacterVertexSlider",
00060                   VertexSlider::get_class_type());
00061   }
00062   virtual TypeHandle get_type() const {
00063     return get_class_type();
00064   }
00065   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00066 
00067 private:
00068   static TypeHandle _type_handle;
00069 
00070   friend class CharacterSlider;
00071 };
00072 
00073 #include "characterVertexSlider.I"
00074 
00075 #endif
 All Classes Functions Variables Enumerations