Panda3D
Public Member Functions | Static Public Member Functions
CConstrainHprInterval Class Reference

A constraint interval that will constrain the orientation of one node to the orientation of another. More...

#include "cConstrainHprInterval.h"

Inheritance diagram for CConstrainHprInterval:
CConstraintInterval CInterval TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

 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 of another, possibly with an added rotation.
virtual TypeHandle force_init_type ()
const NodePathget_node () const
 Returns the "source" node.
const NodePathget_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.

Detailed Description

A constraint interval that will constrain the orientation of one node to the orientation of another.

Definition at line 29 of file cConstrainHprInterval.h.


Constructor & Destructor Documentation

CConstrainHprInterval::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 of another, possibly with an added rotation.

If wrt is true, the node's orientation will be transformed into the target node's parent's space before being copied. If wrt is false, the target node's local orientation will be copied unaltered.

Definition at line 34 of file cConstrainHprInterval.cxx.

References LQuaternionf::set_hpr().


Member Function Documentation

const NodePath & CConstrainHprInterval::get_node ( ) const [inline]

Returns the "source" node.

Definition at line 22 of file cConstrainHprInterval.I.

const NodePath & CConstrainHprInterval::get_target ( ) const [inline]

Returns the "target" node.

Definition at line 32 of file cConstrainHprInterval.I.

static void CConstrainHprInterval::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 51 of file cConstrainHprInterval.h.

References CConstraintInterval::init_type().

void CConstrainHprInterval::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 53 of file cConstrainHprInterval.cxx.

References CInterval::check_started(), NodePath::get_name(), NodePath::get_quat(), NodePath::is_empty(), NodePath::is_same_graph(), and NodePath::set_quat().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations