15 #include "cConstrainPosInterval.h" 16 #include "config_interval.h" 17 #include "lvecBase3.h" 19 TypeHandle CConstrainPosInterval::_type_handle;
53 check_started(get_class_type(),
"priv_step");
60 interval_cat.warning()
61 <<
"Unable to copy position in CConstrainPosInterval::priv_step;\n" 63 <<
") and target (" << _target.
get_name()
64 <<
") are not in the same graph.\n";
67 _target.set_pos(_node, _posOffset);
70 _target.set_pos(_node.
get_pos());
72 _target.set_pos(_node.
get_pos() + _posOffset);
83 void CConstrainPosInterval::
84 output(ostream &out)
const {
This is the base class for all three-component vectors and points.
CConstrainPosInterval(const string &name, double duration, const NodePath &node, const NodePath &target, bool wrt, const LVecBase3 posOffset=LVector3::zero())
Constructs a constraint interval that will constrain the position of one node to the position of anot...
bool is_empty() const
Returns true if the NodePath contains no nodes.
static const LVector3f & zero()
Returns a zero-length vector.
const string & get_name() const
Returns the interval's name.
string get_name() const
Returns the name of the referenced node.
The base class for a family of intervals that constrain some property to a value over time...
double get_duration() const
Returns the duration of the interval in seconds.
LPoint3 get_pos() const
Retrieves the translation component of the transform.
bool is_same_graph(const NodePath &other, Thread *current_thread=Thread::get_current_thread()) const
Returns true if the node represented by this NodePath is parented within the same graph as that of th...
TypeHandle is the identifier used to differentiate C++ class types.
virtual void priv_step(double t)
Advances the time on the interval.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...