31 bool wrt,
const LVecBase3 posOffset) :
32 CConstraintInterval(name, duration),
47 check_started(get_class_type(),
"priv_step");
51 if(! _target.is_empty()) {
53 if(! _node.is_same_graph(_target)){
54 interval_cat.warning()
55 <<
"Unable to copy position in CConstrainPosInterval::priv_step;\n"
56 <<
"node (" << _node.get_name()
57 <<
") and target (" << _target.get_name()
58 <<
") are not in the same graph.\n";
61 _target.set_pos(_node, _posOffset);
63 if(_posOffset == LVector3::zero()) {
64 _target.set_pos(_node.get_pos());
66 _target.set_pos(_node.get_pos() + _posOffset);
75void CConstrainPosInterval::
76output(std::ostream &out)
const {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CConstrainPosInterval(const std::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...
virtual void priv_step(double t)
Advances the time on the interval.
get_name
Returns the interval's name.
get_duration
Returns the duration of the interval in seconds.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.