Panda3D
|
00001 // Filename: eggJointPointer.cxx 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 #include "eggJointPointer.h" 00016 00017 00018 TypeHandle EggJointPointer::_type_handle; 00019 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Function: EggJointPointer::add_frame 00023 // Access: Public, Virtual 00024 // Description: Appends a new frame onto the end of the data, if 00025 // possible; returns true if not possible, or false 00026 // otherwise (e.g. for a static joint). 00027 //////////////////////////////////////////////////////////////////// 00028 bool EggJointPointer:: 00029 add_frame(const LMatrix4d &) { 00030 return false; 00031 } 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: EggJointPointer::move_vertices_to 00035 // Access: Public, Virtual 00036 // Description: Moves the vertices assigned to this joint into the 00037 // other joint (which should be of the same type). 00038 //////////////////////////////////////////////////////////////////// 00039 void EggJointPointer:: 00040 move_vertices_to(EggJointPointer *) { 00041 } 00042 00043 //////////////////////////////////////////////////////////////////// 00044 // Function: EggJointPointer::do_rebuild 00045 // Access: Public, Virtual 00046 // Description: Rebuilds the entire table all at once, based on the 00047 // frames added by repeated calls to add_rebuild_frame() 00048 // since the last call to begin_rebuild(). 00049 // 00050 // Until do_rebuild() is called, the animation table is 00051 // not changed. 00052 // 00053 // The return value is true if all frames are 00054 // acceptable, or false if there is some problem. 00055 //////////////////////////////////////////////////////////////////// 00056 bool EggJointPointer:: 00057 do_rebuild(EggCharacterDb &db) { 00058 return true; 00059 } 00060 00061 //////////////////////////////////////////////////////////////////// 00062 // Function: EggJointPointer::optimize 00063 // Access: Public, Virtual 00064 // Description: Resets the table before writing to disk so that 00065 // redundant rows (e.g. i { 1 1 1 1 1 1 1 1 }) are 00066 // collapsed out. 00067 //////////////////////////////////////////////////////////////////// 00068 void EggJointPointer:: 00069 optimize() { 00070 } 00071 00072 //////////////////////////////////////////////////////////////////// 00073 // Function: EggJointPointer::expose 00074 // Access: Public, Virtual 00075 // Description: Flags the joint with the indicated DCS flag so that 00076 // it will be loaded as a separate node in the player. 00077 //////////////////////////////////////////////////////////////////// 00078 void EggJointPointer:: 00079 expose(EggGroup::DCSType) { 00080 } 00081 00082 //////////////////////////////////////////////////////////////////// 00083 // Function: EggJointPointer::zero_channels 00084 // Access: Public, Virtual 00085 // Description: Zeroes out the named components of the transform in 00086 // the animation frames. 00087 //////////////////////////////////////////////////////////////////// 00088 void EggJointPointer:: 00089 zero_channels(const string &) { 00090 } 00091 00092 //////////////////////////////////////////////////////////////////// 00093 // Function: EggJointPointer::quantize_channels 00094 // Access: Public, Virtual 00095 // Description: Rounds the named components of the transform to the 00096 // nearest multiple of quantum. 00097 //////////////////////////////////////////////////////////////////// 00098 void EggJointPointer:: 00099 quantize_channels(const string &, double) { 00100 } 00101 00102 //////////////////////////////////////////////////////////////////// 00103 // Function: EggJointPointer::apply_default_pose 00104 // Access: Public, Virtual 00105 // Description: Applies the pose from the indicated frame of the 00106 // indicated source joint as the initial pose for 00107 // this joint. 00108 //////////////////////////////////////////////////////////////////// 00109 void EggJointPointer:: 00110 apply_default_pose(EggJointPointer *source_joint, int frame) { 00111 }