Panda3D
Public Member Functions | Static Public Member Functions

CConstrainTransformInterval Class Reference

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

#include "cConstrainTransformInterval.h"

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

List of all members.

Public Member Functions

 CConstrainTransformInterval (const string &name, double duration, const NodePath &node, const NodePath &target, bool wrt)
 Constructs a constraint interval that will constrain the transform of one node to the transform of another.
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 transform of one node to the transform of another.

Definition at line 27 of file cConstrainTransformInterval.h.


Constructor & Destructor Documentation

CConstrainTransformInterval::CConstrainTransformInterval ( const string &  name,
double  duration,
const NodePath node,
const NodePath target,
bool  wrt 
)

Constructs a constraint interval that will constrain the transform of one node to the transform of another.

To clarify, the transform of node will be copied to target.

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

Definition at line 34 of file cConstrainTransformInterval.cxx.


Member Function Documentation

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

Returns the "source" node.

Definition at line 22 of file cConstrainTransformInterval.I.

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

Returns the "target" node.

Definition at line 32 of file cConstrainTransformInterval.I.

static void CConstrainTransformInterval::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 48 of file cConstrainTransformInterval.h.

References CConstraintInterval::init_type().

void CConstrainTransformInterval::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 52 of file cConstrainTransformInterval.cxx.

References CInterval::check_started(), NodePath::get_name(), NodePath::get_parent(), NodePath::get_transform(), NodePath::is_empty(), NodePath::is_same_graph(), and NodePath::set_transform().


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