Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions
AnimChannelScalarDynamic Class Reference

An animation channel that accepts a scalar each frame from some dynamic input provided by code. More...

#include "animChannelScalarDynamic.h"

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

List of all members.

Public Member Functions

 AnimChannelScalarDynamic (const string &name)
virtual int complete_pointers (TypedWritable **plist, BamReader *manager)
 Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
void fillin (DatagramIterator &scan, BamReader *manager)
 Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place.
virtual TypeHandle force_init_type ()
virtual TypeHandle get_type () const
virtual void get_value (int frame, PN_stdfloat &value)
 Gets the value of the channel at the indicated frame.
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().
void set_value (PN_stdfloat value)
 Explicitly sets the value.
void set_value_node (PandaNode *node)
 Specifies a node whose transform will be queried each frame to implicitly specify the transform of this joint.
virtual void write_datagram (BamWriter *manager, Datagram &dg)
 Function to write the important information in the particular object to a Datagram.

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()
static TypedWritablemake_AnimChannelScalarDynamic (const FactoryParams &params)
 Factory method to generate a AnimChannelScalarDynamic object.
static void register_with_read_factory ()
 Factory method to generate a AnimChannelScalarDynamic object.

Protected Member Functions

 AnimChannelScalarDynamic ()
 For use only with the bam reader.
 AnimChannelScalarDynamic (AnimGroup *parent, const AnimChannelScalarDynamic &copy)
 Creates a new AnimChannelScalarDynamic, just like this one, without copying any children.
virtual AnimGroupmake_copy (AnimGroup *parent) const
 Returns a copy of this object, and attaches it to the indicated parent (which may be NULL only if this is an AnimBundle).

Detailed Description

An animation channel that accepts a scalar each frame from some dynamic input provided by code.

This object operates in two modes: in explicit mode, the programmer should call set_value() each frame to indicate the new value; in implicit mode, the programmer should call set_value_node() to indicate the node whose X component will be copied to the scalar each frame.

Definition at line 37 of file animChannelScalarDynamic.h.


Constructor & Destructor Documentation

For use only with the bam reader.

Definition at line 34 of file animChannelScalarDynamic.cxx.

Referenced by make_AnimChannelScalarDynamic(), and make_copy().

Creates a new AnimChannelScalarDynamic, 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 46 of file animChannelScalarDynamic.cxx.


Member Function Documentation

int AnimChannelScalarDynamic::complete_pointers ( TypedWritable **  p_list,
BamReader manager 
) [virtual]

Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().

Returns the number of pointers processed.

Reimplemented from AnimGroup.

Definition at line 176 of file animChannelScalarDynamic.cxx.

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

Function that reads out of the datagram (or asks manager to read) all of the data that is needed to re-create this object and stores it in the appropiate place.

Reimplemented from AnimChannelBase.

Definition at line 195 of file animChannelScalarDynamic.cxx.

References DatagramIterator::get_stdfloat(), and BamReader::read_pointer().

Referenced by make_AnimChannelScalarDynamic().

void AnimChannelScalarDynamic::get_value ( int  frame,
PN_stdfloat &  value 
) [virtual]

Gets the value of the channel at the indicated frame.

Definition at line 99 of file animChannelScalarDynamic.cxx.

bool AnimChannelScalarDynamic::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.

Reimplemented from AnimChannelBase.

Definition at line 79 of file animChannelScalarDynamic.cxx.

Factory method to generate a AnimChannelScalarDynamic object.

Definition at line 211 of file animChannelScalarDynamic.cxx.

References AnimChannelScalarDynamic(), and fillin().

Referenced by register_with_read_factory().

AnimGroup * AnimChannelScalarDynamic::make_copy ( AnimGroup parent) const [protected, virtual]

Returns a copy of this object, and attaches it to the indicated parent (which may be NULL only if this is an AnimBundle).

Intended to be called by copy_subtree() only.

Reimplemented from AnimGroup.

Definition at line 149 of file animChannelScalarDynamic.cxx.

References AnimChannelScalarDynamic().

void AnimChannelScalarDynamic::set_value ( PN_stdfloat  value)

Explicitly sets the value.

Definition at line 114 of file animChannelScalarDynamic.cxx.

Specifies a node whose transform will be queried each frame to implicitly specify the transform of this joint.

Definition at line 128 of file animChannelScalarDynamic.cxx.

References PandaNode::get_transform().

Referenced by MovingPartScalar::apply_control().

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

Function to write the important information in the particular object to a Datagram.

Reimplemented from AnimChannelBase.

Definition at line 161 of file animChannelScalarDynamic.cxx.

References Datagram::add_stdfloat(), and BamWriter::write_pointer().


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