Panda3D

eggJointNodePointer.h

00001 // Filename: eggJointNodePointer.h
00002 // Created by:  drose (26Feb01)
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 EGGJOINTNODEPOINTER_H
00016 #define EGGJOINTNODEPOINTER_H
00017 
00018 #include "pandatoolbase.h"
00019 
00020 #include "eggJointPointer.h"
00021 
00022 #include "eggGroup.h"
00023 #include "pointerTo.h"
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : EggJointNodePointer
00027 // Description : This stores a pointer back to a <Joint> node.
00028 ////////////////////////////////////////////////////////////////////
00029 class EggJointNodePointer : public EggJointPointer {
00030 public:
00031   EggJointNodePointer(EggObject *object);
00032 
00033   virtual int get_num_frames() const;
00034   virtual LMatrix4d get_frame(int n) const;
00035   virtual void set_frame(int n, const LMatrix4d &mat);
00036 
00037   virtual void do_finish_reparent(EggJointPointer *new_parent);
00038   virtual void move_vertices_to(EggJointPointer *new_joint);
00039 
00040   virtual bool do_rebuild(EggCharacterDb &db);
00041   virtual void expose(EggGroup::DCSType dcs_type);
00042   virtual void apply_default_pose(EggJointPointer *source_joint, int frame);
00043 
00044   virtual bool has_vertices() const;
00045 
00046   virtual EggJointPointer *make_new_joint(const string &name);
00047 
00048   virtual void set_name(const string &name);
00049 
00050 private:
00051   PT(EggGroup) _joint;
00052 
00053 public:
00054   static TypeHandle get_class_type() {
00055     return _type_handle;
00056   }
00057   static void init_type() {
00058     EggJointPointer::init_type();
00059     register_type(_type_handle, "EggJointNodePointer",
00060                   EggJointPointer::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 
00071 #endif
00072 
00073 
 All Classes Functions Variables Enumerations