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

This node is placed at key points within the scene graph to animate uvs. More...

#include "uvScrollNode.h"

Inheritance diagram for UvScrollNode:
PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject MemoryBase MemoryBase MemoryBase

List of all members.

Public Member Functions

 UvScrollNode (const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat r_speed)
 UvScrollNode (const string &name)
virtual bool cull_callback (CullTraverser *trav, CullTraverserData &data)
 This function will be called during the cull traversal to perform any additional operations that should be performed at cull time.
virtual TypeHandle force_init_type ()
PN_stdfloat get_r_speed () const
virtual TypeHandle get_type () const
PN_stdfloat get_u_speed () const
PN_stdfloat get_v_speed () const
virtual PandaNodemake_copy () const
 Returns a newly-allocated Node that is a shallow copy of this one.
virtual bool safe_to_combine () const
 Returns true if it is generally safe to combine this with other nodes, which it isn't, so don't.
virtual bool safe_to_flatten () const
 Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances (by calling dupe_for_flatten()), false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).
void set_r_speed (PN_stdfloat r_speed)
void set_u_speed (PN_stdfloat u_speed)
void set_v_speed (PN_stdfloat v_speed)
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 UvScrollNode.

Protected Member Functions

 UvScrollNode (const UvScrollNode &copy)
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 ModelNode.

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 ModelNode is encountered in the Bam file.

Detailed Description

This node is placed at key points within the scene graph to animate uvs.

Definition at line 29 of file uvScrollNode.h.


Member Function Documentation

bool UvScrollNode::cull_callback ( CullTraverser trav,
CullTraverserData data 
) [virtual]

This function will be called during the cull traversal to perform any additional operations that should be performed at cull time.

This may include additional manipulation of render state or additional visible/invisible decisions, or any other arbitrary operation.

Note that this function will *not* be called unless set_cull_callback() is called in the constructor of the derived class. It is necessary to call set_cull_callback() to indicated that we require cull_callback() to be called.

By the time this function is called, the node has already passed the bounding-volume test for the viewing frustum, and the node's transform and state have already been applied to the indicated CullTraverserData object.

The return value is if this node should be visible, or false if it should be culled.

Reimplemented from PandaNode.

Definition at line 132 of file uvScrollNode.cxx.

References TextureStage::get_default(), ClockObject::get_frame_time(), and ClockObject::get_global_clock().

void UvScrollNode::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 ModelNode.

Reimplemented from PandaNode.

Definition at line 95 of file uvScrollNode.cxx.

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

Referenced by make_from_bam().

PandaNode * UvScrollNode::make_copy ( ) const [virtual]

Returns a newly-allocated Node that is a shallow copy of this one.

It will be a different Node pointer, but its internal data may or may not be shared with that of the original Node.

Reimplemented from PandaNode.

Definition at line 38 of file uvScrollNode.cxx.

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

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

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

Reimplemented from PandaNode.

Definition at line 76 of file uvScrollNode.cxx.

References fillin().

Referenced by register_with_read_factory().

Tells the BamReader how to create objects of type UvScrollNode.

Reimplemented from PandaNode.

Definition at line 49 of file uvScrollNode.cxx.

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

bool UvScrollNode::safe_to_combine ( ) const [virtual]

Returns true if it is generally safe to combine this with other nodes, which it isn't, so don't.

Ever.

Reimplemented from PandaNode.

Definition at line 167 of file uvScrollNode.cxx.

bool UvScrollNode::safe_to_flatten ( ) const [virtual]

Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances (by calling dupe_for_flatten()), false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).

Reimplemented from PandaNode.

Definition at line 156 of file uvScrollNode.cxx.

void UvScrollNode::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 PandaNode.

Definition at line 60 of file uvScrollNode.cxx.

References Datagram::add_stdfloat().


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