00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGCHARACTERDB_H
00016 #define EGGCHARACTERDB_H
00017
00018 #include "pandatoolbase.h"
00019 #include "pmap.h"
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 class EggJointPointer;
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 class EggCharacterDb {
00045 public:
00046 EggCharacterDb();
00047 ~EggCharacterDb();
00048
00049 enum TableType {
00050 TT_rebuild_frame,
00051 TT_net_frame,
00052 TT_net_frame_inv,
00053 };
00054
00055 bool get_matrix(const EggJointPointer *joint, TableType type,
00056 int frame, LMatrix4d &mat) const;
00057 void set_matrix(const EggJointPointer *joint, TableType type,
00058 int frame, const LMatrix4d &mat);
00059
00060 private:
00061 class Key {
00062 public:
00063 INLINE Key(const EggJointPointer *joint,
00064 TableType table_type,
00065 int frame);
00066 INLINE bool operator < (const Key &other) const;
00067
00068 private:
00069 const EggJointPointer *_joint;
00070 TableType _table_type;
00071 int _frame;
00072 };
00073
00074
00075
00076
00077
00078
00079
00080
00081 typedef pmap<Key, LMatrix4d> Table;
00082 Table _table;
00083 };
00084
00085 #include "eggCharacterDb.I"
00086
00087 #endif
00088
00089