Panda3D
|
A constraint interval that will constrain the position and orientation of one node to the position and orientation of another. More...
#include "cConstrainPosHprInterval.h"
Public Member Functions | |
CConstrainPosHprInterval (const string &name, double duration, const NodePath &node, const NodePath &target, bool wrt, const LVecBase3 posOffset=LVector3::zero(), const LVecBase3 hprOffset=LVector3::zero()) | |
Constructs a constraint interval that will constrain the position and orientation of one node to the position and orientation of another. | |
virtual TypeHandle | force_init_type () |
const NodePath & | get_node () const |
Returns the "source" node. | |
const NodePath & | get_target () const |
Returns the "target" node. | |
virtual TypeHandle | get_type () const |
virtual void | output (ostream &out) const |
virtual void | priv_step (double t) |
Advances the time on the interval. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. |
A constraint interval that will constrain the position and orientation of one node to the position and orientation of another.
Definition at line 30 of file cConstrainPosHprInterval.h.
CConstrainPosHprInterval::CConstrainPosHprInterval | ( | const string & | name, |
double | duration, | ||
const NodePath & | node, | ||
const NodePath & | target, | ||
bool | wrt, | ||
const LVecBase3 | posOffset = LVector3::zero() , |
||
const LVecBase3 | hprOffset = LVector3::zero() |
||
) |
Constructs a constraint interval that will constrain the position and orientation of one node to the position and orientation of another.
If wrt is true, the node's position and orientation will be transformed into the target node's parent's space before being copied. If wrt is false, the target node's local position and orientation will be copied unaltered.
Definition at line 35 of file cConstrainPosHprInterval.cxx.
References LQuaternionf::set_hpr().
const NodePath & CConstrainPosHprInterval::get_node | ( | ) | const [inline] |
Returns the "source" node.
Definition at line 22 of file cConstrainPosHprInterval.I.
const NodePath & CConstrainPosHprInterval::get_target | ( | ) | const [inline] |
Returns the "target" node.
Definition at line 32 of file cConstrainPosHprInterval.I.
static void CConstrainPosHprInterval::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from CConstraintInterval.
Definition at line 54 of file cConstrainPosHprInterval.h.
References CConstraintInterval::init_type().
void CConstrainPosHprInterval::priv_step | ( | double | t | ) | [virtual] |
Advances the time on the interval.
The time may either increase (the normal case) or decrease (e.g. if the interval is being played by a slider).
Reimplemented from CInterval.
Definition at line 56 of file cConstrainPosHprInterval.cxx.
References CInterval::check_started(), NodePath::get_name(), NodePath::get_pos(), NodePath::get_quat(), NodePath::is_empty(), NodePath::is_same_graph(), and NodePath::set_pos_quat().