15 #include "cConstrainHprInterval.h" 16 #include "config_interval.h" 17 #include "lvecBase3.h" 19 TypeHandle CConstrainHprInterval::_type_handle;
54 check_started(get_class_type(),
"priv_step");
61 interval_cat.warning()
62 <<
"Unable to copy orientation in CConstrainHprInterval::priv_step;\n" 64 <<
") and target (" << _target.
get_name()
65 <<
") are not in the same graph.\n";
68 _target.
set_quat(_node, _quatOffset);
80 void CConstrainHprInterval::
81 output(ostream &out)
const {
This is the base class for all three-component vectors and points.
bool is_empty() const
Returns true if the NodePath contains no nodes.
const string & get_name() const
Returns the interval's name.
void set_quat(const LQuaternion &quat)
Sets the rotation component of the transform, leaving translation and scale untouched.
string get_name() const
Returns the name of the referenced node.
CConstrainHprInterval(const string &name, double duration, const NodePath &node, const NodePath &target, bool wrt, const LVecBase3 hprOffset=LVector3::zero())
Constructs a constraint interval that will constrain the orientation of one node to the orientation o...
The base class for a family of intervals that constrain some property to a value over time...
void set_hpr(const LVecBase3f &hpr, CoordinateSystem cs=CS_default)
Sets the quaternion as the unit quaternion that is equivalent to these Euler angles.
double get_duration() const
Returns the duration of the interval in seconds.
LQuaternion get_quat() const
Retrieves the rotation 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...
virtual void priv_step(double t)
Advances the time on the interval.
TypeHandle is the identifier used to differentiate C++ class types.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...