Panda3D
Public Member Functions | Static Public Member Functions

CConstrainPosInterval Class Reference

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

#include "cConstrainPosInterval.h"

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

List of all members.

Public Member Functions

 CConstrainPosInterval (const 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 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 position of one node to the position of another.

Definition at line 28 of file cConstrainPosInterval.h.


Constructor & Destructor Documentation

CConstrainPosInterval::CConstrainPosInterval ( const 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 another.

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

Definition at line 33 of file cConstrainPosInterval.cxx.


Member Function Documentation

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

Returns the "source" node.

Definition at line 22 of file cConstrainPosInterval.I.

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

Returns the "target" node.

Definition at line 32 of file cConstrainPosInterval.I.

static void CConstrainPosInterval::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 50 of file cConstrainPosInterval.h.

References CConstraintInterval::init_type().

void CConstrainPosInterval::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 cConstrainPosInterval.cxx.

References CInterval::check_started(), NodePath::get_name(), NodePath::get_pos(), NodePath::is_empty(), NodePath::is_same_graph(), NodePath::set_pos(), and LVector3f::zero().


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