Panda3D
|
00001 // Filename: characterSlider.h 00002 // Created by: drose (03Mar99) 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 CHARACTERSLIDER_H 00016 #define CHARACTERSLIDER_H 00017 00018 #include "pandabase.h" 00019 00020 #include "movingPartScalar.h" 00021 00022 class CharacterVertexSlider; 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : CharacterSlider 00026 // Description : This is a morph slider within the character. It's 00027 // simply a single floating-point value that animates 00028 // generally between 0 and 1, that controls the effects 00029 // of one or more morphs within the character. 00030 //////////////////////////////////////////////////////////////////// 00031 class EXPCL_PANDA_CHAR CharacterSlider : public MovingPartScalar { 00032 protected: 00033 CharacterSlider(); 00034 CharacterSlider(const CharacterSlider ©); 00035 00036 PUBLISHED: 00037 CharacterSlider(PartGroup *parent, const string &name); 00038 virtual ~CharacterSlider(); 00039 00040 virtual PartGroup *make_copy() const; 00041 00042 virtual bool update_internals(PartBundle *root, PartGroup *parent, 00043 bool self_changed, bool parent_changed, 00044 Thread *current_thread); 00045 00046 private: 00047 typedef pset<CharacterVertexSlider *> VertexSliders; 00048 VertexSliders _vertex_sliders; 00049 00050 public: 00051 static void register_with_read_factory(); 00052 00053 static TypedWritable *make_CharacterSlider(const FactoryParams ¶ms); 00054 00055 public: 00056 virtual TypeHandle get_type() const { 00057 return get_class_type(); 00058 } 00059 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00060 PUBLISHED: 00061 static TypeHandle get_class_type() { 00062 return _type_handle; 00063 } 00064 public: 00065 static void init_type() { 00066 MovingPartScalar::init_type(); 00067 register_type(_type_handle, "CharacterSlider", 00068 MovingPartScalar::get_class_type()); 00069 } 00070 00071 private: 00072 static TypeHandle _type_handle; 00073 00074 friend class CharacterVertexSlider; 00075 }; 00076 00077 #endif 00078 00079