00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CCONSTRAINHPRINTERVAL_H
00016 #define CCONSTRAINHPRINTERVAL_H
00017
00018 #include "directbase.h"
00019 #include "cConstraintInterval.h"
00020 #include "nodePath.h"
00021 #include "lvecBase3.h"
00022 #include "lquaternion.h"
00023
00024
00025
00026
00027
00028
00029 class EXPCL_DIRECT CConstrainHprInterval : public CConstraintInterval {
00030 PUBLISHED:
00031 CConstrainHprInterval(const string &name, double duration,
00032 const NodePath &node, const NodePath &target,
00033 bool wrt, const LVecBase3 hprOffset=LVector3::zero());
00034
00035 INLINE const NodePath &get_node() const;
00036 INLINE const NodePath &get_target() const;
00037
00038 virtual void priv_step(double t);
00039 virtual void output(ostream &out) const;
00040
00041 private:
00042 NodePath _node;
00043 NodePath _target;
00044 bool _wrt;
00045 LQuaternion _quatOffset;
00046
00047 public:
00048 static TypeHandle get_class_type() {
00049 return _type_handle;
00050 }
00051 static void init_type() {
00052 CConstraintInterval::init_type();
00053 register_type(_type_handle, "CConstrainHprInterval",
00054 CConstraintInterval::get_class_type());
00055 }
00056 virtual TypeHandle get_type() const {
00057 return get_class_type();
00058 }
00059 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00060
00061 private:
00062 static TypeHandle _type_handle;
00063 };
00064
00065 #include "cConstrainHprInterval.I"
00066
00067 #endif
00068