Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions

AnimChannelMatrixFixed Class Reference

A specialization on AnimChannel to add all the special matrix component operations. More...

#include "animChannelMatrixFixed.h"

Inheritance diagram for AnimChannelMatrixFixed:
AnimChannel< ACMatrixSwitchType > AnimChannelBase AnimGroup TypedWritableReferenceCount Namable TypedWritable ReferenceCount MemoryBase TypedObject MemoryBase MemoryBase

List of all members.

Public Member Functions

 AnimChannelMatrixFixed (const string &name, const LVecBase3 &pos, const LVecBase3 &hpr, const LVecBase3 &scale)
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)
 Gets the scale value at the indicated 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, LMatrix4 &value)
virtual void get_value_no_scale_shear (int frame, LMatrix4 &value)
 Gets the value of the channel at the indicated frame, without any scale or shear information.
virtual bool has_changed (int last_frame, double last_frac, int this_frame, double this_frac)
 Returns true if the value has changed since the last call to has_changed().
virtual void output (ostream &out) const
 Writes a one-line description of the group.
virtual void write_datagram (BamWriter *manager, Datagram &dg)
 Writes the contents of this object to the datagram for shipping out to a Bam file.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
static void register_with_read_factory ()
 Tells the BamReader how to create objects of type AnimChannelMatrixFixed.

Protected Member Functions

 AnimChannelMatrixFixed (AnimGroup *parent, const AnimChannelMatrixFixed &copy)
 Creates a new AnimChannelMatrixFixed, just like this one, without copying any children.
void fillin (DatagramIterator &scan, BamReader *manager)
 This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new AnimChannelMatrixFixed.

Static Protected Member Functions

static TypedWritablemake_from_bam (const FactoryParams &params)
 This function is called by the BamReader's factory when a new object of type AnimChannelMatrixFixed is encountered in the Bam file.

Detailed Description

A specialization on AnimChannel to add all the special matrix component operations.

Definition at line 30 of file animChannelMatrixFixed.h.


Constructor & Destructor Documentation

AnimChannelMatrixFixed::AnimChannelMatrixFixed ( AnimGroup parent,
const AnimChannelMatrixFixed copy 
) [protected]

Creates a new AnimChannelMatrixFixed, 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 29 of file animChannelMatrixFixed.cxx.

Referenced by make_from_bam().


Member Function Documentation

void AnimChannelMatrixFixed::fillin ( DatagramIterator scan,
BamReader manager 
) [protected, virtual]

This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new AnimChannelMatrixFixed.

Reimplemented from AnimChannelBase.

Definition at line 205 of file animChannelMatrixFixed.cxx.

References LVecBase3f::read_datagram().

Referenced by make_from_bam().

void AnimChannelMatrixFixed::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 from AnimChannel< ACMatrixSwitchType >.

Definition at line 100 of file animChannelMatrixFixed.cxx.

void AnimChannelMatrixFixed::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 from AnimChannel< ACMatrixSwitchType >.

Definition at line 124 of file animChannelMatrixFixed.cxx.

void AnimChannelMatrixFixed::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 from AnimChannel< ACMatrixSwitchType >.

Definition at line 112 of file animChannelMatrixFixed.cxx.

References LQuaternionf::set_hpr().

void AnimChannelMatrixFixed::get_scale ( int  frame,
LVecBase3 scale 
) [virtual]

Gets the scale value at the indicated frame.

Reimplemented from AnimChannel< ACMatrixSwitchType >.

Definition at line 88 of file animChannelMatrixFixed.cxx.

void AnimChannelMatrixFixed::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 from AnimChannel< ACMatrixSwitchType >.

Definition at line 136 of file animChannelMatrixFixed.cxx.

References LVecBase3f::zero().

void AnimChannelMatrixFixed::get_value_no_scale_shear ( int  frame,
LMatrix4 value 
) [virtual]

Gets the value of the channel at the indicated frame, without any scale or shear information.

Reimplemented from AnimChannel< ACMatrixSwitchType >.

Definition at line 77 of file animChannelMatrixFixed.cxx.

References LVecBase3f::zero().

bool AnimChannelMatrixFixed::has_changed ( int  last_frame,
double  last_frac,
int  this_frame,
double  this_frac 
) [virtual]

Returns true if the value has changed since the last call to has_changed().

last_frame is the frame number of the last call; this_frame is the current frame number. last_frac and this_frac are the fractional steps into those frames, which will be 0.0 unless we are running in frame_blend mode.

Reimplemented from AnimChannelBase.

Definition at line 55 of file animChannelMatrixFixed.cxx.

TypedWritable * AnimChannelMatrixFixed::make_from_bam ( const FactoryParams params) [static, protected]

This function is called by the BamReader's factory when a new object of type AnimChannelMatrixFixed is encountered in the Bam file.

It should create the AnimChannelMatrixFixed and extract its information from the file.

Definition at line 186 of file animChannelMatrixFixed.cxx.

References AnimChannelMatrixFixed(), fillin(), and LVecBase3f::zero().

Referenced by register_with_read_factory().

void AnimChannelMatrixFixed::output ( ostream &  out) const [virtual]

Writes a one-line description of the group.

Reimplemented from AnimGroup.

Definition at line 146 of file animChannelMatrixFixed.cxx.

void AnimChannelMatrixFixed::register_with_read_factory ( ) [static]

Tells the BamReader how to create objects of type AnimChannelMatrixFixed.

Reimplemented from AnimGroup.

Definition at line 158 of file animChannelMatrixFixed.cxx.

References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().

void AnimChannelMatrixFixed::write_datagram ( BamWriter manager,
Datagram dg 
) [virtual]

Writes the contents of this object to the datagram for shipping out to a Bam file.

Reimplemented from AnimChannelBase.

Definition at line 169 of file animChannelMatrixFixed.cxx.

References LVecBase3f::write_datagram().


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