00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef MAXNODEDESC_H
00017 #define MAXNODEDESC_H
00018
00019
00020
00021
00022
00023
00024
00025
00026 class MaxNodeDesc : public ReferenceCount, public Namable {
00027 public:
00028 MaxNodeDesc(MaxNodeDesc *parent = NULL, const string &name = string());
00029 ~MaxNodeDesc();
00030
00031 void from_INode(INode *max_node);
00032 bool has_max_node() const;
00033 INode *get_max_node() const;
00034
00035 void set_joint(bool onoff);
00036 bool is_joint() const;
00037 bool is_joint_parent() const;
00038 bool is_node_joint() const;
00039
00040 MaxNodeDesc *_parent;
00041 MaxNodeDesc *_joint_entry;
00042 typedef pvector< MaxNodeDesc* > Children;
00043 Children _children;
00044
00045 private:
00046 void clear_egg();
00047 void mark_joint_parent();
00048 void check_pseudo_joints(bool joint_above);
00049
00050 INode *_max_node;
00051
00052 EggGroup *_egg_group;
00053 EggTable *_egg_table;
00054 EggXfmSAnim *_anim;
00055
00056 enum JointType {
00057 JT_none,
00058 JT_node_joint,
00059
00060 JT_joint,
00061 JT_pseudo_joint,
00062
00063 JT_joint_parent,
00064 };
00065 JointType _joint_type;
00066
00067
00068 public:
00069 static TypeHandle get_class_type() {
00070 return _type_handle;
00071 }
00072 static void init_type() {
00073 ReferenceCount::init_type();
00074 Namable::init_type();
00075 register_type(_type_handle, "MaxNodeDesc",
00076 ReferenceCount::get_class_type(),
00077 Namable::get_class_type());
00078 }
00079
00080 private:
00081 static TypeHandle _type_handle;
00082
00083 friend class MaxNodeTree;
00084 };
00085
00086 #endif