00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CHARACTERJOINTEFFECT_H
00016 #define CHARACTERJOINTEFFECT_H
00017
00018 #include "pandabase.h"
00019
00020 #include "renderEffect.h"
00021 #include "luse.h"
00022 #include "nodePath.h"
00023 #include "character.h"
00024 #include "weakPointerTo.h"
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 class EXPCL_PANDA_CHAR CharacterJointEffect : public RenderEffect {
00038 private:
00039 INLINE CharacterJointEffect();
00040
00041 PUBLISHED:
00042 static CPT(RenderEffect) make(Character *character);
00043
00044 INLINE Character *get_character() const;
00045
00046 public:
00047 virtual bool safe_to_transform() const;
00048 virtual bool safe_to_combine() const;
00049 virtual void output(ostream &out) const;
00050
00051 virtual bool has_cull_callback() const;
00052 virtual void cull_callback(CullTraverser *trav, CullTraverserData &data,
00053 CPT(TransformState) &node_transform,
00054 CPT(RenderState) &node_state) const;
00055
00056 virtual bool has_adjust_transform() const;
00057 virtual void adjust_transform(CPT(TransformState) &net_transform,
00058 CPT(TransformState) &node_transform,
00059 PandaNode *node) const;
00060
00061 protected:
00062 virtual int compare_to_impl(const RenderEffect *other) const;
00063
00064 private:
00065 WPT(Character) _character;
00066
00067 public:
00068 static void register_with_read_factory();
00069 virtual void write_datagram(BamWriter *manager, Datagram &dg);
00070 virtual int complete_pointers(TypedWritable **plist,
00071 BamReader *manager);
00072
00073 protected:
00074 static TypedWritable *make_from_bam(const FactoryParams ¶ms);
00075 void fillin(DatagramIterator &scan, BamReader *manager);
00076
00077 public:
00078 static TypeHandle get_class_type() {
00079 return _type_handle;
00080 }
00081 static void init_type() {
00082 RenderEffect::init_type();
00083 register_type(_type_handle, "CharacterJointEffect",
00084 RenderEffect::get_class_type());
00085 }
00086 virtual TypeHandle get_type() const {
00087 return get_class_type();
00088 }
00089 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00090
00091 private:
00092 static TypeHandle _type_handle;
00093 };
00094
00095 #include "characterJointEffect.I"
00096
00097 #endif
00098