00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CCONSTRAINPOSHPRINTERVAL_H
00016 #define CCONSTRAINPOSHPRINTERVAL_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
00030 class EXPCL_DIRECT CConstrainPosHprInterval : public CConstraintInterval {
00031 PUBLISHED:
00032 CConstrainPosHprInterval(const string &name, double duration,
00033 const NodePath &node, const NodePath &target,
00034 bool wrt, const LVecBase3 posOffset=LVector3::zero(),
00035 const LVecBase3 hprOffset=LVector3::zero());
00036
00037 INLINE const NodePath &get_node() const;
00038 INLINE const NodePath &get_target() const;
00039
00040 virtual void priv_step(double t);
00041 virtual void output(ostream &out) const;
00042
00043 private:
00044 NodePath _node;
00045 NodePath _target;
00046 bool _wrt;
00047 LVecBase3 _posOffset;
00048 LQuaternion _quatOffset;
00049
00050 public:
00051 static TypeHandle get_class_type() {
00052 return _type_handle;
00053 }
00054 static void init_type() {
00055 CConstraintInterval::init_type();
00056 register_type(_type_handle, "CConstrainPosHprInterval",
00057 CConstraintInterval::get_class_type());
00058 }
00059 virtual TypeHandle get_type() const {
00060 return get_class_type();
00061 }
00062 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00063
00064 private:
00065 static TypeHandle _type_handle;
00066 };
00067
00068 #include "cConstrainPosHprInterval.I"
00069
00070 #endif
00071