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