Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
AnimChannel< SwitchType > Class Template Reference

This template class is the parent class for all kinds of AnimChannels that return different values. More...

#include "animChannel.h"

Inheritance diagram for AnimChannel< SwitchType >:
AnimChannelBase AnimGroup TypedWritableReferenceCount Namable TypedWritable ReferenceCount MemoryBase TypedObject MemoryBase MemoryBase AnimChannelFixed< SwitchType > AnimChannelScalarDynamic AnimChannelScalarTable

List of all members.

Public Types

typedef SwitchType::ValueType ValueType

Public Member Functions

 AnimChannel (AnimGroup *parent, const string &name)
 This is the normal constructor, which automatically places the AnimChannel in the previously-created hierarchy.
virtual TypeHandle force_init_type ()
virtual void get_hpr (int frame, LVecBase3 &hpr)
 Returns the h, p, and r components associated with the current frame.
virtual void get_pos (int frame, LVecBase3 &pos)
 Returns the x, y, and z translation components associated with the current frame.
virtual void get_quat (int frame, LQuaternion &quat)
 Returns the rotation component associated with the current frame, expressed as a quaternion.
virtual void get_scale (int frame, LVecBase3 &scale)
 Returns the x, y, and z scale components associated with the current frame.
virtual void get_shear (int frame, LVecBase3 &shear)
 Returns the a, b, and c shear components associated with the current frame.
virtual TypeHandle get_type () const
virtual void get_value (int frame, ValueType &value)=0
virtual void get_value_no_scale_shear (int frame, ValueType &value)
 Returns the value associated with the current frame, with no scale or share components.
virtual TypeHandle get_value_type () const
 Returns the TypeHandle associated with the ValueType we return.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

 AnimChannel (const string &name="")
 Don't use this constructor.
 AnimChannel (AnimGroup *parent, const AnimChannel &copy)
 Creates a new AnimChannel, just like this one, without copying any children.

Detailed Description

template<class SwitchType>
class AnimChannel< SwitchType >

This template class is the parent class for all kinds of AnimChannels that return different values.

Definition at line 30 of file animChannel.h.


Constructor & Destructor Documentation

template<class SwitchType >
AnimChannel< SwitchType >::AnimChannel ( const string &  name = "") [inline, protected]

Don't use this constructor.

It exists only so that AnimChannelFixed may define itself outside of the hierarchy. Normally, an AnimChannel must be created as part of a hierarchy.

Definition at line 33 of file animChannel.I.

template<class SwitchType >
AnimChannel< SwitchType >::AnimChannel ( AnimGroup parent,
const AnimChannel< SwitchType > &  copy 
) [inline, protected]

Creates a new AnimChannel, just like this one, without copying any children.

The new copy is added to the indicated parent. Intended to be called by make_copy() only.

Definition at line 47 of file animChannel.I.

template<class SwitchType >
AnimChannel< SwitchType >::AnimChannel ( AnimGroup parent,
const string &  name 
) [inline]

This is the normal constructor, which automatically places the AnimChannel in the previously-created hierarchy.

Definition at line 61 of file animChannel.I.


Member Function Documentation

template<class SwitchType >
void AnimChannel< SwitchType >::get_hpr ( int  frame,
LVecBase3 hpr 
) [virtual]

Returns the h, p, and r components associated with the current frame.

As above, this only makes sense for a matrix-type channel.

Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, and AnimChannelMatrixFixed.

Definition at line 132 of file animChannel.I.

Referenced by MovingPartMatrix::get_blend_value().

template<class SwitchType >
void AnimChannel< SwitchType >::get_pos ( int  frame,
LVecBase3 pos 
) [virtual]

Returns the x, y, and z translation components associated with the current frame.

As above, this only makes sense for a matrix-type channel.

Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, and AnimChannelMatrixFixed.

Definition at line 158 of file animChannel.I.

Referenced by MovingPartMatrix::get_blend_value().

template<class SwitchType >
void AnimChannel< SwitchType >::get_quat ( int  frame,
LQuaternion quat 
) [virtual]

Returns the rotation component associated with the current frame, expressed as a quaternion.

As above, this only makes sense for a matrix-type channel.

Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, and AnimChannelMatrixFixed.

Definition at line 145 of file animChannel.I.

Referenced by MovingPartMatrix::get_blend_value().

template<class SwitchType >
void AnimChannel< SwitchType >::get_scale ( int  frame,
LVecBase3 scale 
) [virtual]

Returns the x, y, and z scale components associated with the current frame.

As above, this only makes sense for a matrix-type channel.

Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, and AnimChannelMatrixFixed.

Definition at line 119 of file animChannel.I.

Referenced by MovingPartMatrix::get_blend_value().

template<class SwitchType >
void AnimChannel< SwitchType >::get_shear ( int  frame,
LVecBase3 shear 
) [virtual]

Returns the a, b, and c shear components associated with the current frame.

As above, this only makes sense for a matrix-type channel.

Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, and AnimChannelMatrixFixed.

Definition at line 171 of file animChannel.I.

Referenced by MovingPartMatrix::get_blend_value().

template<class SwitchType >
void AnimChannel< SwitchType >::get_value_no_scale_shear ( int  frame,
ValueType &  value 
) [virtual]

Returns the value associated with the current frame, with no scale or share components.

This only makes sense for a matrix-type channel, although for fiddly technical reasons the function exists for all channels.

Reimplemented in AnimChannelMatrixDynamic, AnimChannelMatrixXfmTable, and AnimChannelMatrixFixed.

Definition at line 106 of file animChannel.I.

Referenced by MovingPartMatrix::get_blend_value().

template<class SwitchType >
TypeHandle AnimChannel< SwitchType >::get_value_type ( ) const [virtual]

Returns the TypeHandle associated with the ValueType we return.

This is provided to allow a bit of run-time checking that joints and channels are matching properly in type.

Implements AnimChannelBase.

Definition at line 186 of file animChannel.I.


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